4523 Commits

Author SHA1 Message Date
Ileana Dumitrescu
1b6fc1940b
libtool.texi: Update link mode documentation
* doc/libtool.texi: Specify a directory after the '-bindir' option
  when linking.
2026-01-24 19:13:22 +02:00
Kirill Makurin
97998eb82a
ltmain.in: Fix file path conversions for MSYS2 and MSVC
The result of cygpath file path conversions are not stored correctly
causing the path conversions to fail on MSYS2 and MSVC.

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

* build-aux/ltmain.in: Replace func_convert_core_msys_to_w32_result
  with func_convert_core_msys_to_w32_with_cygpath_result.
* NEWS: Update.
2026-01-07 20:16:06 +02:00
Ileana Dumitrescu
7c3fb80adc
Update NEWS 2026-01-02 22:11:31 +02:00
Ileana Dumitrescu
e6f9ae8f18
libtool: Update copyright year 2026-01-02 20:09:41 +02:00
Ileana Dumitrescu
64d71e8b7b
gnulib: Update submodule 2026-01-02 20:03:00 +02:00
Ileana Dumitrescu
3eb06f0b5a
Add testing for slimcc compiler
New compiler support testing for Slimcc, which is based on existing link
order testing.

See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79216
2026-01-02 19:59:24 +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
Richard J. Mathar
9808ff1860
ltmain.in: add parentheses to support values with spaces
The variable may contain a value with spaces that cause errors due
to the standard splitting of command line arguments by linux shells.
See https://github.com/autotools-mirror/libtool/pull/4/files.

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

* build-aux/ltmain.in: Add missing quotes around darwin_orig_dir.
2026-01-02 19:59:23 +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
Patrice Dumas
f6aaa6f55d
libtool.texi: Update descriptions for command-line options
* doc/libtool.texi: Make descriptions for '--no-finish' and
  '--reorder-cache' clearer for users to understand.
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
c4abf359f8
maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2025-09-18 17:16:22 +03:00
Ileana Dumitrescu
e40fdc22cf
version 2.6.0
* NEWS: Record release date.
v2.6.0
2025-09-18 16:43:33 +03:00
Elizabeth Figura
69736cd828
ltmain.in: Pass through all warning flags to the linker.
When link-time optimization (LTO) is used, some warnings are reported
while linking, and the flags must be passed to the linker to enable or
disable them.

-W* also catches -Wl,* and -Wa,*, but the former is already accounted
for in an earlier switch case, and the latter is already passed through.

* build-aux/ltmain.in: Pass through all warning flags to the linker.
2025-09-06 14:25:43 +03:00
Ileana Dumitrescu
19c0fcc0d1
Makefile.am: Reorder testsuite 2025-09-06 14:25:42 +03:00
Ileana Dumitrescu
92d62dcb09
Add test file for libtool-next-version script
* Makefile.am: Add versioning_script.at to testsuite.
* doc/libtool.texi: Update to describe new test file.
* tests/versioning_script.at: Autotest file for testing the output of
  the libtool-next-version script.
2025-09-06 14:25:42 +03: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
6389dce814
gnulib: Update submodule 2025-08-07 20:20:21 +03:00
Ileana Dumitrescu
d6ea50ce1e
cfg.mk: Ignore sc_codespell checks 2025-08-07 20:20:20 +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
Ileana Dumitrescu
86ce8b277c
Update NEWS 2025-08-07 20:20:20 +03:00
Ileana Dumitrescu
d222649f34
tests: Remove CPPFLAGS from some compile commands
* tests/flags.at, tests/infer-tag.at: Remove unneeded CPPFLAGS from
  OBJC & OBJCXX compile commands.
2025-08-07 20:20:19 +03:00
Ileana Dumitrescu
22a73e7a59
tests/bug_71489.at: Split into two test cases 2025-08-07 20:20:19 +03:00
Pierre Ossman
661d5573ea
libltdl: Fix libltdl early failures for multi-arch
Since there could be multiple files for libltdl to try dlopening,
libltdl should not fail after the first attempted file.

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

* libltdl/ltdl.c: Change return if dlopen() fails.
* libltdl/ltdl.mk: Update serial.
2025-08-07 20:20:19 +03:00
Pierre Ossman
c69efe983d
ltmain.in: Fix reordering --as-needed
Libtool was reordering flags like, --as-needed, which broke its usage,
since the relevant libraries were no longer following the flag.

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

* build-aux/ltmain.in: Add check for --as-needed and --no-as-needed
  flags.
2025-08-07 20:20:19 +03:00
Gleb Popov
b9156729ab
m4: Fix flang -Wl flags on FreeBSD 2025-08-07 20:20:18 +03:00
Collin Funk
c6016699f1
maint: fix Automake warning
* Makefile.am (prologue): Remove macro.
(THANKS): Use the perl command directly.
2025-08-07 20:20:18 +03:00
Ileana Dumitrescu
9c7772f8a6
ltmain.in: Handle clang's target architecture flag
* build-aux/ltmain.in: Pass clang's '--target' flag for specifying
  architecture through libtool unchanged.
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
Kirill Makurin
08ebc17358
libltdl: Undeclared reference to access on Windows
On native Windows (MSVC/mingw), access is declared in io.h, which is
not included.

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

* libltdl/ltdl.h: Include io.h on Windows platforms.
* libltdl/ltdl.mk: Update serial.
2025-08-07 20:20:05 +03:00
Ileana Dumitrescu
7f5871de3b
ltmain.in: Temporary comment update.
On MSYS2, file path conversion will no longer result in libtool hanging,
but the original MSYS will not be able to do file path conversions
without cygpath. Original MSYS support for file path conversions will be
re-added before commit 1377b68b4aed0d6ee3c390131eb763d26e5b642d migrates
to master.

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

* build-aux/ltmain.in: Update comment from MSYS to MSYS2.
2025-08-07 20:20:05 +03:00
Ileana Dumitrescu
d575748b83
notes.texi: Inform users about MSVC configuration
When building libltdl with the MSVC toolchain, Fortran checks can cause
issues with finding symbols, but users can avoid this by setting the
Fortran compiler environment variables to "no".

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

* doc/notes.texi: Add item.
2025-08-07 20:20:04 +03:00
Ileana Dumitrescu
d78a0a0d6b
tests: Skip failing tests on MSVC
Test 'deplibs without file command' fails on MSVC with a 'hard failure'.
Since this test was created for MinGW, skipping for now.

Test 'Libtool stress test.' fails on MSVC when the cl compiler cannot
open an expsym file, which appears to exist but is empty.

* tests/deplibs-mingw.at: Add check for MSVC build to skip test.
* tests/stresstest.at: Add check for MSVC build to skip test.
2025-08-07 20:20:04 +03:00
Ileana Dumitrescu
06e491d0fe
inherited_flags.at: Fix test on MSVC
* tests/inherited_flags.at: Modify grep to limit search range.
2025-08-07 20:20:04 +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
Ileana Dumitrescu
371624cffe
ltmain.in: Add 'S_ISDIR' definition for MSVC
Several test failures occur from fix for sr #111191 with MSVC, which is
fixed by defining S_ISDIR with a different variable name, MSVC_ISDIR.

  error LNK2019: unresolved external symbol S_ISDIR referenced in func check_executable

* build-aux/ltmain.in: Define and use macro MSVC_ISDIR.
2025-08-07 20:20:03 +03:00
Ileana Dumitrescu
df361d02a6
ltmain.in: Fix hang with cmd.exe in MSYS
Translating file paths from MSYS to W32 has been causing libtool to
indefinitely hang when 'cmd.exe //c' is called. Instead, 'cygpath' is
packaged on MSYS, so it will now handle the path conversion.

* build-aux/ltmain.in: Replace 'cmd.exe //c' with 'cygpath' usage.
2025-08-07 20:20:03 +03:00
Ileana Dumitrescu
57e1dc94d3
libtoolize.at: Update checks based on linker used
If mklink is used for symlinking files, the expout will not match, so
stdout is used instead.

* tests/libtoolize.at: Use stdout for checks instead of expout on MSVC.
2025-08-07 20:20:03 +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
5d79c9525d
libtoolize.in: Create symlinks with mklink for MSVC
Symlink files are not generated properly with 'ln -s' for MSVC to
process, so mklink is used, which swaps the argument order of target
and link_name. This also requires absolute paths, generated with the
use of cygpath.

* libtoolize.in: Check if linking with mklink and update processing.
2025-08-07 20:20:02 +03:00
Ileana Dumitrescu
4a5acaa7a4
tests: Include check for __CYGWIN__ for crossbuilds
* tests/demo.at, tests/lt_dlexit.at: Add __CYGWIN__ to check for
crossbuilds of build cygwin with host mingw and the MSVC toolchain.
2025-08-07 20:20:02 +03:00
Ileana Dumitrescu
be0630f555
tagdemo.at: Update for MSVC
* tests/tagdemo.at: Remove namespace support check, add iostream.h
support check, and make iostream the default include, not iostream.h.
2025-08-07 20:20:02 +03:00
Ileana Dumitrescu
ca61f85261
libtool: Alter expected line endings in testsuite
When comparing expected output in LT_AT_CHECK_EXECUTE, several tests
fail with mismatched line endings. This patch should fix Windows
environments that have CRLF text line endings disabled and only use
the LF character for line endings.

* tests/testsuite.at: Removed '\r' from awk's printf command.
2025-08-07 20:20:01 +03:00