]> git.ipfire.org Git - thirdparty/libtool.git/log
thirdparty/libtool.git
3 days agognulib: Update submodule development
Ileana Dumitrescu [Wed, 3 Jun 2026 17:36:31 +0000 (20:36 +0300)] 
gnulib: Update submodule

3 days agolibltdl/ltdl.mk, m4/libtool.m4: Update serials
Ileana Dumitrescu [Wed, 3 Jun 2026 16:56:48 +0000 (19:56 +0300)] 
libltdl/ltdl.mk, m4/libtool.m4: Update serials

3 days agoNEWS: Update for previous commits
Ileana Dumitrescu [Wed, 3 Jun 2026 15:50:07 +0000 (18:50 +0300)] 
NEWS: Update for previous commits

8 days agoUpdate outdated and invalid URLs
Ileana Dumitrescu [Fri, 29 May 2026 17:27:36 +0000 (20:27 +0300)] 
Update outdated and invalid URLs

12 days agom4/libtool.m4: Add support for *-ironclad-gnu
Mintsuki [Tue, 19 May 2026 03:03:33 +0000 (05:03 +0200)] 
m4/libtool.m4: Add support for *-ironclad-gnu

The main Ironclad distribution, Gloire, has moved to using the
GNU C Library as its libc. Add support for that.

Reported: https://savannah.gnu.org/patch/?10571

2 weeks agoltmain.in: defer warn dependency to static library
Alexandre Janniaux [Fri, 2 Apr 2021 11:14:41 +0000 (13:14 +0200)] 
ltmain.in: defer warn dependency to static library

When linking old library to any libtool target that is not an
executable, libtool warns that it might not be portable, in particular
because shared libraries need PIC from the static library to be working.

However, when adding an old library as dependency to a static libtool
library, there is no linkage, and thus no portability issue, so there's
no reason to warn. If the static libtool library is then linked to a
shared library, the dependency will be forwarded and the warning will
happen at this time.

Reported: https://savannah.gnu.org/patch/?10569

2 weeks agotests: extend archive-in-archive with dependency forwarding check
Alexandre Janniaux [Tue, 28 Apr 2026 14:11:01 +0000 (16:11 +0200)] 
tests: extend archive-in-archive with dependency forwarding check

Verify that the old library dependency is recorded in
dependency_libs of the target .la file, and that an executable
linked against the target can resolve symbols from the forwarded
dependency.

Reported: https://savannah.gnu.org/patch/?10569

2 weeks agoltmain.in: ensure old libraries are not archived
Alexandre Janniaux [Tue, 6 Apr 2021 08:22:14 +0000 (10:22 +0200)] 
ltmain.in: ensure old libraries are not archived

Previously, adding a static archive library, aka. old library, as a
dependency of a new libtool library compiled as a static archive (be it
a convenience library or an installed static library) resulted in the
dependency archive being added into the target archive as-is.

However, linkers are usually not able to use nested archive as-is. It
results in errors like these on Linux and Darwin at least:

    /usr/bin/ld: ./.libs/libfoo.a: member ./.libs/libfoo.a(libbar.a) in
    archive is not an object

or

    /usr/bin/nm: libbar.a: file format not recognized

With libfoo.a being the static libtool target and libbar.a being the
nested/linked static library.

Libtool has a quite close behaviour with convenience libraries, where
the content (objects) of the convenience library are extracted and added
back into the new target, but that´s mostly a libtool creation.

The static dependencies should not be "linked" into other static
libraries as there should not be linking involved, and we don´t want to
potentially duplicate symbols like done for the convenience libraries.

Instead, keep them in the dependency_libs of the new libtool archive
created and forward them until we link a shared library or an
executable. We do need to ensure they are referenced with absolute path
since we can link from a different folder than the one it was referenced
from.

We also need to filter out the shared library case since we don't want
to include the static archives in dependencies again.

The test was marked XFAIL since 2010 because the fix for the
nested-archive bug was incomplete. Now that ltmain.in properly
forwards old library dependencies instead of archiving them,
the test passes: remove the AT_XFAIL_IF and correct the
foo.$OBJEXT assertion (objects from the dependency must NOT
appear in the target archive).

Absolute paths are forwarded as-is like above.
Relative paths are transformed into absolute using pwd.

The old deplibs are not appended if they have been linked
into a shared library output already.

Reported: https://savannah.gnu.org/patch/?10569

3 weeks agoltmain.in: overlinking dependency_libs when linking against a libtool library
Anthony Mallet [Wed, 6 May 2026 21:20:33 +0000 (00:20 +0300)] 
ltmain.in: overlinking dependency_libs when linking against a libtool library

On NetBSD, linking a shared lib A with a libtool shared library B always
adds B's dependency to the dependencies of A, which is wrong on ELF systems.

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

* build-aux/ltmain.in: Move section of code to avoid overlinking
  dependency_libs on ELF systems.

3 weeks agoltmain.in: Avoid using deprecated MSVC -o option
Olly Betts [Tue, 12 May 2026 02:20:54 +0000 (05:20 +0300)] 
ltmain.in: Avoid using deprecated MSVC -o option

Microsoft deprecated -o and MSVC emits a warning when used:

cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release

The replacement when linking an executable is `-Fe`.

Reported: https://savannah.gnu.org/patch/?10570

* build-aux/ltmain.in: Replace -o with -Fe for MSVC compiler.

6 weeks agoNEWS: Reorder for consistency
Ileana Dumitrescu [Wed, 22 Apr 2026 17:24:55 +0000 (20:24 +0300)] 
NEWS: Reorder for consistency

6 weeks agognulib: Update submodule
Ileana Dumitrescu [Wed, 22 Apr 2026 17:17:02 +0000 (20:17 +0300)] 
gnulib: Update submodule

2 months agoNEWS: Update for previous commit
Ileana Dumitrescu [Sat, 14 Mar 2026 14:28:29 +0000 (16:28 +0200)] 
NEWS: Update for previous commit

2 months agom4/libtool.m4: fix emscripten CXX postdeps using non-PIC sysroot
Alexandre Janniaux [Tue, 10 Mar 2026 17:46:58 +0000 (18:46 +0100)] 
m4/libtool.m4: fix emscripten CXX postdeps using non-PIC sysroot

Commit d8a934458b251b465b7d31da9ba9148a128a146d introduced shared
libraries support for emscripten, using -sSIDE_MODULE=1, but the CXX
dependency detection in _LT_SYS_HIDDEN_LIBDEPS will only try to use
`-shared` link option to discover implicit dependencies.

The libraries and search paths reported by em++ differ depending on
whether -sSIDE_MODULE=2 is passed:

  em++ -shared -v conftest.o:
    -L<sysroot>/lib/wasm32-emscripten  (<-- non-PIC)
       -lhtml5... (other -l flags)

  em++ -sSIDE_MODULE=2 -shared -v conftest.o
    -L<sysroot>/lib/wasm32-emscripten/pic  (<-- PIC)
       (no -l flags)

Without -sSIDE_MODULE=2, the detected postdeps contain the non-PIC
sysroot path and system libraries. These get injected into the CXX
shared library link line before emcc can append the PIC sysroot,
causing wasm-ld to resolve system libraries from non-PIC archives,
typically in VLC build system:

    error: R_WASM_MEMORY_ADDR_LEB cannot be used against symbol;
           recompile with -fPIC

We resolved the issue in VLC by patching the postdeps but they were not
generated properly in the first place.

Fix by overriding output_verbose_link_cmd for emscripten in
_LT_LANG_CXX_CONFIG. The override passes -sSIDE_MODULE=2, matching what
archive_cmds actually uses at link time so that the detected paths point
to the PIC sysroot.

2 months agoltmain.in: Set allow_undefined to no on OS/2
KO Myung-Hun [Tue, 10 Mar 2026 14:35:00 +0000 (23:35 +0900)] 
ltmain.in: Set allow_undefined to no on OS/2

OS/2 does not allow undefined symbols at all when linking a dll. So,
setting allow_undefined to no by default is reasonable.

* build-aux/ltmain.in (func_mode_link): Set allow_undefined to no on
OS/2.

2 months agoNEWS: Update for commit f10d6a6c838d53bb6090153b2cce58f90f8e4511
Ileana Dumitrescu [Sat, 14 Mar 2026 14:08:46 +0000 (16:08 +0200)] 
NEWS: Update for commit f10d6a6c838d53bb6090153b2cce58f90f8e4511

2 months agodoc/libtool.texi: Add descriptions for new tests
Ileana Dumitrescu [Sat, 14 Mar 2026 14:01:19 +0000 (16:01 +0200)] 
doc/libtool.texi: Add descriptions for new tests

3 months agoNEWS: Update for previous commit
Ileana Dumitrescu [Sat, 28 Feb 2026 18:21:19 +0000 (20:21 +0200)] 
NEWS: Update for previous commit

3 months agoltmain.in: Support OpenMP with macOS clang
Dima Pasechnik [Thu, 26 Feb 2026 20:19:52 +0000 (14:19 -0600)] 
ltmain.in: Support OpenMP with macOS clang

llvm's OpenMP library using the macOS clang compiler requires prefixing the
'-fopenmp' option with '-Xpreprocessor' non-standard option.

Reported: https://lists.gnu.org/archive/html/libtool/2026-02/msg00002.html

* build-aux/ltmain.in: Process '-Xpreprocessor -fopenmp' as one token.

3 months agoltmain.in: Recognise explicit shared library args
Nicolas Boulenguez [Mon, 23 Feb 2026 16:32:35 +0000 (17:32 +0100)] 
ltmain.in: Recognise explicit shared library args

When linking a program, GNU Libtool recognises libfoo.so arguments, but
it does not when linking shared libraries. Now, libfoo.so will be
equivalent to linking with -l:libfoo.so or -lfoo.

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

* build-aux/ltmain.in: Link an explicit shared library.
* Makefile.am: Add new test file, deplib-path.at.
* tests/deplib-path.at: Add new test for shared linking deplibs by the
  libN.so name.

3 months agolibtool: Use echo in archive_cmds and archive_expsym_cmds on OS/2
KO Myung-Hun [Mon, 16 Feb 2026 07:19:21 +0000 (16:19 +0900)] 
libtool: Use echo in archive_cmds and archive_expsym_cmds on OS/2

This fixes that building DLLs fails because $ECHO does not work when it
is set to "printf %s\n".

* m4/libtool.m4 (archive_cmds) [os2*]: Replace $ECHO with echo
(archive_expsym_cmds) [os2*]: Likewise.

3 months agoltmain.in: Handle clang's -resource-dir flag.
Alexey Samsonov [Wed, 11 Feb 2026 08:07:26 +0000 (08:07 +0000)] 
ltmain.in: Handle clang's -resource-dir flag.

When Clang is used to cross compile, the user may list
-resource-dir flag that Clang driver uses to discover
target-specific headers and runtime libraries.

* build-aux/ltmain.in: Pass clang's '-resource-dir=*' flag for
  choosing compiler resource files, such as runtime libraries
  through libtool unchanged.
* NEWS: Update.

4 months agolibtool.texi: Update link mode documentation
Ileana Dumitrescu [Sat, 24 Jan 2026 17:09:08 +0000 (19:09 +0200)] 
libtool.texi: Update link mode documentation

* doc/libtool.texi: Specify a directory after the '-bindir' option
  when linking.

5 months agoltmain.in: Recognise options for static linking with Clang
Ileana Dumitrescu [Tue, 30 Dec 2025 16:08:05 +0000 (18:08 +0200)] 
ltmain.in: Recognise options for static linking with Clang

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

* build-aux/ltmain.in: Add --static and -Bstatic options.
* NEWS: Update.

5 months agoUpdate NEWS for commit 7430a961fa003c3dd69b9f7ab724f7ba74c876ed
Ileana Dumitrescu [Fri, 2 Jan 2026 20:13:57 +0000 (22:13 +0200)] 
Update NEWS for commit 7430a961fa003c3dd69b9f7ab724f7ba74c876ed

5 months agoUpdate NEWS
Ileana Dumitrescu [Fri, 2 Jan 2026 20:11:31 +0000 (22:11 +0200)] 
Update NEWS

5 months agoltmain.in: Fix file path conversions for MSYS2 and MSVC
Kirill Makurin [Fri, 2 Jan 2026 18:22:57 +0000 (20:22 +0200)] 
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.

5 months agolibtool: Update copyright year
Ileana Dumitrescu [Fri, 2 Jan 2026 18:09:41 +0000 (20:09 +0200)] 
libtool: Update copyright year

5 months agognulib: Update submodule
Ileana Dumitrescu [Fri, 2 Jan 2026 18:03:00 +0000 (20:03 +0200)] 
gnulib: Update submodule

6 months agoAdd testing for slimcc compiler
Ileana Dumitrescu [Wed, 3 Dec 2025 16:57:53 +0000 (18:57 +0200)] 
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

6 months agolibtool.m4: Add support for slimcc
Arnold [Mon, 11 Aug 2025 11:49:51 +0000 (14:49 +0300)] 
libtool.m4: Add support for slimcc

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

6 months agolibtool: Limit a length of DLL name to 8.3 correctly
KO Myung-Hun [Thu, 13 Nov 2025 05:41:48 +0000 (14:41 +0900)] 
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.

6 months agoltmain.in: add parentheses to support values with spaces
Richard J. Mathar [Thu, 13 Nov 2025 09:09:40 +0000 (10:09 +0100)] 
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.

7 months agolibtool: Remove old_archive_from_new_cmds on OS/2
KO Myung-Hun [Sun, 9 Feb 2025 14:23:30 +0000 (23:23 +0900)] 
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.

8 months agolibtool.texi: Update descriptions for command-line options
Patrice Dumas [Sun, 21 Sep 2025 21:06:00 +0000 (00:06 +0300)] 
libtool.texi: Update descriptions for command-line options

* doc/libtool.texi: Make descriptions for '--no-finish' and
  '--reorder-cache' clearer for users to understand.

8 months agolibtool.m4: Fix syntax error in LT_PROG_OBJC and LT_PROG_OBJCXX
Frederic Berat [Tue, 30 Sep 2025 14:04:00 +0000 (17:04 +0300)] 
libtool.m4: Fix syntax error in LT_PROG_OBJC and LT_PROG_OBJCXX

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

8 months agolibtool.m4: Fix Objective C++ check
Ileana Dumitrescu [Fri, 26 Sep 2025 18:42:18 +0000 (21:42 +0300)] 
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.

8 months agomaint: post-release administrivia
Ileana Dumitrescu [Thu, 18 Sep 2025 14:16:22 +0000 (17:16 +0300)] 
maint: post-release administrivia

* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.

8 months agoversion 2.6.0
Ileana Dumitrescu [Thu, 18 Sep 2025 13:43:33 +0000 (16:43 +0300)] 
version 2.6.0

* NEWS: Record release date.

9 months agoltmain.in: Pass through all warning flags to the linker.
Elizabeth Figura [Mon, 25 Aug 2025 23:10:18 +0000 (18:10 -0500)] 
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.

9 months agoMakefile.am: Reorder testsuite
Ileana Dumitrescu [Tue, 2 Sep 2025 17:10:44 +0000 (20:10 +0300)] 
Makefile.am: Reorder testsuite

9 months agoAdd test file for libtool-next-version script
Ileana Dumitrescu [Thu, 28 Aug 2025 17:58:52 +0000 (20:58 +0300)] 
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.

9 months agoAdd support for ML64
Ileana Dumitrescu [Thu, 21 Aug 2025 14:54:14 +0000 (17:54 +0300)] 
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.

9 months agoNew Intel OneAPI compiler names
Ileana Dumitrescu [Sat, 9 Aug 2025 11:22:47 +0000 (14:22 +0300)] 
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.

10 months agognulib: Update submodule
Ileana Dumitrescu [Wed, 6 Aug 2025 14:53:35 +0000 (17:53 +0300)] 
gnulib: Update submodule

10 months agocfg.mk: Ignore sc_codespell checks
Ileana Dumitrescu [Wed, 6 Aug 2025 14:11:13 +0000 (17:11 +0300)] 
cfg.mk: Ignore sc_codespell checks

10 months agognulib: Update submodule
Ileana Dumitrescu [Wed, 6 Aug 2025 13:49:22 +0000 (16:49 +0300)] 
gnulib: Update submodule

10 months agolibtool.m4: Bump serial
Ileana Dumitrescu [Tue, 5 Aug 2025 16:39:47 +0000 (19:39 +0300)] 
libtool.m4: Bump serial

10 months agoUpdate NEWS
Ileana Dumitrescu [Tue, 5 Aug 2025 16:36:25 +0000 (19:36 +0300)] 
Update NEWS

10 months agotests: Remove CPPFLAGS from some compile commands
Ileana Dumitrescu [Thu, 24 Jul 2025 15:16:44 +0000 (18:16 +0300)] 
tests: Remove CPPFLAGS from some compile commands

* tests/flags.at, tests/infer-tag.at: Remove unneeded CPPFLAGS from
  OBJC & OBJCXX compile commands.

10 months agotests/bug_71489.at: Split into two test cases
Ileana Dumitrescu [Thu, 24 Jul 2025 14:50:49 +0000 (17:50 +0300)] 
tests/bug_71489.at: Split into two test cases

10 months agolibltdl: Fix libltdl early failures for multi-arch
Pierre Ossman [Tue, 1 Apr 2025 13:47:44 +0000 (16:47 +0300)] 
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.

10 months agoltmain.in: Fix reordering --as-needed
Pierre Ossman [Tue, 1 Apr 2025 13:44:51 +0000 (16:44 +0300)] 
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.

10 months agom4: Fix flang -Wl flags on FreeBSD
Gleb Popov [Tue, 1 Jul 2025 18:15:30 +0000 (21:15 +0300)] 
m4: Fix flang -Wl flags on FreeBSD

10 months agomaint: fix Automake warning
Collin Funk [Mon, 7 Jul 2025 03:23:35 +0000 (20:23 -0700)] 
maint: fix Automake warning

* Makefile.am (prologue): Remove macro.
(THANKS): Use the perl command directly.

10 months agoltmain.in: Handle clang's target architecture flag
Ileana Dumitrescu [Mon, 14 Jul 2025 15:39:21 +0000 (18:39 +0300)] 
ltmain.in: Handle clang's target architecture flag

* build-aux/ltmain.in: Pass clang's '--target' flag for specifying
  architecture through libtool unchanged.

10 months agolibtool.m4: Replace '${COMSPEC-cmd}' with 'cmd'
Ileana Dumitrescu [Thu, 10 Jul 2025 17:52:42 +0000 (20:52 +0300)] 
libtool.m4: Replace '${COMSPEC-cmd}' with 'cmd'

10 months agolibtool: Forward slash escaping check on Windows
Evgeny Grin [Fri, 4 Jul 2025 15:02:31 +0000 (18:02 +0300)] 
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.

11 months agolibtool.m4: Fix missing quotes for lt_ar_flags
Ileana Dumitrescu [Thu, 19 Jun 2025 14:01:11 +0000 (17:01 +0300)] 
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.

11 months agolibtool: Support MSYS and MSYS2 file path conversions
Ileana Dumitrescu [Mon, 16 Jun 2025 18:06:51 +0000 (21:06 +0300)] 
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.

12 months agolibltdl: Undeclared reference to access on Windows
Kirill Makurin [Thu, 5 Jun 2025 16:22:42 +0000 (16:22 +0000)] 
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.

12 months agoltmain.in: Temporary comment update.
Ileana Dumitrescu [Fri, 6 Jun 2025 13:45:06 +0000 (16:45 +0300)] 
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.

12 months agonotes.texi: Inform users about MSVC configuration
Ileana Dumitrescu [Fri, 6 Jun 2025 13:37:57 +0000 (16:37 +0300)] 
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.

12 months agotests: Skip failing tests on MSVC
Ileana Dumitrescu [Wed, 7 May 2025 14:39:36 +0000 (17:39 +0300)] 
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.

12 months agoinherited_flags.at: Fix test on MSVC
Ileana Dumitrescu [Thu, 17 Apr 2025 14:28:50 +0000 (17:28 +0300)] 
inherited_flags.at: Fix test on MSVC

* tests/inherited_flags.at: Modify grep to limit search range.

12 months agolibtool: Fix MSVC cl.exe .exp extension collision
Mitch [Mon, 2 Dec 2024 20:47:48 +0000 (22:47 +0200)] 
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.

12 months agoltmain.in: Add 'S_ISDIR' definition for MSVC
Ileana Dumitrescu [Wed, 26 Mar 2025 15:19:39 +0000 (17:19 +0200)] 
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.

12 months agoltmain.in: Fix hang with cmd.exe in MSYS
Ileana Dumitrescu [Wed, 19 Feb 2025 16:58:16 +0000 (18:58 +0200)] 
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.

12 months agolibtoolize.at: Update checks based on linker used
Ileana Dumitrescu [Mon, 30 Dec 2024 15:55:30 +0000 (17:55 +0200)] 
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.

12 months agolibtool.m4: preload valid C symbol names only
Michael Haubenwallner [Tue, 16 May 2017 09:49:05 +0000 (11:49 +0200)] 
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.

12 months agolibtool.m4: For MS dumpbin drop CR first.
Michael Haubenwallner [Thu, 11 May 2017 12:10:17 +0000 (14:10 +0200)] 
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.

12 months agolibtoolize.in: Create symlinks with mklink for MSVC
Ileana Dumitrescu [Wed, 11 Dec 2024 16:43:47 +0000 (18:43 +0200)] 
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.

12 months agotests: Include check for __CYGWIN__ for crossbuilds
Ileana Dumitrescu [Wed, 11 Dec 2024 16:43:47 +0000 (18:43 +0200)] 
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.

12 months agotagdemo.at: Update for MSVC
Ileana Dumitrescu [Wed, 11 Dec 2024 16:43:47 +0000 (18:43 +0200)] 
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.

12 months agolibtool: Alter expected line endings in testsuite
Ileana Dumitrescu [Mon, 7 Apr 2025 16:55:23 +0000 (19:55 +0300)] 
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.

12 months agotestsuite.at: Update testsuite config for MSVC
Ileana Dumitrescu [Wed, 11 Dec 2024 16:43:47 +0000 (18:43 +0200)] 
testsuite.at: Update testsuite config for MSVC

* tests/testsuite.at: Make symlink tool mlink for MSVC.

12 months agolibtool: Fix mishandling compiler flags with MSVC tools
Ileana Dumitrescu [Tue, 7 Jan 2025 17:34:11 +0000 (19:34 +0200)] 
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.

12 months agoNEWS: Update for previous commits
Ileana Dumitrescu [Mon, 19 May 2025 16:42:34 +0000 (19:42 +0300)] 
NEWS: Update for previous commits

12 months agoAllow statically linking compiler support libraries when linking a library
Martin Storsjö [Mon, 19 Aug 2019 10:34:51 +0000 (13:34 +0300)] 
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.

12 months agoPick up clang_rt static archives compiler internal libraries
Manoj Gupta [Wed, 10 Oct 2018 07:50:23 +0000 (10:50 +0300)] 
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

12 months agolibtool: Update documentation
Ileana Dumitrescu [Fri, 16 May 2025 16:08:18 +0000 (19:08 +0300)] 
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.

13 months agodoc: Explain how to specify library dependencies.
Bruno Haible [Tue, 6 May 2025 15:00:51 +0000 (17:00 +0200)] 
doc: Explain how to specify library dependencies.

* doc/libtool.texi (Link mode): Explain how to specify dependencies to
already installed libraries.

13 months agoNEWS: Update for previous commit
Ileana Dumitrescu [Fri, 2 May 2025 18:39:00 +0000 (21:39 +0300)] 
NEWS: Update for previous commit

13 months agoMove mlibc case matches above GNU/Linux (and similar) ones.
Mintsuki [Sun, 27 Apr 2025 19:01:12 +0000 (21:01 +0200)] 
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.

13 months agoNEWS: Update for bugs fixed
Ileana Dumitrescu [Tue, 15 Apr 2025 14:32:50 +0000 (17:32 +0300)] 
NEWS: Update for bugs fixed

13 months agom4: Update serials for modified files
Ileana Dumitrescu [Fri, 11 Apr 2025 17:57:53 +0000 (20:57 +0300)] 
m4: Update serials for modified files

14 months agolibtool: Add configuration options for CXX linking
Ileana Dumitrescu [Tue, 25 Mar 2025 15:57:44 +0000 (17:57 +0200)] 
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.

14 months agolibtool.m4: Fix postdeps in NetBSD
Anthony Mallet [Sun, 23 Mar 2025 12:56:14 +0000 (13:56 +0100)] 
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

14 months agoltmain.in: Supporting -S and -t flags from install-sh
Julien ÉLIE [Thu, 20 Mar 2025 22:15:45 +0000 (00:15 +0200)] 
ltmain.in: Supporting -S and -t flags from install-sh

Libtool silently discards options for install-sh that have not been
specified. Now the install directory and a suffix for backing up
files can be specified to be passed through libtool.

Reported: https://savannah.gnu.org/patch/index.php?10510

* build-aux/ltmain.in: Recognize -S and -t flags from install-sh.

15 months agoMakefile.am: Clean new file, libtool-next-version
Ileana Dumitrescu [Wed, 5 Mar 2025 15:24:03 +0000 (17:24 +0200)] 
Makefile.am: Clean new file, libtool-next-version

15 months agolibtool-next-version.in: Make syntactical changes
Ileana Dumitrescu [Thu, 27 Feb 2025 16:47:41 +0000 (18:47 +0200)] 
libtool-next-version.in: Make syntactical changes

15 months agolibtool.m4: Fix for invalid postdeps
Christian Feld [Mon, 10 Feb 2025 10:53:07 +0000 (10:53 +0000)] 
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.

15 months agoNEWS: Update for commit c41501afc371842ceccecd8bd6586f8fb85a37c2
Ileana Dumitrescu [Wed, 26 Feb 2025 20:07:17 +0000 (22:07 +0200)] 
NEWS: Update for commit c41501afc371842ceccecd8bd6586f8fb85a37c2

15 months agolibtool.texi: Update newlines for previous commit
Ileana Dumitrescu [Wed, 26 Feb 2025 19:46:33 +0000 (21:46 +0200)] 
libtool.texi: Update newlines for previous commit

The documentation follows the traditional method of inserting newlines
before the 80 character limit, with a few exceptions. Now, the
documentation will use some semantic newlines, specifically inserting
newlines for clause breaks (commas, semicolons, colons, and so on).
However, it will only break on symbols, instead of also breaking for
phrases, and it will still utilize the 80 character limit should a
symbol break not exist first.

* doc/libtool.texi: Alter line breaks to use partial semantic newlines.

15 months agoNew program libtool-next-version.
Bruno Haible [Wed, 26 Feb 2025 14:07:39 +0000 (15:07 +0100)] 
New program libtool-next-version.

* libtool-next-version.in: New file, based on
gnulib/build-aux/libtool-next-version.
* doc/libtool.texi (Updating version info): Add sub-nodes
'Manual version info update', 'Guided version info update',
'Invoking libtool-next-version'.
* Makefile.am (BUILT_SOURCES): Add libtool-next-version.
(libtoolnextv_in): New variable.
(EXTRA_DIST): Add it.
(bin_SCRIPTS): Add libtool-next-version.
(libtool-next-version): New target.
(libtoolnextv_1): New variable. New target.
(dist_man1_MANS): Add it.

15 months agodarwin.at: Avoid skipping macOS test
Ileana Dumitrescu [Tue, 25 Feb 2025 20:10:12 +0000 (22:10 +0200)] 
darwin.at: Avoid skipping macOS test

The test for 'darwin fat compile' is being skipped on 64-bit machines,
since the architecture option was specifying i386 (deprecated on macOS).

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

* tests/darwin.at: Update to use architecture arm64 instead of i386.

15 months agoltmain.in: Fix mistaking a directory as an executable
Takashi Yano [Wed, 19 Feb 2025 23:37:27 +0000 (01:37 +0200)] 
ltmain.in: Fix mistaking a directory as an executable

find_executable() can return a directory of the same name as the target
executable if the directory is found earlier in the PATH, which causes
check_executable() to fail.

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

* build-aux/ltmain.in: Check if directory is found before executable
  in the PATH.

15 months agom4: Update serials for modified files
Ileana Dumitrescu [Thu, 13 Feb 2025 15:27:45 +0000 (17:27 +0200)] 
m4: Update serials for modified files

15 months agolibtool.m4: Fix replacement of postdeps in NetBSD
Ileana Dumitrescu [Tue, 11 Feb 2025 16:04:45 +0000 (18:04 +0200)] 
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.

15 months agolibtool.m4: Update NetBSD postdeps for shared libraries
Ileana Dumitrescu [Mon, 10 Feb 2025 19:28:06 +0000 (21:28 +0200)] 
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.