Commit Graph

4425 Commits

Author SHA1 Message Date
Ileana Dumitrescu
e5dfb39aab
libtool: Fix --no-warnings flag
Passing --no-warnings to libtool would not suppress warning messages.

* build-aux/ltmain.in: Add 'opt_warning' check before printing out
  warning messages.
* tests/libtool.at: Add simple test for '--no-warnings'.
* NEWS: Update.
2024-11-20 17:36:29 +02:00
Ileana Dumitrescu
270b7bb2db
ltmain.in: Fix infinite loop for error messages
If an invalid argument is passed to options '--mode' or '--reorder-cache'
after a valid command, error messages will print infinitely:

  $ libtool --help --mode=MODE
  libtool:   error: invalid argument 'MODE' for --mode
  libtool:   error: invalid argument 'MODE' for --mode
  libtool:   error: invalid argument 'MODE' for --mode
  ...

* build-aux/ltmain.in: Remove 'break' in case statement to fix infinite
  loop, and add shift for option '--reorder-cache' to allow more options
  to be processed.
2024-11-20 17:36:29 +02:00
Ileana Dumitrescu
0a8c7b00ed
ltmain.in: Upgrade warnings to errors 2024-11-20 17:36:29 +02:00
Ileana Dumitrescu
98bcb0ba98
ltmain.in: Update libtool usage for missing options
Some options were not listed in the usage output of libtool: --finish,
--no-quiet, and --no-silent.
2024-11-20 17:36:28 +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
4ba29e983c
libtool: Add option to reorder the shared library cache
Add option to reorder the shared library cache in OpenBSD so that user
preferred directories for shared libraries can be used when linking
before directories previously listed in the shared library cache.

This allows for users in OpenBSD to easily switch between versions of
libraries with the same name during testing.

* NEWS: Update for new (OpenBSD) option.
* build-aux/ltmain.in: Add option --reorder-cache=DIRS.
* doc/libtool.texi: Update documentation for new option.
* test/bug_71489.at: Alter test for OpenBSD to utilize new option.
2024-11-20 17:36:21 +02:00
Ileana Dumitrescu
1bda2465d7
libtool: Fix local testing of shared libraries on OpenBSD
On OpenBSD 7.5, the shared library cache is updated with finish_cmds,
which causes the test for 'Use local version' to fail. Simply, installed
versions of shared libraries take precedence over those locally built.

To ensure local versions of shared libraries can be tested properly and
more easily, additional options have been added to libtool to skip
executing finish_cmds, like 'ldconfig -m $libdir' in OpenBSD.

* build-aux/ltmain.in: Add libtool option, '--no-finish.
* doc/libtool.texi: Document new option in libtool.
* NEWS: Update.
2024-11-20 17:03:12 +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
Ileana Dumitrescu
ab43d096d1
libtool: Avoid test failure in OpenBSD
The following errors can be seen for the 'execute mode' test in OpenBSD:
  build/libtool: test: <: missing second argument
  build/libtool: test: >: missing second argument

The cwrapper in OpenBSD cannot parse these symbols as arguments in
execute mode if there are no other characters with them.

* tests/execute-mode.at: Escape '<' and '>' in OpenBSD.
2024-11-20 16:42:14 +02:00
Ileana Dumitrescu
6b119a1c79
libtool: Use wrapper function for AUTORECONF
Update tests to skip if required autotools are not installed for
executing AUTORECONF and to have stdout saved for checks.

* tests/bug_42313.at: Use LT_AT_AUTORECONF instead of AT_CHECK.
* tests/testsuite.at: Save stdout for LT_AT_AUTORECONF.
2024-11-20 16:42:14 +02:00
Ileana Dumitrescu
ad4b513fca
libtool: Test trailing slash in destination
This test is added to ensure path comparisons pass when
installing to a destination, specifically when there is a
trailing slash in the destination.

* tests/destdir.at: Add test for trailing slash in destination.
2024-11-20 16:42:13 +02:00
Richard Purdie
65026af3bc
ltmain.in: Handle trailing slashes on install commands
A command like:

libtool --mode=install /usr/bin/install -c gck-roots-store-standalone.la
'/image/usr/lib/gnome-keyring/standalone/'

where the path ends with a trailing slash currently fails. This occurs in
software like gnome-keyring or pulseaudio and is because the comparision
code doesn't see the paths as equal. Strip both paths to ensure this works
reliably.

* build-aux/ltmain.in: Strip trailing slashes on install commands.
* NEWS: Update.
2024-11-20 16:41:17 +02:00
Ileana Dumitrescu
5586070a71
gnulib: Update submodule to recent commit 2024-10-22 20:02:18 +03:00
Ileana Dumitrescu
09aff4a6bc
Update NEWS for recent commits 2024-10-22 20:02:18 +03:00
Alastair McKinstry
506283c381
libtool.m4: Support for more flang compilers 2024-10-22 20:02:18 +03:00
Alastair McKinstry
43c5983836
ltmain.in: Add error message for unknown version type 2024-10-22 20:02:17 +03:00
Alastair McKinstry
4e6ccefb94
libtool: Change how version is derived
Avoid duplication of '(GNU @PACKAGE@) @VERSION@' in multiple
places by using '$scriptversion'.

* libtoolize.in, build-aux/ltmain.in: Change version from
  '(GNU @PACKAGE@) @VERSION@' to '$scriptversion'.
2024-10-22 20:02:17 +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
257113789c
Makefile.am: Generate description for 'whatis' command
Add '-n' to 'help2man' for documentation and manpage.
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
Jonathan Nieder
3217b3840c
libtool.texi: Wrong names for structure members
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=304400
2024-10-22 20:02:15 +03:00
Jonathan Nieder
c7e99b6b74
libtool.texi: Documentation inconsitent with libltdl3
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=253904
2024-10-22 20:02:15 +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
3226abb870
Update documentation and version output
* libtoolize.in: Overwrite function in bootstrap for printing version
  information for libtoolize.
* build-aux/ltmain.in: Overwrite function in bootstrap for printing
  version information for libtool.
* doc/libtool.texi: Fix typo and correct references for tests/demo
  subdirectory to the tests/demo.at Autotest file.
* gl/top/README-release.diff: Add documentation for maintainers so
  the CVS repository is properly updated following a stable release.
2024-10-22 20:00:47 +03:00
Sergey Poznyakoff
b6c8850a43
Don't omit directories from the constructed rpath.
This fixes bug introduced by 0e1b333324.

* build-aux/ltmain.in: Don't omit paths that are not under $progdir
from the compiled_rpath.  Append them to the end of it.
* NEWS: Update for bug fix.
2024-10-22 20:00:02 +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
dd2c8f9411
maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2024-09-25 18:20:25 +03:00
Ileana Dumitrescu
94dd1a2094
version 2.5.3
* NEWS: Record release date.
2024-09-25 17:51:57 +03:00
Ileana Dumitrescu
3ab1239727
Update tests without aclocal to expect failure
Five tests use aclocal, but do not have a check for whether aclocal is
available to use. This causes reported tests failures in Linux From
Scratch and Darwin builds.

* tests/standalone.at: Add AT_XFAIL_IF check for aclocal for all tests.
* tests/subproject.at: Add AT_XFAIL_IF check for aclocal for last test.
2024-09-25 16:34:50 +03:00
Ileana Dumitrescu
138cf5b271
Update NEWS for recent changes 2024-09-18 17:15:57 +03:00
Ileana Dumitrescu
a36e1d8d1e
libtool: Update documentation
* Makefile.am: Fix typo.
* doc/libtool.texi: Add missing test case descriptions and specify
  option and command where missing in test case descriptions.
2024-09-18 17:15:57 +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
0483b0d83d
Update NEWS for recent changes 2024-09-13 20:21:20 +03:00
Ileana Dumitrescu
5c8a2d1ce0
gnulib: Update submodule to recent commit 2024-09-13 20:21:19 +03:00
Ileana Dumitrescu
ad45988cc6
Fix copyrights for recent test files
* tests/bug_62343.at: Remove years where test file did not exist.
* tests/bug_71489.at: Add missing copyright header.
2024-09-13 20:19:34 +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
Bruno Haible
6c8203d2ae
Rename option --with-aix-soname to --enable-aix-soname.
Reported at <https://savannah.gnu.org/support/index.php?110674>.

* doc/libtool.texi (LT_INIT): Talk about --enable-aix-soname instead of --with-aix-soname.
* m4/ltoptions.m4 (_LT_WITH_AIX_SONAME): Use AC_ARG_ENABLE instead of
AC_ARG_WITH. In the default case, use _AC_ENABLE_IF, in order to still
recognize the old option --with-aix-soname.
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): Update comment.
* configure.ac: Update comment.
* NEWS: Mention the change.
2024-09-13 20:19:33 +03:00
Bruno Haible
9a8535f4e9
Rename option --with-pic to --enable-pic.
Reported at <https://savannah.gnu.org/support/index.php?110674>.

* doc/libtool.texi (LT_INIT): Talk about --enable-pic instead of
--with-pic, and about --disable-pic instead of --without-pic.
(Test descriptions): Likewise.
* m4/ltoptions.m4 (_LT_WITH_PIC): Use AC_ARG_ENABLE instead of
AC_ARG_WITH. In the default case, use _AC_ENABLE_IF, in order to still
recognize the old options --with-pic and --without-pic.
* tests/demo.at: Add a test for --enable-pic, keeping the test for
--with-pic. Test '--disable-pic' instead of '--with-pic=no'.
* tests/with-pic.at: Test --enable-pic instead of --with-pic.
* NEWS: Mention the change.
2024-09-13 20:19:33 +03:00
Ileana Dumitrescu
ec703fac9e
libtool: FSF office address replaced by URL
* AUTHORS, HACKING, Makefile.am, bootstrap.conf, build-aux/edit-readme-alpha,
build-aux/no-bogus-m4-defines, cfg.mk, configure.ac, libltdl/configure.ac,
libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__argz_.h,
libltdl/libltdl/lt__dirent.h, libltdl/libltdl/lt__glibc.h,
libltdl/libltdl/lt__private.h, libltdl/libltdl/lt__strl.h,
libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h,
libltdl/libltdl/lt_system.h, libltdl/libltdl/slist.h,
libltdl/loaders/dld_link.c, libltdl/loaders/dlopen.c,
libltdl/loaders/dyld.c, libltdl/loaders/load_add_on.c,
libltdl/loaders/loadlibrary.c, libltdl/loaders/preopen.c,
libltdl/loaders/shl_load.c, libltdl/lt__alloc.c, libltdl/lt__argz.c,
libltdl/lt__dirent.c, libltdl/lt__strl.c, libltdl/lt_dlloader.c,
libltdl/lt_error.c, libltdl/ltdl.c, libltdl/ltdl.h, libltdl/ltdl.mk,
libltdl/slist.c, tests/am-subdir.at, tests/archive-in-archive.at,
tests/bindir.at, tests/bug_62343.at, tests/cdemo.at, tests/cmdline_wrap.at,
tests/configure-funcs.at, tests/configure-iface.at, tests/convenience.at,
tests/ctor.at, tests/cwrapper.at, tests/darwin.at, tests/demo.at,
tests/depdemo.at, tests/deplib-in-subdir.at, tests/deplibs-ident.at,
tests/deplibs-mingw.at, tests/destdir.at, tests/dlloader-api.at,
tests/dumpbin-symbols.at, tests/duplicate_conv.at, tests/duplicate_deps.at,
tests/duplicate_members.at, tests/early-libtool.at, tests/exceptions.at,
tests/execute-mode.at, tests/exeext.at, tests/export-def.at,
tests/export.at, tests/f77demo.at, tests/fail.at, tests/fcdemo.at,
tests/flags.at, tests/help.at, tests/indirect_deps.at, tests/infer-tag.at,
tests/inherited_flags.at, tests/install.at, tests/lalib-syntax.at,
tests/libtool.at, tests/libtoolize.at, tests/link-order.at,
tests/link-order2.at, tests/loadlibrary.at, tests/localization.at,
tests/lt_dladvise.at, tests/lt_dlexit.at, tests/lt_dlopen.at,
tests/lt_dlopen_a.at, tests/lt_dlopenext.at, tests/ltdl-api.at,
tests/ltdl-libdir.at, tests/mdemo.at, tests/need_lib_prefix.at,
tests/no-executables.at, tests/nocase.at, tests/nonrecursive.at,
tests/old-m4-iface.at, tests/pic_flag.at, tests/recursive.at,
tests/resident.at, tests/runpath-in-lalib.at, tests/search-path.at,
tests/shlibpath.at, tests/slist.at, tests/standalone.at, tests/static.at,
tests/stresstest.at, tests/subproject.at, tests/sysroot.at, tests/tagdemo.at,
tests/template.at, tests/testsuite.at, tests/versioning.at,
tests/with-pic.at: Replace FSF address in each file's license block with
a URL that points to licenses online hosted by GNU.
2024-09-13 20:19:33 +03:00
Bruno Haible
001ca1d070
Document situations where -export-symbols does not work.
* doc/libtool.texi (Link mode): Document that -export-symbols does not work on
static libraries. Document the most important platforms where it does not work
on shared libraries.
2024-09-13 20:19:32 +03:00
Ileana Dumitrescu
2fe3a3e2a9
maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2024-08-29 17:26:50 +03:00
Ileana Dumitrescu
d8d346ef7e
version 2.5.2
* NEWS: Record release date.
2024-08-29 16:58:22 +03:00
Ileana Dumitrescu
32d46d5daa
Update NEWS for recent changes 2024-08-27 18:19:02 +03:00
Ileana Dumitrescu
07ef1f34ee
README-release: Update compiler environment variable
When compiling C++ code, CXX should be used to set the compiler
to g++ instead of CC, which is for setting a C compiler.
2024-08-27 18:19:02 +03:00