Commit Graph

388 Commits

Author SHA1 Message Date
Brad Smith
1ae386ba78 libtool: remove OpenBSD specific performance hack for ranlib
The -t flag was used as a performance hack for ranlib. The flag was
supported by the GNU toolchain, but is a no-op with the LLVM toolchain.

* m4/libtool.m4: Remove use of -t flag with ranlib.
2024-01-16 20:52:26 -05:00
Raul E Rangel
f81f36e4e9 libtool: Use $LD when checking for --whole-archive
Using `$CC -print-prog-name=ld` will always use the `ld` linker. We
should instead be using the $LD variable so that we use the proper
linker.

There is already another part of the code that does this same check,
so I just copy/pasted the if line.

* m4/libtool.m4: Change `$CC -print-prog-name=ld` to $LD.

Url: https://savannah.gnu.org/support/?110978
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
2024-01-16 15:28:57 -05:00
Brad Smith
5a7193dbfb libtool: remove bitrig support.
Bitrig has been defunct for 7 years.

* build-aux/ltmain.in (func_mode_link): Remove bitrig support.
* m4/libtool.m4 (_LT_CMD_OLD_ARCHIVE, LT_CMD_MAX_LEN)
(_LT_SYS_DYNAMIC_LINKER, _LT_CHECK_MAGIC_METHOD)
(_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG): Ditto.
* m4/ltdl.m4 (LT_SYS_DLOPEN_DEPLIBS): Ditto.
* NEWS: Updated.
2024-01-16 15:11:38 -05:00
Olly Betts
81e8abf3dd
libtool: use -Fe with MSVC to specify filename
This avoids a deprecation warning with current versions of MSVC, by
replacing the -o flag with -Fe. -Fe is documented as supported at
least as far back as Visual C 6.0 which was released in 1998.

* m4/libtool.m4: Use -Fe instead of -o to specify DLL output filename
for MSVC.

Signed-off-by: Olly Betts <olly@survex.com>
2024-01-16 20:43:00 +02:00
Xiang.Lin
4da5b57531
libtool: fix empty "-L" in compiler_lib_search_path
If the compiler places a space between "-L" and the path, the path will
be skipped and only an empty "-L" will appear in the final
compiler_lib_search_path. This will cause the first library in postdeps
following compiler_lib_search_path to be accidentally skipped.

* libtool.m4: Fixed string comparison by adding missing 'x's.
2024-01-16 19:47:20 +02:00
Bruno Haible
47c71f61df
Fix shared library support on Android.
This patch fixes two problems:
1) A libtool library created with the -release option and no -version-info
   option was, when built with --enable-shared, installed without the
   symlink libNAME.so -> libNAME-RELEASE.so. This led to subsequent failures
   during "make install" of shared libraries that depend on it.
2) Executables were created without a RUNPATH property. These executables
   then did not find their shared libraries when run.

* m4/libtool.m4: On Android, fix library_names_spec and
hardcode_libdir_flag_spec.
2024-01-15 22:58:56 +02:00
Richard Purdie
bd826173c4 libtool.m4: For reproducibility stop encoding hostname in libtool script
For reproducibility, stop encoding the hostname into the libtool script,
this isn't really adding much to debugging and most distros are carrying
such a patch now as reproducibility is important.

* m4/libtool.m4: Delete call to hostname & uname.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-14 02:11:35 -05:00
Gilles Gouaillardet
33d4b69fcc libtool: Add support for flang (Fortran LLVM-based) compilers
This patch adds support for flang compilers.  Some specific flags
are needed so these compilers must be handled in a specific way.
By default, the compiler is called 'flang', but ARM releases their
own flang-based compiler called 'armflang'.

Because of the current lack of flang support in libtool, the
generated 'libtool' must be manually modified after 'configure' is
invoked.  Such a process is for example described on ARM web site
(it involves the Open MPI library).

Url: https://savannah.gnu.org/patch/?9442

* m4/libtool.m4: Handle *flang.
2024-01-14 02:07:38 -05:00
Mike Frysinger
22406ebb83 maint: extend release version hook to cover config.lt
* cfg.mk: Extend rule to cover config.lt.
* m4/libtool.m4: Update copyright year.
2024-01-14 01:10:32 -05:00
Jakub Wilk
9ced107b8c libtool.m4: fix typos
* m4/libtool.m4: Fix various typos.
2024-01-14 01:03:54 -05:00
Samuel Thibault
7464f1db29 libtool: hurd-amd64 support
This adds support for passing -m elf32_x86_64 vs -m elf_x86_64 to the
linker on hurd-amd64.

Url: https://savannah.gnu.org/patch/?10398

* m4/libtool.m4: dd x86_64-gnu* case to pass -m elf32_x86_64 vs
-m elf_x86_64 to linker.
2024-01-14 00:48:00 -05:00
Bruno Haible
9e7b9631ec Recognize *-*-windows* config triplets
The gnuconfig project recognizes windows* as a host OS to denote native
Windows environments.  The commit message makes it sound like LLVM and
Crablang communities will use the 'windows' value, whereas GNU will
continue to use 'mingw'. But I think it's only a matter of time until
people start to pass the option --host=x86_64-pc-windows to configure
scripts. We should be prepared for that.

Url: https://savannah.gnu.org/patch/?10387

* build-aux/ltmain.in: Treat windows* as equivalent to mingw*.
* m4/libtool.m4: Likewise.
* m4/ltdl.m4: Likewise.
* m4/ltoptions.m4: Likewise.
* tests/bindir.at: Likewise.
* tests/deplibs-mingw.at: Likewise.
* tests/lt_dladvise.at: Likewise.
* tests/testsuite.at: Likewise.
2024-01-14 00:41:20 -05:00
Paul Eggert
eb2a21cf2e libtool: port to GNU grep 3.8
GNU grep 3.8 warns about some regular expressions that POSIX says have
undefined effect, e.g., '\-'.  Unfortunately Libtool uses regular
expressions of this form.  Some unittests now fail, e.g. link-order.at:

--- /dev/null
+++ .../libtool/tests/testsuite.dir/at-groups/66/stderr
@@ -0,0 +1,4 @@
+/bin/grep: warning: stray \ before /
+/bin/grep: warning: stray \ before /
+/bin/grep: warning: stray \ before /
+/bin/grep: warning: stray \ before /

Url: https://savannah.gnu.org/patch/index.php?10282

* m4/libtool.m4 (_LT_LANG_CXX_CONFIG): Do not use \- in a BRE or ERE,
as this produces undefined results that GNU grep 3.8 warns about.
Use [-] instead.
* tests/link-order.at (Link order test): Similarly, do not use
\/ in an ERE; use / instead.
2024-01-13 22:56:10 -05:00
Mike Frysinger
96dafbda93 maint: add hook to automate release version updates
Fixes libtool bug https://bugs.gnu.org/67588.

Automate the process to avoid it falling stale again in the future,
and then refresh here to get in sync.

* cfg.mk: Add rule to update libtool.m4 release version.
* m4/libtool.m4: Update release year.
2024-01-12 02:09:28 -05:00
Uwe Kleine-König
64bef5ba65 libtool: Use AC_CHECK_PROG instead of AC_CHECK_TOOL to find "file"
This fixes a warning when cross-building:

	checking for arm-v7a-linux-gnueabihf-file... no
	checking for file... file
	configure: WARNING: using cross tools not prefixed with host triplet

file isn't platform specific and not usually installed with a host
triplet. So use AC_CHECK_PROG which differs from AC_CHECK_TOOL by not
expecting such a host triplet prefix.

* m4/libtool.m4 (_LT_DECL_FILECMD): Change AC_CHECK_TOOL to AC_CHECK_PROG.
2024-01-12 01:37:17 -05:00
Mike Frysinger
85093d697a maint: update copyrights across project 2024-01-12 01:35:32 -05:00
Alex Ameen
6132006b5f
Revert "libtool: permit compiler libs in shlibs"
This reverts commit 1d2577357e.
2022-05-16 00:07:17 -05:00
Alex Ameen
1d2577357e
libtool: permit compiler libs in shlibs 2022-05-08 21:46:30 -05:00
Alex Ameen
28fbcb6a9a libtool: correct linter syntax complaints in M4
* m4/libtool.m4: remove unnecessary braces on variable derefence.
* m4/ltargz.m4: change quote style for inline comment.
2022-02-08 13:44:03 -06:00
Alex Ameen
7e69e44199 gnulib: update submodule to new repository.
* configure.ac: Update autoconf requirement for bootstrapping to 2.64.
* README.md: Update note concerning autoconf version requirement.
* bootstrap: Propogate change to GPL license from GPL 3 to GPL 2.
2022-02-08 13:32:47 -06:00
Alex Ameen
2dc7dad770 maint: update copyrights across project. 2022-02-08 12:11:10 -06:00
Alex Ameen
f51eddf0db * libtool: Bump M4 serial versions and add missing AC_PROG_SED to ltdl.m4
* m4/libtool.m4: bump serial version ( covers entire release ).
* m4/ltargz.m4: bump serial version ( covers entire release ).
Add AC_PROG_SED requirement to LT_FUNC_ARGZ.
* m4/ltdl.m4: bump serial version ( covers entire release ).
2021-11-29 21:43:26 -06:00
Václav Haisman
ccc878dd72 libtool: replace raw invocations of sed with $SED
* build-aux/ltmain.in: replace raw invocations of sed with $SED
* m4/libtool.m4: replace raw invocations of sed with $SED
* m4/ltargz.m4: replace raw invocations of sed with $SED
* m4/ltdl.m4: replace raw invocations of sed with $SED

Co-authored-by: Alex Ameen <alex.ameen.tx@gmail.com>
Copyright-paperwork-exempt: Yes
2021-11-29 20:37:49 -06:00
Lucas Holt
5df7dd49d5 libtool: add support for MidnightBSD
* build-aux/ltmain.in: clone link-mode handling for MidnightBSD from FreeBSD
* m4/libtool.m4: clone various TAGVARs for MidnightBSD from FreeBSD
* m4/ltdl.m4: clone dlopen handling for MidnightBSD from FreeBSD

Copyright-paperwork-exempt: Yes
2021-11-29 18:54:09 -06:00
Ryan Schmidt
8f4bdbda0a libtool: powerpc 10.5 detection without a deployment target
* m4/libtool.m4: properly set "allow undefined" flag for darwin powerpc 10.5
even if deployment target is unset

Copyright-paperwork-exempt: Yes
2021-11-21 21:06:50 -06:00
Jeremy Huddleston Sequoia
9e8c882517 libtool: support macOS 11
Fixes bug#44605

* m4/libtool.m4: '_LT_REQUIRED_DARWIN_CHECKS' sets proper "allow undefined" flag
for particular macOS versions and powerpc.

Copyright-paperwork-exempt: Yes
2021-11-21 20:36:34 -06:00
Vincent Lefevre
0904164dd5 libtool: correct m4 quoting in sed expression
* m4/libtool.m4: properly escape character set in sed expression

Copyright-paperwork-exempt: Yes
2021-11-21 19:59:54 -06:00
Alex Ameen
da2e352735 libtool: replace some references to /usr/bin/file and /bin/sh
* build-aux/ltmain.sh: use '/usr/bin/env sh' in shebang
* libtoolize.in: use '/usr/bin/env sh' in shebang
* m4/libtool.m4: 'FILECMD' to replace use of '/usr/bin/file'
2021-11-20 14:37:05 -06:00
aakropotkin
0c1bc69dac maint: update copyrights across project.
* AUTHORS: Correct manually modified copyright to be consistent with
other files.
2021-11-14 22:37:22 -06:00
Pavel Raiskup
544fc0e2c2 maint: update bootstrap, gnulib, copyright dates
* gnulib: Update to the latest git version.
* gl-mod/bootstrap: Likewise.
* bootstrap: Regenerate.
2019-03-13 15:38:36 +01:00
Pavel Raiskup
b88cebd510 maint: update bootstrap, gnulib, copyright dates
* gnulib: Update to the latest git version.
* gl-mod/bootstrap: Likewise.
* bootstrap: Regenerate.
* gl/top/README-release.diff: Update the patch for the latest
changes in gnulib's README-release.
2018-07-24 09:06:44 +02:00
Alexander Shevchenko
99bd0948e2 libtool: add icl.exe support
A logical continuation of Automake commit
c40e27e1c2a60f58e72e65d73d808f782d55494a to provide
Windows ICC support similar as already done for MSVC.

Resolves bug 26484.

* m4/libtool.m4: Treat icl.exe equivalently to cl.exe.

Copyright-paperwork-exempt: Yes
2018-07-12 11:46:53 +02:00
Pavel Raiskup
792b680701 maint: update copyright years
Also sync gnulib & bootstrap git submodules.

* gnulib, gl-mod/bootstrap: Move to latest git versions.
* bootstrap: Regenerate.
* all files: Bump years by 'make update-copyright'.
2017-04-21 16:56:19 +02:00
KO Myung-Hun
a938703c46 libtool: set file_list_spec to '@' on OS/2
Creating and linking reloadable objects sometimes fail.

* m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG) <os2-*>:
Set file_list_spec to '@'.
2016-02-25 09:56:52 +01:00
Pavel Raiskup
d7c8d3b43f m4/libtool.m4: FreeBSD elftoolchain strip support
References:
http://savannah.gnu.org/patch/?8675
Message-Id: <20150523-002056.sv85487.59958@savannah.gnu.org>

* m4/libtool.m4 (_LT_CMD_STRIPLIB): Remove the redundant tests for
empty $old_striplib and $striplib.  Move the test for empty $STRIP
variable up. Allow elftoolchain strip (with the same arguments we
used to have with GNU strip) on FreeBSD.
2016-02-19 10:21:15 +01:00
Pavel Raiskup
bb8e7b4a06 maint: update copyright years
Also update gnulib submodule as it contains updated copyright
years too.

* gnulib: Latest greatest git hash.
* all files: Run 'make update-copyright'.
2016-02-16 00:33:51 +01:00
David Edelsohn
d15b321427 m4/libtool.m4: export AIX TLS symbols
TLS symbols in AIX display a new, different symbol type in nm output.
Libtool explicitly creates a list of exported symbols for AIX shared
libraries using nm and does not recognize the new TLS symbols, so
those symbols are not exported in AIX shared libraries.

This is a regression for TLS support on AIX where TLS symbols or GCC
"emultls" symbols were listed as global data and exported.

This patch updates libtool.m4 export_symbols_cmds for AIX in two
locations so that global symbols labeled with "L" for TLS are included
in the export list.

* m4/libtool.m4 (export_symbols_cmds) [AIX]: Add global TLS "L" symbols.
Message-Id: <CAGWvnym+hhoQJfkr=cncPZMnnMQ=RVUH2Bpw6+tP2hgEmESAsA@mail.gmail.com>
2015-11-25 09:51:12 -07:00
Pavel Raiskup
418129bc63 ARFLAGS: use 'cr' instead of 'cru' by default
In some GNU/Linux distributions people started to compile 'ar'
binary with --enable-deterministic-archives (binutils project).
That, however, in combination with our previous long time working
default AR_FLAGS=cru causes warnings on such installations:
ar: `u' modifier ignored since `D' is the default (see `U')

The 'u' option (at least with GNU binutils) did small optimization
during repeated builds because it instructed 'ar' to not
open/close unchanged *.o files and to rather read their contents
from old archive file.  However, its removal should not cause a
big performance hit for usual workflows.

Distributions started using --enable-deterministic-archives
knowing that it would disable the 'u', just to rather have a bit
more deterministic builds.

Also, to justify this change a bit more, keeping 'u' in ARFLAGS
could only result in many per-project changes to override
Libtool's ARFLAGS default, just to silent such warnings.

Fixes bug#19967.  Reported by Eric Blake.

* m4/libtool.m4 (_LT_PROG_AR): Default AR_FLAGS to 'cr'.
(_LT_REQUIRED_DARWIN_CHECKS): Use $AR_FLAGS instead 'cru' string.
* doc/libtool.texi: Do 's/ar cru/ar cr/' in whole documentation.
* NEWS: Document.
2015-09-26 18:00:16 +02:00
Pavel Raiskup
4335de1dfb libool.m4: add ARFLAGS variable
Libtool has used $AR_FLAGS since 2000-05-29 commit
8300de4c54, Automake ARFLAGS since 2003-04-06 commit
a71b3490639831ca.  Even though ARFLAGS is younger, it sounds like
better name according GNU Coding Standards.

Related to bug#20082.

* m4/libtool.m4 (_LT_PROG_AR): Copy ARFLAGS value into AR_FLAGS
variable if AR_FLAGS is not set.  Add new _LT_DECL'ed variable
'lt_ar_flags' to keep the configure-time value of AR_FLAGS.  The
new 'lt_ar_flags' is to be used as the default value for AR_FLAGS
at libtool-runtime.
* NEWS: Document.
2015-09-26 18:00:13 +02:00
Pavel Raiskup
6c822af50f libtool: respect config.site LT_SYS_LIBRARY_PATH
Libtool generator code needs to remember the configure time
LT_SYS_LIBRARY_PATH content to allow config.status properly
instantiate default LT_SYS_LIBRARY_PATH libtool run-time value;
Thats because config.status has no idea what the contents of
config.site file is (by default).
* m4/libtool.m4 (_LT_CONFIG): Use the _LT_DECLared
$configure_time_lt_sys_library_path variable as the default for
LT_SYS_DLSEARCH_PATH at run-time.
(_LT_SYS_DYNAMIC_LINKER): Don't change ac_cv_* variable if it is
not necessary. New $configure_time_lt_sys_library_path variable.
* NEWS: Update.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2015-01-20 16:25:28 +00:00
Pavel Raiskup
edb4ff8bb6 libtool.m4: typofix, subst last '$' with quadrigraph
* m4/libtool.m4 (_LT_LIBTOOL_TAG_VARS): Encase the
configure/libtool shared function into parseable borders; for
testing purposes.
(func_munge_path_list): Typo s/$/@S|@/.
* tests/configure-funcs.at: New testcase.
* Makefile.am (TESTSUITE_AT): Mention new testcase.
* NEWS: Update.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2015-01-20 16:08:18 +00:00
Gary V. Vaughan
fda42eb8c6 maint: update copyright statements to include 2015.
* AUTHORS, HACKING, Makefile.am, NEWS, README.md, TODO,
bootstrap, bootstrap.conf, build-aux/edit-readme-alpha,
build-aux/git-hooks/commit-msg, build-aux/ltmain.in, cfg.mk,
configure.ac, 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/README, libltdl/configure.ac,
libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__argz_.h,
libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h,
libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h,
libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h,
libltdl/libltdl/lt_system.h, libltdl/libltdl/slist.h,
libltdl/loaders/dld_link.c, libltdl/loaders/dlopen.c,
libltdl/loaders/dyld.c, libltdl/loaders/load_add_on.c,
libltdl/loaders/loadlibrary.c, libltdl/loaders/preopen.c,
libltdl/loaders/shl_load.c, libltdl/lt__alloc.c,
libltdl/lt__argz.c, libltdl/lt__dirent.c, libltdl/lt__strl.c,
libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c,
libltdl/ltdl.h, libltdl/ltdl.mk, libltdl/slist.c, libtoolize.in,
m4/autobuild.m4, m4/libtool.m4, m4/ltargz.m4, m4/ltdl.m4,
m4/ltoptions.m4, m4/ltsugar.m4, m4/ltversion.in,
m4/lt~obsolete.m4, m4/m4.m4, tests/am-subdir.at,
tests/archive-in-archive.at, tests/bindir.at, tests/cdemo.at,
tests/cmdline_wrap.at, tests/configure-iface.at,
tests/convenience.at, tests/ctor.at, tests/cwrapper.at,
tests/darwin.at, tests/demo.at, tests/depdemo.at,
tests/deplib-in-subdir.at, tests/deplibs-ident.at,
tests/deplibs-mingw.at, tests/destdir.at, tests/dlloader-api.at,
tests/dumpbin-symbols.at, tests/duplicate_conv.at,
tests/duplicate_deps.at, tests/duplicate_members.at,
tests/early-libtool.at, tests/exceptions.at,
tests/execute-mode.at, tests/exeext.at, tests/export-def.at,
tests/export.at, tests/f77demo.at, tests/fail.at,
tests/fcdemo.at, tests/flags.at, tests/help.at,
tests/indirect_deps.at, tests/infer-tag.at,
tests/inherited_flags.at, tests/install.at,
tests/lalib-syntax.at, tests/libtool.at, tests/libtoolize.at,
tests/link-order.at, tests/link-order2.at, tests/loadlibrary.at,
tests/localization.at, tests/lt_dladvise.at, tests/lt_dlexit.at,
tests/lt_dlopen.at, tests/lt_dlopen_a.at, tests/lt_dlopenext.at,
tests/ltdl-api.at, tests/ltdl-libdir.at, tests/mdemo.at,
tests/need_lib_prefix.at, tests/no-executables.at,
tests/nocase.at, tests/nonrecursive.at, tests/old-ltdl-iface.at,
tests/old-m4-iface.at, tests/pic_flag.at, tests/recursive.at,
tests/resident.at, tests/runpath-in-lalib.at,
tests/search-path.at, tests/shlibpath.at, tests/slist.at,
tests/standalone.at, tests/static.at, tests/stresstest.at,
tests/subproject.at, tests/sysroot.at, tests/tagdemo.at,
tests/template.at, tests/testsuite.at, tests/versioning.at,
tests/with-pic.at: Update copyright statement to include 2015.
* cfg.mk: Adjust old_NEWS_hash accordingly.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2015-01-18 13:16:42 +00:00
Gary V. Vaughan
97f03a4379 libtool: check Sun Pro CXX ABI postdeps at libtool time.
* m4/libtool.m4 (_LT_PREPARE_CC_BASENAME): Factor cc_basename
calculation into a shell function...
(_LT_CONFIG_SAVE_COMMAND): ...and expand it into generated
libtool script.
(_LT_CC_BASENAME): Adjust accordingly.
(_LT_FUNC_SUNCC_CSTD_ABI): Remove from here...
* build-aux/ltmain.in (func_suncc_cstd_abi): ...and reimplement
here.
* m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS): Remove postdeps
augmentation from here...
* build-aux/ltmain.in (func_mode_link): ...and reimplement here
just before postdeps are added.
* NEWS: Update.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2014-12-12 18:35:45 +00:00
Gary V. Vaughan
b49ab52cb3 libtool: more carefully avoid automatic -Cstd -Crun on Sun Pro CXX.
* m4/libtool.m4 (_LT_FUNC_SUNCC_CSTD_ABI): New function factored out
of repeated code.  Take note of other known -Cstd incompatible
compiler flags.
(_LT_SYS_HIDDEN_LIBDEPS): Use it to determine whether -Cstd -Crun
can be safely added to postdeps with Sun Pro CXX.
* NEWS: Update.
* NO-THANKS: Add Marc Glisse.
Reported by Marc Glisse

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2014-12-12 15:01:01 +00:00
Gary V. Vaughan
4fede0bc49 libtool: take care not to double-apply LT_SYS_LIBRARY_PATH.
* m4/libtool.m4 (_LT_CONFIG_SAVE_COMMANDS): Copy configure-time
LT_SYS_LIBRARY_PATH settings as default, but allow run-time
override.
(_LT_SYS_DYNAMIC_LINKER): Save the unmunged
sys_lib_dlsearch_path_spec value, and use it for _LT_DECL,
but then munge it with LT_SYS_LIBRARY_PATH for use in ltdl.m4
macros, such as LT_SYS_DLSEARCH_PATH.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2014-12-12 11:44:21 +00:00
Pavel Raiskup
08279564ff libtool: support LT_SYS_LIBRARY_PATH for adjusting bad guesses.
Revert 8728e07 and 440fee6.
Some GNU/Linux distributions install libraries into /lib64 (or
/usr/lib64) on 64-bit machines, while /lib (/usr/lib
respectively) stays for multilib variant.  Other distributions
keep /usr/lib for 64-bit variant and reserve other directory for
multilib. Detection of what approach a given system uses is
difficult, however, especially because Glibc's ldconfig does not
report the full and correct list of search paths. Allow the user
to adjust Libtools heuristically determined search paths with
the new LT_SYS_LIBRARY_PATH environment variable at both
compile-time, when libtool is called, and at configure time.
* m4/libtool.m4 (_LT_PREPARE_MUNGE_PATH_LIST): Define a new
function to munge a libtool path list according to a user
supplied colon-delimited path.
(_LT_SYS_DYNAMIC_LINKER): Require _LT_PREPARE_MUNGE_PATH_LIST.
Mark LT_SYS_LIBRARY_PATH as precious to autoconf (to survive
automatic "autoreconf").
Call the new func_munge_path_list function on
sys_lib_dlsearch_path_spec - this propagates results to
generated libtool script.
(_LT_CONFIG): Expand _LT_PREPARE_MUNGE_PATH_LIST into generated
libtool script.
* build-aux/ltmain.in (func_mode_link): Call it to adjust
sys_lib_dlsearch_path according to LT_SYS_LIBRARY_PATH.
* doc/libtool.texi: Document new LT_SYS_LIBRARY_PATH.
* doc/notes.texi: Likewise.
* NEWS: Update.

References: http://thread.gmane.org/gmane.comp.gnu.libtool.general/8339/focus=8345
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2014-12-11 23:06:09 +00:00
Gary V. Vaughan
663f919241 maint: fix syntax-check failures.
* m4/m4.m4 (AC_PROG_GNU_M4): Reverse some test arguments for
sc_prohibit_test_const_follows_var.
Remove some spurious braces for
sc_useless_braces_in_variable_drefs.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2014-12-11 23:06:09 +00:00
Gary V. Vaughan
440fee60c9 libtool: s390x is also a 64bit glibc/ELF platform.
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LIB): Add s390x to glibc/ELF
compatible CPUs that have /lib64 and /usr/lib64 in
sys_lib_dlsearch_path_spec.
Reported by Pavel Raiskup

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2014-12-05 13:29:13 +00:00
Gary V. Vaughan
8727e07a16 libtool: for 64bit GNU arches, add /lib64 and /usr/lib64 to sys_lib_dlsearch_path.
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) <linux*, k*bsd*-gnu>
<kopensolaris*-gnu, gnu*>: If $host_cpu contains "64", add /lib64
and /usr/lib64 to sys_lib_dlsearch_path_spec.
Reported by Orion Poplawski, Christian Rössel, Olly Betts et. al.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2014-12-04 17:44:41 +00:00
Norihiro Tanaka
facce819e1 libtool: fix sys_lib_dlsearch_path_spec for ia64 HP-UX.
The run-time loader does not search /usr/local or subdirectories
by default on ia64 HP-UX.
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): Fix
sys_lib_dlsearch_path_spec for ia64 HP-UX.
* NEWS: Update.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2014-12-04 15:45:02 +00:00