This patch adds support for emscripten compiler for shared compilation.
* build-aux/ltmain.in: clone link-mode handling for emscripten from
unixware7.
* m4/libtool.m4: translate emscripten specific flags for shared module
building.
This hobbyist OS has already been added to `config.sub` (and
`config.guess` respectively) some time ago, but was still lacking
upstream support for building libraries using libtool.
Since it is a relatively up-to-date system with ports of modern
software, "adding support" mostly just means adding empty cases to avoid
falling though to the most basic behavior (that guarantees compatibility
at the expense of disabling everything that might be critical).
* m4/libtool.m4: Add support for SerenityOS.
A space after '-Fe' treats a file name as an input file instead of
as the intended output file.
* m4/libtool.m4: Remove space after '-Fe'.
* NO-THANKS: Add Kirill Makurin for bug report 74175.
* NEWS: Update.
When generating an executable in OpenBSD, the executable fails to
generate when shlibpath_var, LD_LIBRARY_PATH, is used solely to
locate dependent libraries.
For hardcoding library paths in OpenBSD, see documentation for
hardcode_direct and hardcode_libdir_flag_spec.
* m4/libtool.m4: Update hardcode_shlibpath_var from 'no' to 'unsupported'
by removing 'with_gnu_ld=no' for OpenBSD.
The GCC/binutils tools support response files just fine, while
lld (impersonating GNU ld) only supports response files, not
linker scripts. Using a linker script as input just to pass a
list of files is overkill for cases when a response file is enough.
* build-aux/ltmain.in: Move creation of ld script.
* m4/libtool.m4: Add new variable tag for file_list_spec.
* NEWS: Update.
As said in the Autoconf source, the AC_TRY_EVAL macro is dangerous and
undocumented, and should not be used.
In particular, the one related to nm yields binary data in the config.log
file with dash, where "echo \\1" (echo with the argument \1) produces the
control character ^A instead of the usual \1 with most shells (POSIX says
that the result is implementation-defined). See:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910076
This patch attempts to replace this AC_TRY_EVAL occurrence by code with
similar behavior, but using $ECHO instead of echo in order to avoid the
backslash issue.
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21309
If $multilib is set to more than one word, the following error can be
seen during configuration:
test: too many arguments
* m4/libtool.m4: Wrap variable in quotes.
If `multilib` is unset (which it apparently is by default), the output
from running a `configure` script contains lines like the following:
```
checking dynamic linker characteristics... ../configure: line 26791: test: yes: unary operator expected
Win32 ld.exe
```
The additional output is not a fatal error. But it could be irritating.
Avoid the unexpected output from `test` by making sure `=` is used as a
binary operator.
* m4/libtool.m4: Prepend "x" on both sides of a comparison with `test`
and the operator `=`.
* NEWS: Update for bug fix.
See also: https://github.com/msys2/MINGW-packages/pull/21905
The variable, LT_ARGZ_H, can be empty, which causes distclean and
maintainer-clean to error as a directory is attempted to be removed
instead of a file.
When running maintainer-clean for gnulib-tests, the .version file is
missing, which is needed by config.status, so the command will error.
* configure.ac: Update CONFIG_STATUS_DEPENDENCIES to use dotversion so
that the .version file can be generated if needed.
* libltdl/ltdl.mk: Add conditional with LTARGZH_EXISTS to append path for
LT_ARGZ_H file to BUILT_SOURCES.
* m4/ltdl.m4: Add AM_CONDITIONAL for LTARGZH_EXISTS that is set to
true if LT_ARGZ_H is non-empty.
* NO-THANKS: Add 'Michael Pratt' for bug#73672 contribution.
* NEWS: List additional bug fix.
'-single_module' detection is broken with Xcode 15, where a message to
stderr indicates the flag is deprecated, not unsupported.
* m4/libtool.m4: Check macOS versions to see if '-single_module' flag is
unnecessary.
The file magic test fails to determine the file type of libraries when
cross-compiling with an aarch64 compiler without additional strings to
search for in an objdump.
* build-aux/ltmain.in: Append 'pe-aarch64' to file_magic in the
lt_cv_deplibs_check_method.
* m4/libtool.m4: Append 'pe-aarch64' to file format check.
The macro _LT_CMD_OLD_ARCHIVE inlines the definition of AC_PROG_RANLIB,
which seems to be outdated functionality. Running autoscan in a
directory with ltmain.sh produces conflicting warnings with libtoolize
about AC_PROG_RANLIB. Autoconf warns that AC_PROG_RANLIB is missing,
but libtoolize warns that it is obsolete. The outdated warning should
no longer appear after replacing AC_CHECK_TOOL(RANLIB, ranlib, :) with
AC_REQUIRE([AC_PROG_RANLIB]).
* m4/libtool.m4: Use AC_REQUIRE([AC_PROG_RANLIB]).
* Makefile.am: Added in tests/bug_42313.at.
* tests/bug_42313.at: Contains test cases for bug 42313.
Reported at <https://savannah.gnu.org/support/index.php?110674>.
* doc/libtool.texi (LT_INIT): Talk about --enable-aix-soname instead of --with-aix-soname.
* m4/ltoptions.m4 (_LT_WITH_AIX_SONAME): Use AC_ARG_ENABLE instead of
AC_ARG_WITH. In the default case, use _AC_ENABLE_IF, in order to still
recognize the old option --with-aix-soname.
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): Update comment.
* configure.ac: Update comment.
* NEWS: Mention the change.
Reported at <https://savannah.gnu.org/support/index.php?110674>.
* doc/libtool.texi (LT_INIT): Talk about --enable-pic instead of
--with-pic, and about --disable-pic instead of --without-pic.
(Test descriptions): Likewise.
* m4/ltoptions.m4 (_LT_WITH_PIC): Use AC_ARG_ENABLE instead of
AC_ARG_WITH. In the default case, use _AC_ENABLE_IF, in order to still
recognize the old options --with-pic and --without-pic.
* tests/demo.at: Add a test for --enable-pic, keeping the test for
--with-pic. Test '--disable-pic' instead of '--with-pic=no'.
* tests/with-pic.at: Test --enable-pic instead of --with-pic.
* NEWS: Mention the change.
Append '-no_fixup_chains' flag to disable chained fixups since it
is not compatible with '-undefined dynamic_lookup'.
* m4/libtool.m4: AC_VAR_APPEND will handle appending the option to
the variable, which allows the '+=' extension to be used by shells
that provide this capability for more efficient scaling. Also, bump
minimum required version of autoconf from 2.62 to 2.64.
* tests/no-executables.at: Set cache variable for link test.
* NO-THANKS: Add thanks for Carlo Cabrera and Dave Allured.
When building native GCC for the x86_64-w64-mingw32 host, the
compiler copies its library DLLs to the `bin` directory. However,
in the case of a multilib configuration, both 32-bit and 64-bit
libraries end up in the same `bin` directory, leading to conflicts
where 64-bit DLLs are overridden by their 32-bit counterparts.
This patch addresses the issue by adjusting the installation path
for the libraries. Specifically, it installs the libraries to
separate directories: `lib` for 64-bit and `lib32` for 32-bit. This
behavior aligns with how libraries are installed when creating an
x86_64-w64-mingw32 cross-compiler without copying them to the `bin`
directory if it is a multilib build.
* m4/libtool.m4: Install DLL to $(libdir), not $(libdir)/bin, if
multilib build.
This changes the C function prototypes to use void where needed. When
building with CFLAGS=-Werror=strict-prototypes or similar, the libtool's
tests can cause false reports and errors in the log files:
error: function declaration isn't a prototype
* m4/libtool.m4: Specify void for main function prototypes.
* m4/ltdl.m4: Specify void for main and fnord function prototypes.
AC_CHECK_TOOL was changed to AC_CHECK_PROG however the arguments are
different and this result is a value of ":". Change this to match the
original intent.
The lack of FILECMD was causing failures for mips64 builds as -m elf was
being passed to LD which isn't supported on our targets.
This is cleanup for libtool. The option test_compile is not used in
libtool, and the documentation states that it would probably be dropped
in the future.
* build-aux/ltmain.in: Remove case statement for test_compile.
* doc/libtool.texi: Remove test_compile from documentation.
* m4/libtool.m4: Remove test_compile definition from macro file.
The -R and -L flags are currently checked if they have a space behind
them. -l should be added to the list of cases checked.
* m4/libtool.m4: Check for a space after the -l flag.
These should have been included in the commits that updated these
files, but too late now to rewrite git history.
* m4/libtool.m4: Update serial number.
* m4/ltdl.m4, m4/ltoptions.m4: Likewise.
If $CC has --sysroot=/, it is a valid configuration however libtool will
then set lt_sysroot to "/".
This means references like $lt_sysroot$libdir become //usr/lib instead
of the more normally expected /usr/lib. This may or may not break something
but certainly is confusing to the user and gives confusing output. Making
"/" simply unset lt_sysroot is much cleaner.
Whilst here, trim any trailing '/' from sysroot paths to drop the duplication
and result in cleaner/consistent output.
* m4/libtool.m4: Cleanup sysroot trailing '/' handling.
mingw uses msvcrt as it's standard library and does not use libm.
So in LT_LIB_M it can be added to the list of systems which do not
require libm.
* libtool.m4: Add mingw to the list of systems not requiring libm
The "From" should be "from" in the variable name.
Fixes libtool bug https://bugs.gnu.org/38305
* m4/libtool.m4: Change F to f in old_archive_from_new_cmds.
Trying to build clamav on Solaris 11.3 with the Oracle C compiler,
I got the following error:
libtool: error: not configured to extract global symbols from dlpreopened files
I would have expected a build to use dlopen rather than the preopen
fallback so looked for related configure tests that were perhaps
returning the wrong answer.
The global_symbol_pipe being empty seemed a likely culprit.
the last three lines of nm -p on the conftest.o in this test are:
0000000032 T main
0000000016 T nm_test_func
0000000001 C nm_test_var
On Solaris 10, I'd get a D instead of a C. Adding C to the list of
characters in the symcode variable and building again resulted in a
successful build. I've attached a patch to add this C.
Url: https://savannah.gnu.org/patch/?9086
* m4/libtool.m4 (symcode): Add C for solaris.
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.
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.
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.
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.