4490 Commits

Author SHA1 Message Date
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
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
Julien ÉLIE
8b9ce14af0
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.
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
Bruno Haible
b31819c723
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'. Note, line breaks use
partial semantic newlines.
* 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.
* NEWS: Update.
2025-04-11 20:41:51 +03:00
Ileana Dumitrescu
da70d4ca79
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.
2025-04-11 20:38:24 +03:00
Takashi Yano
961aa57f14
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.
2025-04-11 20:38:16 +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
3bd36a0ff4
Revert "libtool: Skip passing CXX flags test on NetBSD"
This reverts commit 2da3546a0de5c952a2ffd20db6ff310a32a6f373.
2025-02-13 17:02:16 +02:00
Ileana Dumitrescu
1fc54e815f
ltmain.in: Increase revision limit to 19 digits
Current, age, and revision values for a library seem to have been chosen
arbitrarily, which is limiting users to a 5 digit maximum. Now, users
can set revision to at most 19 digits, which is referencing Unix epoch
time in nanoseconds.

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

* build-aux/ltmain.in: Update revision check to allow up to 19 digits.
* tests/versioning.at: Add more version checks to test.
* NEWS: Update.
2025-02-13 17:02:15 +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
Karl Berry
7dc108c324
libtool.texi: Update tagging documentation
* doc/libtool.texi: Failure to infer a tag results in a fatal error,
  not in defaulting to tag CC.
2025-02-13 17:02:15 +02:00
Frédéric Bérat
bc61f9756f
ltmain.in: Compiler dependencies wrongly deduplicated
Removing duplicate compiler dependencies causes linking problems on
linux with GCC libraries. This deduplication optimization is no longer
used for linux hosts.

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

* build-aux/ltmain.in: Add linux to list of hosts that do not remove
  duplicate compiler dependencies.
* NEWS: Update.
2025-02-13 17:01:38 +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
37c07d2ed0
demo.at: Skip test if deplibs_check_method is not pass_all
The test 'deplibs_check_method' was designed to verify pass_all
works as expected. Many warnings occur for systems that do not
have deplibs_check_method set to pass_all, so this test is skipped
on those.

* tests/demo.at: Add check for deplibs_check_method=pass_all.
2025-02-13 16:57:05 +02:00
Ileana Dumitrescu
ea921da846
ltmain.in: Update info supplied to user for --tag usage
* build-aux/ltmain.in: Make error message more explicit for users,
  and add tag name information to help menu.
* tests/infer-tag.at: Add testcase for unsupported compiler use.
2025-02-13 16:57:05 +02:00
Ileana Dumitrescu
e24d6ec92b
ltmain.in: Replace old warnings with documentation
Without the ability to disable these old warnings individually, they
are migrating to the relevant section of the documentation to inform
new users that may not know. These warnings have been present for
two decades, so existing users should be aware of this functionality.

* build-aux/ltmain.in: Remove old warnings.
* doc/libtool.texi: Document contents of warning messages.
2025-02-13 16:56:40 +02:00
Ileana Dumitrescu
e66abb28cf
libtool.texi: Document '--no-warnings' in manual 2025-02-13 16:56:39 +02:00
Ileana Dumitrescu
b341c9f8d0
libtool: Update copyright year 2025-01-02 16:30:23 +02:00
Ileana Dumitrescu
1211b4cb76
gnulib: Update submodule 2025-01-02 16:26:27 +02:00
Ileana Dumitrescu
baa1fe41f9
maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2024-11-20 22:08:47 +02:00
Ileana Dumitrescu
db22f7fce7
version 2.5.4
* NEWS: Record release date.
v2.5.4
2024-11-20 21:40:14 +02:00