467 Commits

Author SHA1 Message Date
Ileana Dumitrescu
8ef98efc57
libtool: Update copyright year 2026-01-02 20:10:29 +02:00
Arnold
9e33aadb8f
libtool.m4: Add support for slimcc
Reported: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79216
2025-12-01 22:30:53 +02:00
KO Myung-Hun
da026c4f23
libtool: Limit a length of DLL name to 8.3 correctly
If a length of $release and/or $versionsuffix is more than 8 bytes,
a length of DLL name may be more than 8.

Then, this corrupts a generated DLL on OS/2.

This patch assures 3 bytes for libname, 2 bytes for release, and 3 bytes
for version at least.

* m4/libtool.m4 (soname_spec) [os2*]: Limit a length of DLL name to 8.3
correctly.
2025-11-17 21:48:05 +02:00
KO Myung-Hun
ca12ed428f
libtool: Remove old_archive_from_new_cmds on OS/2
old_archive_from_new_cmds is not used at all. In addition, if this is
defined static libs are not generated.

This is a regression of commit e60044.

* m4/libtool.m4: Remove old_archive_from_new_cmds on OS/2.
2025-10-27 17:04:23 +02:00
Frederic Berat
53f8ca1d48
libtool.m4: Fix syntax error in LT_PROG_OBJC and LT_PROG_OBJCXX
Reported: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79468
2025-09-30 20:13:32 +03:00
Ileana Dumitrescu
bbcb9b23c6
libtool.m4: Fix Objective C++ check
The check for Objective C++ was combined with the check for
Objective C, which caused Objective C++ tests to fail if language
support was enabled for OBJC but not OBJCXX. Additionally, a syntax
error with macros LT_PROG_OBJC and LT_PROG_OBJCXX was observed on
Fedora, exhibiting differing behaviour than observed on other
GNU/Linux operating systems.

Reported: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79468

* m4/libtool.m4: Add separate check for Objective C++.
* tests/flags.at, tests/infer-tag.at: Update to check cached variable
  for Objective C++, objcxx_compiles.
2025-09-29 21:39:31 +03:00
Ileana Dumitrescu
41e81b7b96
Add support for ML64
The Microsoft Macro Assembler can be used to assemble and link one
or more assembly-language source files with libtool.

Reported: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=48993

* Makefile.am: Pass ML64 flags to tests.
* configure.ac: Add language support for the Microsoft Macro Assembler.
* doc/libtool.texi: Update documentation to include ML64.
* m4/libtool.m4: Enable macro support for ML64.
* tests/flags.at: Add test for ML64 flags.
* tests/infer-tag.at: Add test for ML64 tag.
* NEWS: Update.
2025-08-21 18:01:39 +03:00
Ileana Dumitrescu
64f31f45db
New Intel OneAPI compiler names
Reported: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78817

* libltdl/libltdl/lt__alloc.h: Change FREE and MEMREASSIGN macros for
  -Wcompound-token-split-by-macro.
* libltdl/libltdl/lt_system.h: Change LT_STMT_START and LT_STMT_END
  macros for -Wcompound-token-split-by-macro.
* libltdl/loaders/loadlibrary.c: Add support for icx, icpx, ifx.
* libltdl/ltdl.c: Fixes for Clang.
* m4/libtool.m4: Add support for icx, icpx, and ifx.
* NEWS: Update.
2025-08-13 19:44:19 +03:00
Ileana Dumitrescu
ff0fcd9a48
gnulib: Update submodule 2025-08-06 16:50:54 +03:00
Ileana Dumitrescu
d3073a69eb
libtool.m4: Bump serial 2025-08-05 19:39:47 +03:00
Gleb Popov
504261db0e
m4: Fix flang -Wl flags on FreeBSD 2025-07-14 21:08:53 +03:00
Ileana Dumitrescu
19dacdd9e1
libtool.m4: Replace '${COMSPEC-cmd}' with 'cmd' 2025-07-10 20:53:24 +03:00
Evgeny Grin
7efc189108
libtool: Forward slash escaping check on Windows
Without cygpath, Window's 'cmd' may hang with a single slash (when transforming)
and may hang with two slashes (when not transforming).

Reported: https://savannah.gnu.org/support/index.php?110901

* build-aux/ltmain.in: Use one or two slashes with Window's command
  prompt based on cached value in lt_cv_cmd_slashes.
* m4/libtool.m4: Cache whether one or two slashes are needed with
  Window's command prompt, when cygpath is not installed in path.
2025-07-09 17:02:59 +03:00
Ileana Dumitrescu
3dea730282
libtool.m4: Fix missing quotes for lt_ar_flags
lt_ar_flags are unquoted, which causes failures when additional options
are passed to ARFLAGS.

Reported: https://savannah.gnu.org/support/?111257

* m4/libtool.m4: Make lt_ar_flags declare as quoted.
2025-06-19 17:01:11 +03:00
Ileana Dumitrescu
9f4b6adea4
libtool: Support MSYS and MSYS2 file path conversions
MSYS does not have cygpath installed by default, so during configure,
a check for cygpath is cached. If cygpath is not found, Window's command
prompt will be used with a forward slash escape on the 'c' flag:
"cmd //c".

Reported: https://savannah.gnu.org/support/?110901

* build-aux/ltmain.in: Choose file path conversion for MSYS(2) by
  whether cygpath is installed.
* m4/libtool.m4: Cache whether cygpath is installed in user path.
2025-06-17 17:29:12 +03:00
Mitch
f49da6ca2a
libtool: Fix MSVC cl.exe .exp extension collision
MSVC's compiler uses the .exp entension for their own export format,
which causes a build failure when a subsequent build is run. The
MSVC compiler, cl.exe, errors for an invalid file format. This is fixed
by using a similar extension name to avoid the naming collision.

Reported: https://savannah.gnu.org/support/?111157

* build-aux/ltmain.in: Replace .exp extension with .expsym.
* m4/libtool.m4: Replace .exp extension with .expsym.
2025-05-26 17:18:51 +03:00
Michael Haubenwallner
5eb259c3ba
libtool.m4: preload valid C symbol names only
* m4/libtool.m4 (global_symbol_to_import, global_symbol_to_cdecl,
global_symbol_to_c_name_address,
global_symbol_to_c_name_address_lib_prefix): List valid C symbol names
only in lt_<modname>_LTX_preloaded_symbols array.
2025-05-26 17:18:50 +03:00
Michael Haubenwallner
240816b310
libtool.m4: For MS dumpbin drop CR first.
On Cygwin, gawk-4.1.4-3 and newer do not treat the input stream as text
any more, leaving us behind with carriage return in symbol names.
* m4/libtool.m4 (lt_cv_sys_global_symbol_pipe): In AWK script for MS
dumpbin drop CR first.
2025-05-26 17:18:50 +03:00
Ileana Dumitrescu
4ded381a6f
libtool: Fix mishandling compiler flags with MSVC tools
With MSVC, linker flags were not properly being linked in during a
compile command. A check has been added to verify if there are linker
flags set and then use a different command when linking.

Fixes applied for bug#74175.

* build-aux/ltmain.in: Fix command parser for '-Wl' option for MSVC.
* m4/libtool.m4: Fix MSVC compile commands.
* tests/flags.at: Use '$GREP --' instead of '$FGREP' when comparing with
  stdout.
2025-05-26 17:18:40 +03:00
Manoj Gupta
e606cd2358
Pick up clang_rt static archives compiler internal libraries
Libtool checks only for libraries linked as -l* when trying to
find internal compiler libraries. Clang, however uses the absolute
path to link its internal libraries e.g. compiler_rt. This patch
handles clang's statically linked libraries when finding internal
compiler libraries.
https://crbug.com/749263
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866
2025-05-19 19:39:51 +03:00
Mintsuki
a33094bf07
Move mlibc case matches above GNU/Linux (and similar) ones.
This allows a *-linux-mlibc host to correctly match with the mlibc userland
rather than having the GNU/Linux (and similar) userland match override it.
2025-05-02 21:35:00 +03:00
Ileana Dumitrescu
409501b0a7
m4: Update serials for modified files 2025-04-11 20:58:24 +03:00
Ileana Dumitrescu
a390f27ff1
libtool: Add configuration options for CXX linking
Add configuration options to choose whether to use '-nostdlib' when
linking C++ shared libraries and modules.

* m4/libtool.m4: Replace '-nostdlib' with variable '$stdlibflag' and
  set '$output_verbose_link_cmd' to be empty when enabling standard
  library linking for C++ modules.
* m4/ltoptions.m4: Add new configuration options, --enable-cxx-stdlib
  and --disable-cxx-stdlib, and add LT_INIT options, cxx-stdlib and
  no-cxx-stdlib.
* doc/libtool.texi: Update for new configuration options.
* NEWS: Update.
2025-03-28 18:34:23 +02:00
Anthony Mallet
b26f7c36fb
libtool.m4: Fix postdeps in NetBSD
commit:c7be1f229 addresses an issue with building C++ modules on NetBSD, by
removing -lgcc_s and -lgcc. This may sometimes not work correctly, depending
on the architecture, as libgcc_s.so and libgcc.a may contain required code to
properly link the shared object. On NetBSD, libgcc.a is compiled with -fPIC
and can be linked to a shared object without any issue.

Reported: https://savannah.gnu.org/support/index.php?111210
2025-03-28 18:34:16 +02:00
Christian Feld
f93cf989fa
libtool.m4: Fix for invalid postdeps
Omitting lines starting with 'Driving:' fixes the invalid postdeps
observed with FC.

Reported: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76177

* m4/libtool.m4: Omit lines that start with 'Driving:' when setting
  output_verbose_link_cmd.
2025-02-27 18:45:07 +02:00
Ileana Dumitrescu
b267d3bd49
m4: Update serials for modified files 2025-02-13 17:29:56 +02:00
Ileana Dumitrescu
4f7704015b
libtool.m4: Fix replacement of postdeps in NetBSD
Reported: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70978

* m4/libtool.m4: Remove 'gcc_s' postdeps, not only 'gcc'.
* NEWS: Update.
2025-02-11 18:04:45 +02:00
Ileana Dumitrescu
8d9a120d0a
libtool.m4: Update NetBSD postdeps for shared libraries
* m4/libtool.m4: Linking a shared version of 'gcc' is not possible on
  NetBSD, since the shared version of the library is 'gcc_s'. postdeps
  have been updated to remove 'gcc' instances with sed.
2025-02-10 21:57:25 +02:00
Ileana Dumitrescu
1457e40faa
Revert "libtool.m4: Avoid warning message in deplibs_check_method"
This reverts commit a08d2989cbee7022d63dc75d2eb9b3e96d3f174e.
2025-01-20 20:23:09 +02:00
Ileana Dumitrescu
34de5bf8bc
ltoptions.m4: Make aix-soname assignment more clear
The option --with-aix-soname=svr4 does not work the same as using
LT_INIT([aix-soname=svr4]), since the configure script is reordered
depending on which is used. The reordering causes 'enable_shared'
to not be set before processing for 'aix-soname' when using LT_INIT.

For LT_INIT([aix-soname=svr4]) to be set as intended, 'shared' must
be set before 'aix-soname=svr4', like LT_INIT([shared aix-soname=svr4]).

* m4/ltoptions.m4: Warn user if 'enable_shared' has not been set when
  setting 'aix-soname' and add configuration messages to show which
  variant of shared library versioning has been set for 'aix-soname'.
* doc/libtool.texi: Update to specify need for 'shared' to be used
  before 'aix-soname' for LT_INIT.
2025-01-18 15:46:34 +02:00
Ileana Dumitrescu
c010d1e93f
libtool: Add tagging support for OBJC and OBJCXX
Reported: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67754

* Makefile.am: Set environment variables for tests.
* configure.ac: Add language support for Objective-C and Objective-C++.
* build-aux/ltmain.in: Update help message for tags available.
* m4/libtool.m4: Add tagging support for OBJC and OBJCXX.
* tests/flags.at: Add tests for passing OBJC and OBJCXX flags.
* tests/infer-tag.at: Add tests for inferring OBJC and OBJCXX tags.
* doc/libtool.texi: Update documentation.
* NEWS: Update.
2025-01-13 17:33:50 +02:00
Ileana Dumitrescu
74e6c3a828
libtool: Update copyright year 2025-01-02 16:47:53 +02:00
mintsuki
b755144e96
libtool: Replace support for ironclad* with *-mlibc
The main Ironclad kernel-based distribution (Gloire) uses the mlibc
C library for its userland, and that is what commit
bd15931e57f5171732a1a911cbbad9b5e03d0308 was intended to support.
There is no reason this support should be Ironclad-specific, as there
are many other OSes that use mlibc, most prominently "Managarm",
which is already supported by gnu-config.
2024-11-20 20:43:18 +02:00
Khalid Masum
2c4bb57a88
libtool: add support for wasm32-emscripten
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.
2024-11-19 21:23:41 +02:00
Tim Schumacher
193020a240
libtool: Add support for SerenityOS
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.
2024-11-19 21:23:31 +02:00
streaksu
a1b219a6ce
libtool: add support for Ironclad 2024-11-19 21:23:04 +02:00
Adrien Destugues
50d7b46448
Do not explicitly link dependencies on Haiku.
This is not needed, the runtime_loader can figure them out.
2024-11-19 21:06:25 +02:00
Jerome Duval
0a01348440
Adjust haiku configuration 2024-11-19 21:06:25 +02:00
Ileana Dumitrescu
09e89cc28d
libtool.m4: Fix '-Fe' usage with linking in MSVC
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.
2024-11-13 21:45:08 +02:00
Ileana Dumitrescu
7c310c9b04
libtool.m4: Update hardcode_shlibpath_var for OpenBSD
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.
2024-11-05 17:36:16 +02:00
Martin Storsjö
5fa7a3b505
libtool: Prefer response files over linker scripts for mingw tools
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.
2024-10-25 19:36:53 +03:00
Alastair McKinstry
b230605ac7
libtool.m4: Support for more flang compilers 2024-10-18 17:17:14 +03:00
Alastair McKinstry
76656c9fda
libtool: Add support for netbsdelf
* m4/libtool.m4: Add support for netbsdelf*-gnu.
* m4/ltdl.m4: Append netbsdelf*-gnu to netbsd* occurrences in case
  statements.
2024-10-18 17:17:13 +03:00
Alastair McKinstry
8b4e43f67e
libtool.m4: Add spaces before -L in grep searches
Current searching for "-L" in link paths is over-greedy and
incorrectly handles paths with -L in them.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=896861
2024-10-18 17:17:13 +03:00
Vincent Lefevre
f7d11c71db
libtool.m4: Avoid a broken AC_TRY_EVAL macro
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
2024-10-18 17:17:12 +03:00
Vincent Lefevre
549b52175a
libtool.m4: Add run path when linking with tcc
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20622
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814091
2024-10-18 17:17:12 +03:00
Bruno Haible
3cf528a4f0
libtool.m4: Avoid word splitting on untrusted inputs
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.
2024-10-16 17:21:25 +03:00
Ileana Dumitrescu
c5bd2b146f
libtool.m4: Increment serial and typo/spacing fix 2024-10-15 18:04:38 +03:00
Markus Mützel
4cc12b83ff
libtool: Handle unset $multilib for Windows targets.
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 `=`.

See also: https://github.com/msys2/MINGW-packages/pull/21905
2024-10-15 17:52:50 +03:00
Ileana Dumitrescu
7292b13945
Replace LT_ARGZ_H_PATH usage with bool for LTARGZH_EXISTS
* m4/ltdl.mk: Add conditional with LTARGZH_EXISTS to append path for
  LT_ARGZ_H file to BUILT_SOURCES.
* m4/ltargz.m4: Remove LT_ARGZ_H_PATH.
* m4/ltdl.m4: Add AM_CONDITIONAL for LTARGZH_EXISTS that is set to
  true if LT_ARGZ_H is non-empty.
2024-10-15 17:15:53 +03:00