4512 Commits

Author SHA1 Message Date
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
Ileana Dumitrescu
7ba38e8eac
testsuite.at: Update testsuite config for MSVC
* tests/testsuite.at: Make symlink tool mlink for MSVC.
2025-08-07 20:20:01 +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
Ileana Dumitrescu
af7df02434
NEWS: Update for previous commits 2025-08-07 20:20:00 +03:00
Martin Storsjö
d12a1929db
Allow statically linking compiler support libraries when linking a library
For cases with deplibs_check_method="file_magic ..." (as it is for mingw),
there were previously no way that a static library could be accepted
here.
2025-08-07 20:20:00 +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
Ileana Dumitrescu
fee0464231
libtool: Update documentation
For many GNU/Linux systems, the shared library cache is not updated
after a "make install". Some reasoning is outlined in the
documentation now for users with instruction for how to update
the shared library cache if desired.

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

* build-aux/ltmain.in: Add informational note during build.
* doc/notes.texi: Update.
2025-08-07 20:20:00 +03:00
Bruno Haible
6abc943479
doc: Explain how to specify library dependencies.
* doc/libtool.texi (Link mode): Explain how to specify dependencies to
already installed libraries.
2025-08-07 20:19:59 +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
e6dd1eb7cf
NEWS: Update for bugs fixed 2025-04-15 17:32:50 +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