* m4/argz.m4: Bump serial to 6.
* m4/libtool.m4: Bump serial to 58.
* m4/ltdl.m4: Bump serial to 19.
* m4/ltoptions.m4: Bump serial to 8.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Since commit [1] libtool tries to set a 64-bits target for GNU
ld. However, it does so wrongly for x86_64-pc-solaris2.*
targets, causing libtool to believe the linker is called
ld_sol2. There is no such thing, and it obviously breaks
things further down. Some people wrongly assume there is
supposed to be an ld_sol2 on their systems, e.g. [2].
I think the original change is fragile, because it assumes it
has all CHOSTs matched, then appends _sol2. In the wild,
people have used amd64-pc-solaris2* too, so perhaps it would
be safer if the code only appended _sol2 if there is actually
an explicit target set.
Anyhow, since the 64-bits sparc target is called sparc64-* or
sparcv9-*, the sparc case is already correctly handled, so in
the attached patch, I just added an x86_64-* case, although I
could imagine relaxing the i?86 case to *86*-pc-solaris2* too.
In any case, defaulting to a linker called ld_sol2 is wrong.
[1] http://lists.gnu.org/archive/html/libtool-commit/2011-02/
msg00000.html
[2] http://osdyson.org/issues/8
Copyright-paperwork-exempt: Yes
ld from crosstool-NG reports a version string with an extra
version number in a parenthetical note:
GNU ld (crosstool-NG 1.13.0) 2.21.1
This made libtool assume that the ld version was the
crosstool-NG version (1.13.0) instead of the real ld version
(2.21.1).
To fix the ld version string, this patch filters out any string
between parentheses that is followed by a space.
Because of this bug, filtering of exported symbols was not
taking place with crosstool-NG toolchains.
This issue has bee noticed when building pango, which exported
harfbuzz symbols that should have remained hidden.
Copyright-paperwork-exempt: Yes
* m4/libtool.m4: Since we know that all TPF builds are cross-
builds, do not attempt to run linker tests during config. Use
known constants instead, since we know how dlopen() is
implemented.
(This addresses http://bugs.debian.org/663945. See there for
more-detailed discussion.)
tcc gained support for "-Wl,-rpath -Wl,<directory>" in its
commit 7fb0482a ("Support linker options passed in several -Wl
param", 2012-03-14) but libtool doesn't know to use it. Teach
it.
Without this change, running "make check" on MPFR when it has
been built with tcc and shared libraries doesn't work because
libtool generates a -rpath option, which tcc doesn't support.
Copyright-paperwork-exempt: Yes
This patch fixes so help output is formatted similar with
other macros using AS_HELP_STRING. Also it outputs '[=DIR]'
as I suspect intended rather than '=DIR'.
Pretty much all changes to Haiku for Libtool have been
upstreamed, however we currently have an incorrect value for
shlibpath_overrides_runpath. It should be "no" instead of
"yes".
Previously Scott McCreary had submitted patches for us, but I
told him I would work to get this committed, as he is quite
busy lately.
Here is a commit he made to our Haiku Ports site though, that
shows the exact change I am proposing done against Libtool
2.4.2.
http://ports.haiku-files.org/browser/haikuports/sys-devel/
libtool/patches/libtool-2.4.2.patch
Copyright-paperwork-exempt: Yes
This patch adds proper Android support to libtool. The main
issues are the following:
- Versioned libraries are not supported by the platform and
its build/packaging tools.
- The dynamic linker is not GNU ld, there is no support for
DT_RUNPATH.
- Similarly, there is no ldconfig.
Alan Modra hints in [1] that -print-search-dirs was fixed in
GCC 4.2(?), so that it nowadays automatically appends
-print-multi-os-directory for the applicable directories. I.e.
it should no longer be necessary for libtool to append a second
../lib64 when GCC has already done so. Also, the multi-os
appending loop seems to have been added specifically for early
(arguably broken) bi-arch enabled GCCs that printed -m32
directories even though -m64 was the default [2]. So, my
conclusion is that we want any libtool magic to affect
-print-search-dirs output from contemporary GCCs as little as
possible, while continuing to append the
-print-multi-os-directory for the legacy case.
Fixes bug#15321 reported by Ozkan Sezer.
[1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20425
[2] http://lists.gnu.org/archive/html/bug-libtool/2006-09/msg00019.html
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): If any of the
directories printed by -print-search-dirs ends with the
content of -print-multi-os-directory, then assume that
GCC adds the multi-os-directory where appropriate all by
itself and hence don't try to second guess when to add
it manually.
* THANKS: Update.
m4/libtool.m4 (_LT_ENABLE_LOCK): Select the n32 or n64 ABI when
linking to match the ABI produced with the user's compiler flags.
Co-authored-by: Gary V. Vaughan <gary@gnu.org>
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* m4/libtool.m4 (_LT_ENABLE_LOCK): enhance comments to explain
why the code looks odd with 32bit flags in the 64bit section and
vice versa.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* m4/libtool.m4: fix refixed badly unmangled hunks from earlier
powerpc*le changeset.
Reported by Peter Rosin.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
libtool (_LT_ENABLE_LOCK): make inner case branch expressions
consistent with outer case expression.
Reported by Peter Rosin.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
The current code tries to locate a compatible nm tool. It starts with
a prefixed nm tool (great!) and includes a plain nm too (that's fine).
The problem is that the code searches for the prefixed nm before the
plain nm (normally fine), but doesn't break once it has found a valid
match, and the plain nm ends up the winner.
Report and analysis by Mike Frysinger.
* m4/libtool.m4 (LT_PATH_NM): Break all the way out on a good match.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
Resolves bug#13414. Problem reported by Erik van Pienbroek
and Martin Doucha.
build-aux/ltmain.in (func_mode_link): Factor out the test if a
given symbol file is a module-definition (.def) file into...
(func_dll_def_p): ...this function, which also improves the check.
m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG)
<cygwin, mingw, pw32, cegcc>: Similarly, factor out the test if
a given symbol file is a module-definition (.def) file into...
(_LT_DLL_DEF_P): ...this macro, which also improves the check.
tests/export-def.at: New test.
Makefile.am (TESTSUITE_AT): Add above test.
NEWS: Update.
THANKS: Update.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
This is in preparation for the next change, which will preserve
tabs when the *_cmds variables are evaluated. Removing tabs first
ensures that the libtool output stays the same when tabs are not
collapsed with surrounding whitespace.
m4/libtool.m4: Convert indenting tabs to spaces for all *_cmds
variables.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG) [MSVC]
<archive_expsym_cmds>: When the symbol list isn't really a symbol list,
but instead a .def file, copy it to a file with .def extension so that
MSVC recognizes it as a module-definition file and feed it verbatim.
NEWS: Update
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
* m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG) [MSVC]
<archive_expsym_cmds>: Make the sed programs easier to read (and
recover some backslashes for later in the process).
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
m4/libtool.m4 (_LT_LANG_CXX_CONFIG) [Solaris] <archive_cmds>: Drop
$LDFLAGS as it is a user variable that is usually used when invoking
libtool. As such, it should not be used by libtool when it invokes the
toolchain as it contains options intended for libtool, not the
toolchain. Fixes export.at and other tests that add -no-undefined to
LDFLAGS.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
Tested-by: Richard Palo <richard.palo@baou.fr>
m4/libtool.m (_LT_LANG_CXX_CONFIG) [Solaris] <archive_expsym_cmds>: Feed
-h $soname to the linker just as is done in archive_cmds.
THANKS: Update.
Copyright-paperwork-exempt: Yes
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
* m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS) [dumpbin]: Adjust
lt_cv_sys_global_symbol_to_cdecl so that it declares imported
data symbols as __declspec(dllimport). Adjust
lt_cv_sys_global_symbol_to_c_name_address and
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix so that they
fill in "(void*) 0" for imported data symbols. Add new
lt_cv_sys_global_symbol_to_import which finds imported data
symbols if non-empty and export this variable to the libtool script
in the global_symbol_to_import variable. Adjust
lt_cv_sys_global_symbol_pipe so that data imports can be located.
* build-aux/ltmain.in (func_generate_dlsyms): When data imports
are present, as indicated by global_symbol_to_import, generate
a relocation function lt_syminit that fills in the addresses
of data imports at runtime and point to the new function with a
new virtual @INIT@ entry in the symbol list.
* libltdl/loaders/preopen.c (add_symlist): Look for the virtual
@INIT@ symbol (i.e. lt_syminit) and call it.
(vm_sym): Step past the @INIT@ symbol, if present.
* tests/demo.at (dlmain.c): Call the @INIT@ symbol, if present.
* NEWS: Update.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
Since it is safe for $lt_cv_sys_global_symbol_to_cdecl to match
with a simple /^T .* .*$/ type expression, it is ok for the other
transformations as well. At least if you require at least one
$symcode at the start of the line, so that the just generated output
doesn't match the next sed expression.
* m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Unify the matching expressions
in the sed programs that transform the extracted symbol lines.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
* m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Break up long lines when
assigning the sed scripts that transform the extracted symbol lines.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
Modern GNU ASCII quoting in output and comments is done
'like this'.
* cfg.mk (sc_old_style_quoting): Try to catch most instances
of `old style quoting' so that it is not accidentally re-
introduced to the code.
* HACKING, Makefile.am, NEWS, PORTING, README, TODO, bootstrap,
bootstrap.conf, build-aux/edit-readme-alpha,
build-aux/git-hooks/commit-msg, build-aux/ltmain.in,
doc/libtool.texi, gl/build-aux/bootstrap.in,
gl/build-aux/extract-trace, gl/build-aux/funclib.sh,
gl/build-aux/inline-source, gl/build-aux/options-parser,
libltdl/libltdl/slist.h, libltdl/loaders/loadlibrary.c,
libltdl/ltdl.c, libltdl/slist.c, libtoolize.in, m4/argz.m4,
m4/libtool.m4, m4/ltdl.m4, m4/ltoptions.m4, m4/ltsugar.m4,
tests/cmdline_wrap.at, tests/configure-iface.at, tests/demo.at,
tests/depdemo.at, tests/deplib-in-subdir.at,
tests/deplibs-mingw.at, tests/destdir.at, tests/execute-mode.at,
tests/f77demo.at, tests/fail.at, tests/inherited_flags.at,
tests/libtool.at, tests/libtoolize.at, tests/lt_dladvise.at,
tests/lt_dlexit.at, tests/mdemo.at, tests/need_lib_prefix.at,
tests/old-ltdl-iface.at, tests/old-m4-iface.at, tests/static.at,
tests/stresstest.at, tests/testsuite.at, tests/versioning.at:
Convert to upright quotes.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS) [MSVC]: Extract symbols
imported from DLLs by import libraries in the Microsoft dumpbin
wrapper.
(LT_PATH_NM): Add -headers option if dumpbin is the located name
lister to feed the above new code.
* NEWS: Update.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
* m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD) [MSVC]: Use
func_win32_libid as file_magic_cmd when the name lister
is MS dumpbin.
(_LT_CMD_GLOBAL_SYMBOLS): Export the new veriable nm_interface
to the libtool script.
* build-aux/ltmain.in (func_cygming_gnu_implib_p)
(func_cygming_ms_implib_p): Move up to before...
(func_win32_libid): ...which now uses them to determine if
the object is an import library when the nm_interface is
"MS dumpbin".
* NEWS: Update.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
If an object has a symbol lacking an expected leading underscore,
the symbol name is not printed, but the symbol type is, leading
to output such as:
T _normal _normal
T T _another _another
when the expected output would have been something like:
T _normal _normal
T no_underscore no_underscore
T _another _another
However, symbols lacking an expected leading underscore are
not "real" symbols, they are internal symbols which we don't
care about, therefore drop them instead.
* m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS) [MSVC]: Output the whole
symbol line in one go.
* NEWS: Update.
No need for a spurious space before a command ending semi-colon.
* cfg.mk (sc_prohibit_space_semicolon): New test to catch
accidental reintroduction of spurious spaces removed by this
changeset.
* bootstrap, build-aux/general.m4sh, build-aux/ltmain.m4sh,
libltdl/lt__strl.c, m4/libtool.m4, m4/ltdl.m4, tests/bindir.at:
Remove spurious spaces.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.m4sh (func_mode_link): Reverse the branch
order for an if statement for readability.
* m4/libtool.m4: Likewise.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* build-aux/ltmain.m4sh (func_mode_link): Save test invocations
by using 'test x,y = "$a,$b"' instead of 'test x = "$a" && test y
= "$b"'.
* m4/libtool.m4: Likewise.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
See maintain.texi (Copyright Notices) for rules for maintaining
the years in copyright notices.
* All Files (Copyright): Updated with missing 2011 and 2012.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>