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>
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>
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.
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.
The syntax checks might trip over problems in the gnulib code itself
when scanning the local patches. Since it's unlikely these checks
will find anything useful, just disable them for the gl/ patches.
* cfg.mk (VC_LIST_ALWAYS_EXCLUDE_REGEX): Ignore ^gl/.
GNU indent will reformat a bunch of files in a way that's broken or
incorrect, so disable the check until we can find a way to workaround
this. Unfortunately, the indent check is enforced at `make distcheck`
time if GNU indent is installed, so it can't simply be ignored.
* cfg.mk (local-checks-to-skip): Add sc_indent.
GNU indent does not process this well, and nothing else in the tree
uses this convention, so drop it.
(GNU indent is enforced by gnulib when running `make distcheck`.)
* libltdl/ltdl.c: Delete ^L.
* libltdl/ltdl.h: Likewise.
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>
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.
* -fdiagnostics-color: who doesn't like color? No reason to strip it. This
makes the link phase stick out like a sore thumb if there's warnings emitted.
* -frecord-gcc-switches: we use it in Gentoo to check if a package respects
*FLAGS. Note that we do not need to include -grecord-gcc-switches explicitly
here as -g* is already whitelisted.
* build-aux/ltmain.in: Handle -fdiagnostics-color* & -frecord-gcc-switches.
When use automake to generate Makefile.in from Makefile.am, there
comes below race:
| configure.ac:45: error: required file 'config-h.in' not found
It is because the file config-h.in in updating process by autoheader,
so make automake run after autoheader to avoid the above race.
* Makefile.am: Have $(lt_Makefile_in) depend on $(lt_config_h_in).
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
autoheader will update ../libtool-2.4.6/libltdl/config-h.in which
autoconf needs, so there comes a race sometimes as below:
| configure.ac:45: error: required file 'config-h.in' not found
| touch '../libtool-2.4.6/libltdl/config-h.in'
So make sure autoheader run before autoconf to avoid this race.
* Makefile.am: Have $(lt_configure) depend on $(lt_config_h_in).
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
"-fno-sanitize*" options e.g. -fno-sanitize=alignment
or -fno-sanitize-recover=all are used to tune the behvior of
sanitizers in GCC/clang. Let libtool pass these options
to compiler similar to fsanitize=*.
* build-aux/ltmain.in: Handle -fno-sanitize*.
Signed-off-by: Manoj Gupta <manojgupta@google.com>
Re-declaring _putenv() without _CRTIMP in strict ANSI mode when using
MinGW resulted in a warning because of a conflict with the previous
declaration that did use _CRTIMP.
Simply add _CRTIMP to our declaration to avoid it.
* build-aux/ltmain.in (func_emit_cwrapperexe_src): Add _CRTIMP to
_putenv() declaration.
Signed-off-by: Vadim Zeitlin <vz-libtool@zeitlins.org>
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.
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.
This is intented to link against shared and static sanitizer
runtimes with Clang.
* build-aux/ltmain.in: Pass '-shared-libsan' and '-static-libsan'
flags when linking.
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Include <string.h> for the strcmp function. This improves C99
compiler compatibility because it avoids an implicit function
declaration.
* tests/lt_dlopen_a.at: Include string.h.
This fixes some other regular expressions that GNU grep 3.8 does not
warn about (I found them with an even-pickier 'grep').
I did not look systematically for all portability bugs of this form.
Url: https://savannah.gnu.org/patch/index.php?10282
* tests/cdemo.at (allow_undefined_flag):
Prefer } to \} in EREs, as \} is not portable.
* tests/libtool.at (quote shell meta-characters in filenames):
Prefer ] to \] in BREs, as \] is not portable.
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.
`test set = set = set` is invalid, as is `test set = = set`.
Tweak the code to what was probably intended.
* build-aux/git-hooks/commit-msg: Fix $ECHO test call.
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.
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.
* 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.