Commit Graph

4352 Commits

Author SHA1 Message Date
Ileana Dumitrescu
eeee0216ed
libtool: Add no-undefined flag based on host OS
Without the no-undefined flag, the test will fail on Mingw and
Cygwin, so the flag will be appended for windows compilation. With
the flag, the test will fail on NetBSD, so the flag is removed.

* tests/bug_62343.at: Add no-undefined flag for windows-based
  compilation and remove otherwise.
2024-06-18 20:35:05 +03:00
Ileana Dumitrescu
e40ba04af7
libtool: Check if -no-canonical-prefixes supported
The compiler fails with the -no-canonical-prefixes flag in certain
environments. Check if the flag is supported in the current environment
and skip the test if it is not supported.

* tests/bug_62343.at: Skip test if -no-canonical-prefixes is unsupported
  in the current environment.
2024-06-08 11:16:10 +03:00
Richard Purdie
9a4a02615c
m4/libtool.m4: Fixed AC_CHECK_PROG call
AC_CHECK_TOOL was changed to AC_CHECK_PROG however the arguments are
different and this result is a value of ":". Change this to match the
original intent.

The lack of FILECMD was causing failures for mips64 builds as -m elf was
being passed to LD which isn't supported on our targets.
2024-06-05 20:25:58 +03:00
Ileana Dumitrescu
d5769d0d39
testsuite.at: Replaced $as_echo with AS_ECHO
* testsuite.at: $as_echo was deprecated in Autoconf commit 2b59b6f8a.
  AS_ECHO uses printf which has been well supported for 15 to 20
  years. Use of $as_echo was resulting in a warning message in the
  testsuite logs, and replacing the deprecated macro removes the
  warning messages.
2024-06-04 19:50:50 +03:00
Ileana Dumitrescu
d846b88d2f
Fixed failing test when program-prefix is used
* tests/libtoolize.at: When -program-prefix is used, stdout for the
  program changes from the expected output. As a result, the test
  fails. Replaced the transformed name to account for program-prefix.
2024-06-03 20:38:10 +03:00
Ileana Dumitrescu
a2ccbfea44
cfg.mk: Update old_NEWS_hash
Fixed spacing of latest alpha release 2.5.0.
2024-06-03 17:32:07 +03:00
Ileana Dumitrescu
b8cad780da
ltmain.in: Additional sysroot to prepend to libdir
Addition to commit 3221f9f0fb.
2024-05-31 17:56:09 +03:00
Ileana Dumitrescu
dc3f87dd8e
NEWS: Add news entries for recent changes 2024-05-31 17:32:39 +03:00
Vincent Lefevre
40b73c116e
libtool: pass more flags to the linker
Resolves bug 17750.

* build-aux/ltmain.in (func_mode_link): In the flags to be passed
through unchanged, also pass -static-* and -fcilkplus.
2024-05-31 16:18:34 +03:00
Khem Raj
3221f9f0fb
ltmain.in: Add missing sysroot to library path
When using a sysroot we should append it to libdir, which is helpful in
cross builds as the system is staged in the sysroot. For normal builds,
i.e. when lt_sysroot is not set, it will still behave the same and add
-L/usr/lib to the relink command.

* build-aux/ltmain.in: Prepend sysroot to libdir.
2024-05-30 17:43:15 +03:00
Ileana Dumitrescu
46576dfaf4
tests: Skip Fortran/C demo tests
Using clang with fsanitize results in an incompatible ASan runtime.
It results in the warning message "linked against incompatible ASan
runtimes". This only occurs with the mixed Fortran/C demo.

* tests/f77demo.at: Skip tests for clang compiling with fsanitize.
* tests/fcdemo.at: Skip tests for clang compiling with fsanitize.
2024-05-27 16:14:50 +03:00
Bruno Haible
2048edd2cb
Document how to debug failing or skipped tests.
* HACKING (Test Suite): Explain how to debug a range of tests.
2024-05-20 18:41:16 +03:00
Bruno Haible
17fb010919
Support C++17 compilers in the C++ tests.
* tests/exceptions.at: For C++11 and newer, use the keyword 'noexcept'
instead of the keyword 'throw'.
2024-05-20 18:39:59 +03:00
Bruno Haible
67c5a06a46
libtoolize: Don't use uninitialized variable.
* libtoolize.in (func_serial_update): Initialize my_src_serial and
my_dest_serial before use.
* tests/libtoolize.at: Update expected test result.
2024-05-18 16:04:29 +03:00
Ileana Dumitrescu
3eb91c266a
README.md: Update for additional git branch
A supplementary branch for development and testing has been added. Some
CI checks for different architectures will be done via Github:
 -  https://github.com/gnu-libtool/ci-check

This will be used to help expedite testing and ensure the source code is
ready to be released.
2024-05-17 20:34:06 +03:00
Ileana Dumitrescu
38c166c89b
maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2024-05-13 21:04:21 +03:00
Ileana Dumitrescu
c44bbc3489
version 2.5.0
* NEWS: Record release date.
2024-05-13 20:36:50 +03:00
Ileana Dumitrescu
61e5fd8d45
NEWS: Update news for upcoming alpha release 2024-05-13 16:49:36 +03:00
Ileana Dumitrescu
b860f621d9
AUTHORS: Update current maintainership of libtool 2024-05-11 18:41:19 +03:00
Ileana Dumitrescu
65742fda68
NO-THANKS: Added helpful contributers 2024-05-11 18:37:04 +03:00
Ileana Dumitrescu
c1afb230e1
resident: Fixed syntax error with g++ compilation
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().
2024-05-11 12:07:13 +03:00
Ileana Dumitrescu
d794bda49c
bug_62343: Skip test if not building libtool libs
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.
2024-05-11 11:19:28 +03:00
Ileana Dumitrescu
90710b139b
libtool: Minor syntax and typo fixes
doc/notes.texi: Duplicate "to" removed.
build-aux/ltmain.in: Useless parentheses in cpp directive removed.
2024-05-11 10:52:47 +03:00
Ileana Dumitrescu
3280f27cda
libtool.m4: Incremented serial
* m4/libtool.m4: Incremented serial for previous changes.
2024-05-11 10:29:07 +03:00
Ileana Dumitrescu
7b09183107
ltmain.in: Use func_warning for all warnings
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.
2024-04-20 13:04:33 +03:00
Ileana Dumitrescu
baab057261
libtool: Document warning output options
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.
2024-04-20 12:23:17 +03:00
Ileana Dumitrescu
297b5cf19f
libtool: Pass the "-no-canonical-prefixes" linker flag
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.
2024-04-18 19:26:55 +03:00
Ileana Dumitrescu
88fc2b892c
libtool: Remove test_compile
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.
2024-04-08 22:34:19 +03:00
Ileana Dumitrescu
2eddb6004b
libtool: HACKING file list of files not to edit updated
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.
2024-04-05 21:45:26 +03:00
Ileana Dumitrescu
3a82c4aa8c
libtool: Add more test case descriptions
The libtool documentation is still lacking several test case
descriptions for tests/*demo.at Autotest files.

* doc/libtool.texi: Add missing test case descriptions.
2024-03-28 19:30:26 +02:00
Ileana Dumitrescu
deba4f81d2
libtool: Fix and remove TODO for improperly sized symbol in TOC
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.
2024-03-26 20:02:19 +02:00
Sam James
888bd7ad44
Clang uses -fopenmp=* to allow choosing between libgomp and libomp.
* build-aux/ltmain.in: Pass through -fopenmp=*.
2024-03-25 20:32:30 +02:00
Stephen Webb
a956f5ce7d
ltmain.in: update QNX version_type handling
QNX handles ELF SONAME versioning just like most other targets.
2024-03-25 19:09:08 +02:00
Ileana Dumitrescu
98ed9b7b51
libtool: Fix documentation for demo compile mode commands
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
2024-03-20 17:48:51 +02:00
Ileana Dumitrescu
498bad82f6
libtool: Some outdated documentation warnings removed
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.
2024-03-15 17:53:22 +02:00
Ileana Dumitrescu
3561199667
notes.texi: Specify -lasan with -fsanitize=address in g++
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.
2024-03-13 19:08:54 +02:00
Ileana Dumitrescu
b07d71b36d
libtool: Add test case descriptions
The libtool documentation is lacking several test case descriptions
for tests/*demo.at Autotest files.

* doc/libtool.texi: Add missing test case descriptions.
2024-03-07 20:49:16 +02:00
Ileana Dumitrescu
7f254d9682
libtool: Documentation refers to demo directory that no longer exists
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.
2024-03-06 22:03:17 +02:00
Ozkan Sezer
3afd415a90
ltmain.in: correct windows compiler preprocessor checks
Commit f54924fa5d seems to have been
wrongly applied.
2024-03-01 19:51:32 +02:00
Ileana Dumitrescu
f54924fa5d
ltmain.in: Expand process.h inclusion on Windows
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
2024-02-29 16:25:35 +02:00
Ileana Dumitrescu
fb617e2ba0
libtool.m4: Check for space after -l flag
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.
2024-02-17 18:40:46 +02:00
Mike Frysinger
57dae03b04 m4: update serial numbers in modified files
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.
2024-02-01 00:02:23 -05:00
Tijl Coosemans
e11fcf3b38 tests: Also check amd64 where we test for x86_64
It is used on FreeBSD.

* tests/demo.at: Also test for amd64 where we test for x86_64.
2024-01-22 20:09:04 -05:00
Mike Frysinger
8d188608ca libtoolize: always copy config-h.in like aclocal.m4
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".
2024-01-22 08:09:47 -05:00
Mike Frysinger
10a04bafef
Fix some style & minor grammar.
* doc/libtool.texi: Fix some style & minor grammar.
2024-01-21 17:38:13 +02:00
Ileana Dumitrescu
7e4b026690
* doc/libtool.texi: Minor grammatical fixes. 2024-01-21 17:25:54 +02:00
Mike Frysinger
e602d877f6 bootstrap: don't reset config-h.in timestamp newer than configure
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.
2024-01-18 01:38:08 -05:00
Mike Frysinger
23eacf882e HACKING: add more test related tips
* HACKING: Document syntax-check & distcheck & parallel testing.
2024-01-18 01:38:08 -05:00
Richard Purdie
725646bf09 ltmain.in: Parse additional clang options
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.
2024-01-17 17:05:12 -05:00
Richard Purdie
365805327c libtool.m4: Cleanup sysroot trailing "/"
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.
2024-01-17 17:01:45 -05:00