2
0
mirror of git://git.savannah.gnu.org/libtool.git synced 2025-02-11 15:00:08 +08:00

Merge remote branch 'origin/master' into sysroot

* libltdl/config/ltmain.m4sh (func_mode_finish): Use sed_make_literal_regex.
This commit is contained in:
Paolo Bonzini 2010-08-22 09:29:24 +02:00
commit 2bde23f84f
8 changed files with 129 additions and 24 deletions

View File

@ -1,3 +1,59 @@
2010-08-15 Paolo Bonzini <bonzini@gnu.org>
Factor the sed command used to make a regex from a literal.
* libltdl/config/general.m4sh (sed_make_literal_regex): New.
* libltdl/config/ltmain.m4sh
(func_cygming_dll_for_implib_fallback_core): Use it. Suggested
by Ralf Wildenhues.
2010-08-21 Rainer Tammer <tammer@tammer.net> (tiny change)
Avoid issues with AIX resident shared libraries in old testsuite.
* tests/defs.m4sh [aix]: Remove file mode permission for others,
so shared libraries are not kept in memory after execution.
Fixes failures of repeated mdemo-inst.test with on AIX 5.3.
2010-08-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Skip part of versioning test on AIX.
* tests/versioning.at (versioning): The AIX linker always
records the unversioned library name, even with runtimelinking,
so skip the execution test for the incompatibly upgraded
library.
Report by Rainer Tammer.
Remove dead code from versioning test.
* tests/versioning.at (versioning): No need to build unused
prog3.
2010-08-20 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Don't hide the table of contents in the manual.
* doc/libtool.texi: Move the table of contents to the beginning.
Prompted by patch from Bruno Haible against Automake.
Remove superfluous dependency in Makefile.am.
* Makefile.am (tests/demo-conf.test): Remove dependency on
libtool, this test is a primary source and not generated.
Bump copyright years in manual.
* doc/libtool.texi: Bump copyright years.
2010-08-13 Peter Rosin <peda@lysator.liu.se>
Allow the use of a listing file if the archiver supports it.
* libltdl/m4/libtool.m4 (_LT_CMD_OLD_ARCHIVE): Move detection
of a suitable archiver...
(_LT_PROG_AR): ...to here. New macro, also detect if the
archiver supports a listing file with the new variable
archiver_list_spec.
* libltdl/config/ltmain.m4sh: If the archiver supports a listing
file, use it when max_cmd_len is exceeded. This is needed for
tool chains such as MSVC which do not support piece by piece
linking (-r -o).
* doc/libtool.texi (libtool script contents): Update with
archiver_list_spec description.
2010-08-10 Gary V. Vaughan <gary@gnu.org> (tiny change)
Make testsuite compatible with Autoconf 2.62 again.

View File

@ -691,8 +691,6 @@ if HAVE_FC
TESTS += $(FC_TESTS)
endif
tests/demo-conf.test: libtool
EXTRA_DIST += $(srcdir)/tests/defs.in tests/defs.m4sh \
$(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS) $(FC_TESTS)
DIST_SUBDIRS += $(CONF_SUBDIRS)

View File

@ -26,7 +26,7 @@
@ifnottex
This file documents GNU Libtool @value{VERSION}
Copyright (C) 1996-2009 Free Software Foundation, Inc.
Copyright (C) 1996-2010 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
@ -53,7 +53,7 @@ identical to this one except for the removal of this paragraph
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 2009 Free Software Foundation, Inc.
Copyright @copyright{} 2010 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
@ -70,6 +70,8 @@ the section entitled "GNU Free Documentation License".
@syncodeindex tp cp
@synindex pg cp
@contents
@ifnottex
@node Top, Introduction, (dir), (dir)
@comment node-name, next, previous, up
@ -5881,6 +5883,10 @@ Commands used to create shared libraries, shared libraries with
@option{-export-symbols} and static libraries, respectively.
@end defvar
@defvar archiver_list_spec
Specify filename containing input files for @code{AR}.
@end defvar
@defvar old_archive_from_new_cmds
If the shared library depends on a static library,
@samp{old_archive_from_new_cmds} contains the commands used to create that
@ -6345,7 +6351,7 @@ trick$ chmod +x libtool
trick$ libtool --version
ltmain.sh (GNU @@PACKAGE@@@@TIMESTAMP@@) @@VERSION@@
Copyright (C) 2009 Free Software Foundation, Inc.
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
trick$
@ -6370,6 +6376,4 @@ order to test new changes without having to rerun @code{configure}.
@printindex cp
@c summarycontents
@contents
@bye

View File

@ -315,6 +315,10 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
# Same as above, but do not quote variable references.
double_quote_subst='s/\(["`\\]\)/\\\1/g'
# Sed substitution that turns a string into a regex matching for the
# string literally.
sed_make_literal_regex='s,[].[^$\\*/],\\\\&,g'
# Re-`\' parameter expansions in output of double_quote_subst that were
# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
# in input to double_quote_subst, that '$' was protected from expansion.

View File

@ -1420,7 +1420,7 @@ func_mode_finish ()
if test -n "$libs"; then
if test -n "$lt_sysroot"; then
sysroot_regex=`$ECHO "$lt_sysroot" | $SED 's/[].[^$\\*/]/\\\\&/g'`
sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
else
sysroot_cmd=
@ -2356,7 +2356,7 @@ func_cygming_dll_for_implib ()
func_cygming_dll_for_implib_fallback_core ()
{
$opt_debug
match_literal=`$ECHO "$1" | $SED 's/[].[^$\\*|]/\\\\&/g'`
match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
$OBJDUMP -s --section "$1" "$2" 2>/dev/null |
$SED '/^Contents of section '"$match_literal"':/{
# Place marker at beginning of archive member dllname section
@ -8013,6 +8013,14 @@ EOF
len=$func_len_result
if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
cmds=$old_archive_cmds
elif test -n "$archiver_list_spec"; then
func_verbose "using command file archive linking..."
for obj in $oldobjs
do
$ECHO "$obj"
done > $output_objdir/$libname.libcmd
oldobjs=" $archiver_list_spec$output_objdir/$libname.libcmd"
cmds=$old_archive_cmds
else
# the command line is too long to link in one step, link in parts
func_verbose "using piecewise archive linking..."

38
libltdl/m4/libtool.m4 vendored
View File

@ -1346,14 +1346,42 @@ need_locks="$enable_libtool_lock"
])# _LT_ENABLE_LOCK
# _LT_PROG_AR
# -----------
m4_defun([_LT_PROG_AR],
[AC_CHECK_TOOLS(AR, [ar], false)
: ${AR=ar}
: ${AR_FLAGS=cru}
_LT_DECL([], [AR], [1], [The archiver])
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
[lt_cv_ar_at_file=no
AC_COMPILE_IFELSE([[int some_variable = 0;]],
[echo conftest.$ac_objext > conftest.lst
am_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst'
AC_TRY_EVAL([am_ar_try])
if test "$ac_status" -eq 0; then
lt_cv_ar_at_file=@
fi
rm -f conftest.* libconftest.a
])
])
if test "x$lt_cv_ar_at_file" = xno; then
archiver_list_spec=
else
archiver_list_spec=$lt_cv_ar_at_file
fi
_LT_DECL([], [archiver_list_spec], [1],
[How to feed a file listing to the archiver])
])# _LT_PROG_AR
# _LT_CMD_OLD_ARCHIVE
# -------------------
m4_defun([_LT_CMD_OLD_ARCHIVE],
[AC_CHECK_TOOL(AR, ar, false)
test -z "$AR" && AR=ar
test -z "$AR_FLAGS" && AR_FLAGS=cru
_LT_DECL([], [AR], [1], [The archiver])
_LT_DECL([], [AR_FLAGS], [1])
[_LT_PROG_AR
AC_CHECK_TOOL(STRIP, strip, :)
test -z "$STRIP" && STRIP=:

View File

@ -130,6 +130,7 @@ func_get_config "objext
objdir
CC
host
host_os
host_alias
build
build_alias" "$LIBTOOL --config" ": fatal"
@ -351,6 +352,15 @@ m4dir=$srcdir/libltdl/m4
auxdir=$srcdir/libltdl/config
scripts="$auxdir/ltmain.m4sh $srcdir/libtoolize.m4sh"
# On AIX, shared libraries remain loaded in memory after use if they
# are world-readable, until root issues slibclean. On NFS, this causes
# a testsuite rerun to fail to clean up test group directories. Avoid
# this with a suitable umask. Do not do this on other systems, for
# example HP-UX suffers unless shared libraries are mode 555.
case $host_os in
aix*) umask o-rwx ;;
esac
func_msg "Running $progname"
# Local Variables:

View File

@ -24,7 +24,7 @@
AT_SETUP([versioning])
AT_KEYWORDS([libtool])
eval "`$LIBTOOL --config | $EGREP '^(objdir)='`"
eval "`$LIBTOOL --config | $EGREP '^(objdir|host_os)='`"
# Setup some library and program sources:
# a library (a1), a new revision (a2), a compatible update (a3),
@ -91,14 +91,6 @@ int main (void)
}
]])
AT_DATA([prog3.c], [[
extern int a (void), internal_detail;
int main (void)
{
return a () + internal_detail - 42;
}
]])
inst=`pwd`/inst
libdir=$inst/lib
@ -109,7 +101,7 @@ mkdir $inst $libdir $bindir
for file in liba1.c liba2.c liba3.c liba4.c libb.c; do
$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file
done
for file in prog1.c prog2.c prog3.c; do
for file in prog1.c prog2.c; do
$CC $CPPFLAGS $CFLAGS -c $file
done
@ -235,6 +227,11 @@ AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba4.lo ]dnl
# available, so test_uninstalled will not necessarily work here any more.
AT_CHECK([$LIBTOOL --mode=install cp liba.la $libdir], [], [ignore], [ignore])
AT_CHECK([$LIBTOOL --mode=clean rm -f liba.la], [], [ignore], [ignore])
# This test does not work on AIX, not even with runtimelinking, because
# the linker always records the unversioned name as dependency.
AT_CHECK([:; case $host_os in aix*) exit 77;; esac])
test_installed