A function used in a test was not returning a value, while an int was
expected so the test would fail to compile.
tests/resident.at: Return the result of atexit().
When the configure option "--disable-shared" is used, this test will be
skipped since no libtool libs are built.
tests/bug_62343.at: Check if build_libtool_libs is set to no.
Several warning messages have been updated to use func_warning rather
than echo. This will allow them to be disabled properly.
* build-aux/ltmain.in: Replace echo command with func_warning function.
By default, CATEGORY is set to "all" for all of the warning messages to
be output to standard error. CATEGORY can be set to "none" to disable
warnings.
* doc/libtool.texi: Document "W" or "--warnings=CATEGORY" option.
When using the -no-canonical-prefixes flag in libtool, the flag is
removed from the linking command, causing linking to fail. This adds
the flag to the list of linker flags to be passed through to the
linker.
* build-aux/ltmain.in: Pass -no-canonical-prefixes to the linker.
* Makefile.am: Added in tests/bug_62343.at.
* tests/bug_62343.at: Contains test case for bug 62343.
This is cleanup for libtool. The option test_compile is not used in
libtool, and the documentation states that it would probably be dropped
in the future.
* build-aux/ltmain.in: Remove case statement for test_compile.
* doc/libtool.texi: Remove test_compile from documentation.
* m4/libtool.m4: Remove test_compile definition from macro file.
The HACKING file lists some files not to edit that are part of gnulib.
The contents for this list has been expanded to include various files,
including some m4 files.
* HACKING: Added other symbolic links to list of files not to edit.
The libtool documentation is still lacking several test case
descriptions for tests/*demo.at Autotest files.
* doc/libtool.texi: Add missing test case descriptions.
A comment in the libtool manual specifies a TODO for fixing the font
size of the ++ symbol in the TOC. This is fixed by wrapping the
symbol in a @code command, and this TODO can be removed.
* doc/libtool.texi: Wrap ++ in a @code command to fix font in TOC.
The demo compile mode commands in Chapter 3 fail to compile since
the source files include a header file that is not in the header search
list. The config.h file is in the local folder. Before this fix, the
compile mode commands would return errors like below:
main.c:1:10: fatal error: config.h: No such file or directory
1 | #include <config.h>
| ^~~~~~~~~~
compilation terminated.
The '-I' option has been added to the gcc commands to specify that the
local folder should be searched for header files.
* doc/libtool.texi: Add option to demo compile mode commands
Documentation for dlopen(3) states that it is thread safe, and it is
defined this way by POSIX.
* doc/libtool.texi: Remove old dlopen multi-threaded support warnings.
When using the flag -fsanitize=address with g++, the user should also
specify -lasan to ensure linking occurs correctly. libtool uses
-nostdlib, and gcc implicitly includes -lasan when -fsanitize=address
is used. However, g++ does not implicitly include -lasan. The
documentation has been updated to reflect this information rather than
adding the -lasan flag to libtool.
* doc/notes.texi: Document that the user should pass -lasan.
The libtool documentation is lacking several test case descriptions
for tests/*demo.at Autotest files.
* doc/libtool.texi: Add missing test case descriptions.
The libtool documentation included mention of an old test framework.
The documentation has been reworked to indicate the current test
framework used by libtool, where the tests/*demo directories have been
replaced with tests/*demo.at Autotest files.
* doc/libtool.texi: Clarifies where the example files originate.
* TODO: Remove TODO item related to tests/*demo directories.
Multiple compilers on Windows besides the proprietary MSVC compiler
require process.h, and not unistd.h. The inclusion check is expanded
to include these alternative compilers which also require process.h.
* ltmain.in: Replace _MSV_VER with WIN32 and !__GNU_C check
The -R and -L flags are currently checked if they have a space behind
them. -l should be added to the list of cases checked.
* m4/libtool.m4: Check for a space after the -l flag.
These should have been included in the commits that updated these
files, but too late now to rewrite git history.
* m4/libtool.m4: Update serial number.
* m4/ltdl.m4, m4/ltoptions.m4: Likewise.
When running `libtoolize --ltdl`, a symlink to the source config-h.in
is used rather than a copy of the file. This causes the build system
to look at its old timestamp relative to the other generated files
that are copied in, and then try to regenerate things, and update the
config-h.in timestamp by touching the symlink (which will dereference
things). This breaks `make distcheck` because when a few tests run
that invoke `libtoolize --ltdl --install` w/out --copy, and then try
to build the project, automake's rules trigger autoheader regen, and
then update the timestamp, which updates the underlying file, and then
causes libtool's own files to get out of sync. So the next time make
is run in the tree, it tries to regenerate the source files, and fails
as the source tree is read-only.
Change libtoolize to always copying the header over during install.
It's not clear to me whether this is 100% the right answer, but it
shouldn't make things worse beyond missing a case to use a symlink.
We probably can't avoid this as long as aclocal.m4 itself is copied
in instead of symlinked. This changed between v2.4.2 and v2.4.3 in
commit 4e671d6ba6 ("libtoolize:
simplify file-copying and -linking call-graph.").
Example failure log:
$ make distcheck
...
make[3]: Entering directory '.../libtool-2.4.7.62-3e11/_build/sub'
GEN ../../libltdl/Makefile.in
GEN ../../libltdl/configure
autom4te-2.72: error: cannot create autom4te.cache in .../libtool-2.4.7.62-3e11/libltdl: Permission denied
make[3]: *** [Makefile:2411: ../../libltdl/configure] Error 1
make[3]: *** Waiting for unfinished jobs....
autom4te-2.72: error: cannot create autom4te.cache in .../libtool-2.4.7.62-3e11/libltdl: Permission denied
automake-1.16: error: autoconf failed with exit status: 1
make[3]: *** [Makefile:2387: ../../libltdl/Makefile.in] Error 1
We can see this in old-m4-iface.at:AC_WITH_LTDL which doesn't use
--copy with libtoolize:
$ stat libltdl/config-h.in | grep Modify
Modify: 2024-01-18 01:18:52.998059970 -0500
$ make check-local TESTSUITEFLAGS=100
...
100: AC_WITH_LTDL ok
...
$ stat libltdl/config-h.in | grep Modify
Modify: 2024-01-18 01:19:19.254727020 -0500
And in the test log we can see:
100. old-m4-iface.at:113: testing AC_WITH_LTDL ...
...
libtoolize: linking file 'libltdl/config-h.in'
...
./old-m4-iface.at:161: : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --prefix="$prefix" --exec-prefix="$prefix" --bindir="$prefix/bin" --libdir="$prefix/lib" --with-included-ltdl
...
./old-m4-iface.at:161: $as_unset LIBTOOL; $as_unset LIBTOOLIZE; $MAKE $target
stderr:
stdout:
cd libltdl && make
make[1]: Entering directory '/usr/local/src/gnu/libtool/tests/testsuite.dir/100/libltdl'
CDPATH="${ZSH_VERSION+.}:" && cd . && aclocal -I m4
cd . && automake --foreign
CDPATH="${ZSH_VERSION+.}:" && cd . && autoconf
/bin/sh ./config.status --recheck
...
(CDPATH="${ZSH_VERSION+.}:" && cd . && autoheader)
rm -f stamp-h1
touch config-h.in
...
* libtoolize.in: Copy config-h.in.
* tests/libtoolize.at: Change "linking" to "copying".
Various autotools rules will compare the timestamps of config-h.in
and configure, and if config-h.in is newer than configure, attempt
to regenerate it. This breaks `make distcheck` which we need to
produce new releases. So update config-h.in timestamp, but only
up to the configure file.
The breakage is caught because distcheck makes source dirs read-only
before running.
$ make distcheck
...
make[3]: Entering directory '.../libtool-2.4.7.62-7132f/_build/sub'
GEN ../../libltdl/configure
autom4te-2.72: error: cannot create autom4te.cache in .../libtool-2.4.7.62-7132f/libltdl: Permission denied
make[3]: *** [Makefile:2411: ../../libltdl/configure] Error 1
* bootstrap.conf (libtool_fudge_timestamps): Set config-h.in timestamp
to configure.
clang uses -rtlib and -unwindlib to select proper compiler runtime in
some cases. Therefore pass these options to linker when found in
ldflags.
* build-aux/ltmain.in: Handle clang linker options.
If $CC has --sysroot=/, it is a valid configuration however libtool will
then set lt_sysroot to "/".
This means references like $lt_sysroot$libdir become //usr/lib instead
of the more normally expected /usr/lib. This may or may not break something
but certainly is confusing to the user and gives confusing output. Making
"/" simply unset lt_sysroot is much cleaner.
Whilst here, trim any trailing '/' from sysroot paths to drop the duplication
and result in cleaner/consistent output.
* m4/libtool.m4: Cleanup sysroot trailing '/' handling.
If lto is enabled, we need the prefix-map variables to be passed to the
linker to correctly link the objects using correctly mapped paths.
Add these to the list of options libtool passes through.
* build-aux/ltmain.in: Handle prefix-map compiler options.
Here is a small patch to correct builds on svr5.
When the freebsd-elf target was changed, this got missed.
Symptoms were, building newer lib ended up with libfoo.nn a lower number
than the previous version. And building libpng-1.6.29 produced:
libtool: error: CURRENT '' must be a nonnegative integer
libtool: error: '16:29:0' is not valid version information
* build-aux/ltmain.in (func_mode_link): Add sco.
mingw uses msvcrt as it's standard library and does not use libm.
So in LT_LIB_M it can be added to the list of systems which do not
require libm.
* libtool.m4: Add mingw to the list of systems not requiring libm
The "From" should be "from" in the variable name.
Fixes libtool bug https://bugs.gnu.org/38305
* m4/libtool.m4: Change F to f in old_archive_from_new_cmds.
Trying to build clamav on Solaris 11.3 with the Oracle C compiler,
I got the following error:
libtool: error: not configured to extract global symbols from dlpreopened files
I would have expected a build to use dlopen rather than the preopen
fallback so looked for related configure tests that were perhaps
returning the wrong answer.
The global_symbol_pipe being empty seemed a likely culprit.
the last three lines of nm -p on the conftest.o in this test are:
0000000032 T main
0000000016 T nm_test_func
0000000001 C nm_test_var
On Solaris 10, I'd get a D instead of a C. Adding C to the list of
characters in the symcode variable and building again resulted in a
successful build. I've attached a patch to add this C.
Url: https://savannah.gnu.org/patch/?9086
* m4/libtool.m4 (symcode): Add C for solaris.
The -t flag was used as a performance hack for ranlib. The flag was
supported by the GNU toolchain, but is a no-op with the LLVM toolchain.
* m4/libtool.m4: Remove use of -t flag with ranlib.
When building for a nios2 system, the $host tuple starts with "nios2-"
which is caught by the some of the greedy checks for OS/2 in libtool.
In particular, the *os2* branches of switch statements that only want
to match the OS setting end up matching all nios2 targets, which
results in incorrect behavior.
Switch to use $host_os instead of $host and tweak the patterns to
match to avoid this problem for nios2.
* build-aux/ltmain.in: Switch some $host checks to $host_os.
The recent change to change http:// to https:// updated old NEWS
entries. This isn't exactly against the spirit of the "don't
change old NEWS", so update the hash to match.
* cfg.mk (old_NEWS_hash): Update.
This file is mostly UTF-8 already, but some old entries were using
ISO-8859-1. Change them to UTF-8 entirely.
* ChangeLog.old: Change ISO-8859-1 to UTF-8.
Copyright-paperwork-exempt: Yes