457 Commits

Author SHA1 Message Date
Ileana Dumitrescu
e6f9ae8f18
libtool: Update copyright year 2026-01-02 20:09:41 +02:00
Arnold
600c61dd79
libtool.m4: Add support for slimcc
Reported: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79216
2026-01-02 19:59:24 +02:00
KO Myung-Hun
2228b4d0dc
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.
2026-01-02 19:59:24 +02:00
KO Myung-Hun
6c5f27371d
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.
2026-01-02 19:59:23 +02:00
Frederic Berat
c18d2d9514
libtool.m4: Fix syntax error in LT_PROG_OBJC and LT_PROG_OBJCXX
Reported: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79468
2026-01-02 19:59:22 +02:00
Ileana Dumitrescu
f8078854f7
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.
2026-01-02 19:59:15 +02:00
Ileana Dumitrescu
2a4cc31b66
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-09-06 14:25:42 +03:00
Ileana Dumitrescu
4d00c3624d
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-09-06 14:25:42 +03:00
Ileana Dumitrescu
96da510e10
gnulib: Update submodule 2025-08-07 20:20:20 +03:00
Ileana Dumitrescu
632ab1d68b
libtool.m4: Bump serial 2025-08-07 20:20:20 +03:00
Gleb Popov
b9156729ab
m4: Fix flang -Wl flags on FreeBSD 2025-08-07 20:20:18 +03:00
Evgeny Grin
0af7b12403
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-08-07 20:20:06 +03:00
Ileana Dumitrescu
fd8ea4ccfa
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-08-07 20:20:06 +03:00
Ileana Dumitrescu
9c1a42a6bb
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-08-07 20:20:05 +03:00
Mitch
4d7d7ca45c
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-08-07 20:20:04 +03:00
Michael Haubenwallner
388d0995d4
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-08-07 20:20:03 +03:00
Michael Haubenwallner
b4b96dfa95
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-08-07 20:20:02 +03:00
Ileana Dumitrescu
43068986b0
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-08-07 20:20:01 +03:00
Manoj Gupta
52f78952b9
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-08-07 20:20:00 +03:00
Mintsuki
9eb292deb1
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.

NEWS: Update
2025-08-07 20:19:24 +03:00
Ileana Dumitrescu
5b582aed25
m4: Update serials for modified files 2025-04-11 20:57:53 +03:00
Ileana Dumitrescu
9bc7536bd8
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-04-11 20:45:14 +03:00
Anthony Mallet
7945cf75f8
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-04-11 20:45:14 +03:00
Christian Feld
2a5c170471
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-04-11 20:45:13 +03:00
Ileana Dumitrescu
13926861aa
m4: Update serials for modified files 2025-02-13 17:27:45 +02:00
Ileana Dumitrescu
c7be1f229c
libtool.m4: Update NetBSD postdeps for shared libraries
Reported: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70978

* 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.
* NEWS: Update.
2025-02-13 17:02:16 +02:00
Ileana Dumitrescu
64ecee50f5
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-02-13 17:02:15 +02:00
Ileana Dumitrescu
1d871cc45b
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-02-13 16:57:05 +02:00
Ileana Dumitrescu
b341c9f8d0
libtool: Update copyright year 2025-01-02 16:30:23 +02:00
mintsuki
a2c84d14aa
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:25:45 +02:00
Khalid Masum
d8a934458b
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-20 17:36:31 +02:00
Tim Schumacher
23519121db
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-20 17:36:31 +02:00
streaksu
bd15931e57
libtool: add support for Ironclad 2024-11-20 17:36:31 +02:00
Adrien Destugues
4e5a12014b
Do not explicitly link dependencies on Haiku.
This is not needed, the runtime_loader can figure them out.
2024-11-20 17:36:30 +02:00
Jerome Duval
e6c7986fc8
Adjust haiku configuration 2024-11-20 17:36:30 +02:00
Ileana Dumitrescu
6bc5e177b6
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-20 17:36:28 +02:00
Ileana Dumitrescu
323d8a5dfd
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-20 16:42:38 +02:00
Martin Storsjö
eed74d650a
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.
* NEWS: Update.
2024-11-20 16:42:15 +02:00
Alastair McKinstry
506283c381
libtool.m4: Support for more flang compilers 2024-10-22 20:02:18 +03:00
Alastair McKinstry
8342fed94a
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-22 20:02:17 +03:00
Alastair McKinstry
0bad1a6edf
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-22 20:02:16 +03:00
Vincent Lefevre
5139403de6
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-22 20:02:16 +03:00
Vincent Lefevre
7a27cb1bcd
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-22 20:02:16 +03:00
Bruno Haible
f91f7bc3ab
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-22 20:02:15 +03:00
Ileana Dumitrescu
4e96fb2a47
libtool.m4: Increment serial and typo/spacing fix 2024-10-22 20:02:15 +03:00
Markus Mützel
68fbecc49b
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 `=`.
* NEWS: Update for bug fix.

See also: https://github.com/msys2/MINGW-packages/pull/21905
2024-10-22 20:00:47 +03:00
Ileana Dumitrescu
d405ede870
Fix errors in distclean and maintainer-clean
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.
2024-10-22 19:55:50 +03:00
Joshua Root
82f7f52123
libtool.m4: Update '-single_module' detection
'-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.
2024-10-22 19:45:25 +03:00
Ileana Dumitrescu
182c7b3e25
Add 'aarch64' support to the file magic test
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.
2024-09-18 17:15:27 +03:00
Ileana Dumitrescu
3e6c6284a7
libtoolize: Fix conflicting warnings about AC_PROG_RANLIB
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.
2024-09-13 20:19:34 +03:00