Commit Graph

4238 Commits

Author SHA1 Message Date
Stacey Marshall
b55b1cc841 libtool: Do not pass '-pthread' to Solaris linker.
* build-aux/ltmain.in: Do not add -pthread to inherited linker flags on
Solaris systems.

Copyright-paperwork-exempt: Yes
2022-02-05 15:36:36 -06:00
Alex Ameen
960a33e460 docs: manually recording dependencies in Automake
* doc/libtool.texi (Using Automake): provide example of how to manually record
'BUILT_SOURCES' dependencies for libtool archives.
2021-12-24 12:55:03 -06:00
Alex Ameen
786526826d tests: remove deprecated old-ltdl-iface.at test.
* tests/old-ltdl-iface.at: remove test as instructed by inline comments, which
indicate that this test should have been deleted in 2013.
This test fails because it relies on legacy usage of 'include Makefile.inc'
by libltdl which is no longer supported.
2021-12-05 16:16:30 -06:00
Alex Ameen
f51eddf0db * libtool: Bump M4 serial versions and add missing AC_PROG_SED to ltdl.m4
* m4/libtool.m4: bump serial version ( covers entire release ).
* m4/ltargz.m4: bump serial version ( covers entire release ).
Add AC_PROG_SED requirement to LT_FUNC_ARGZ.
* m4/ltdl.m4: bump serial version ( covers entire release ).
2021-11-29 21:43:26 -06:00
Václav Haisman
ccc878dd72 libtool: replace raw invocations of sed with $SED
* build-aux/ltmain.in: replace raw invocations of sed with $SED
* m4/libtool.m4: replace raw invocations of sed with $SED
* m4/ltargz.m4: replace raw invocations of sed with $SED
* m4/ltdl.m4: replace raw invocations of sed with $SED

Co-authored-by: Alex Ameen <alex.ameen.tx@gmail.com>
Copyright-paperwork-exempt: Yes
2021-11-29 20:37:49 -06:00
Lucas Holt
5df7dd49d5 libtool: add support for MidnightBSD
* build-aux/ltmain.in: clone link-mode handling for MidnightBSD from FreeBSD
* m4/libtool.m4: clone various TAGVARs for MidnightBSD from FreeBSD
* m4/ltdl.m4: clone dlopen handling for MidnightBSD from FreeBSD

Copyright-paperwork-exempt: Yes
2021-11-29 18:54:09 -06:00
Ryan Schmidt
8f4bdbda0a libtool: powerpc 10.5 detection without a deployment target
* m4/libtool.m4: properly set "allow undefined" flag for darwin powerpc 10.5
even if deployment target is unset

Copyright-paperwork-exempt: Yes
2021-11-21 21:06:50 -06:00
Jeremy Huddleston Sequoia
9e8c882517 libtool: support macOS 11
Fixes bug#44605

* m4/libtool.m4: '_LT_REQUIRED_DARWIN_CHECKS' sets proper "allow undefined" flag
for particular macOS versions and powerpc.

Copyright-paperwork-exempt: Yes
2021-11-21 20:36:34 -06:00
Vincent Lefevre
0904164dd5 libtool: correct m4 quoting in sed expression
* m4/libtool.m4: properly escape character set in sed expression

Copyright-paperwork-exempt: Yes
2021-11-21 19:59:54 -06:00
Alex Ameen
da2e352735 libtool: replace some references to /usr/bin/file and /bin/sh
* build-aux/ltmain.sh: use '/usr/bin/env sh' in shebang
* libtoolize.in: use '/usr/bin/env sh' in shebang
* m4/libtool.m4: 'FILECMD' to replace use of '/usr/bin/file'
2021-11-20 14:37:05 -06:00
aakropotkin
1b74d78401 libtool: Add -Wa,* link-mode flag for assembler pass-thru
* build-aux/ltmain.in: add -Wa,* as link-mode flag.
Add help messages for -Wa,* and -Xassember in link mode.
Add help message for -Xcompiler in compile mode.
* doc/libtool.texi: document -Xassembler and -Wa,* for link-mode.
2021-11-18 21:24:47 -06:00
Alex Potapenko
86d71e869d libtool: Pass -Xassembler flag and arguments to compiler
* build-aux/ltmain.in: Add parsing and pass-thru for -Xassembler

Copyright-paperwork-exempt: Yes
2021-11-18 19:53:35 -06:00
Pavel Raiskup
fc7779d7d8 maint: update Bootstrap git module
Fixes bug#47000.

* bootstrap: Regenerated.
* gl-mod/bootstrap: Updated to the latest HEAD.
2021-11-16 13:48:44 +01:00
aakropotkin
0c1bc69dac maint: update copyrights across project.
* AUTHORS: Correct manually modified copyright to be consistent with
other files.
2021-11-14 22:37:22 -06:00
aakropotkin
28fb394fc0 maint: update AUTHORS, copyright date.
* AUTHORS: Add Alex Ameen as maintainer. Move past authors to 'previous' list.
2021-11-14 20:38:25 -06:00
Pavel Raiskup
b9b44533fb bootstrap: use $gnulib_clone_since
* bootstrap.conf: Add $gnulib_clone_since.
* gl-mod/bootstrap: Update to the latest git hash.
* bootstrap: Regenerate.
2019-03-22 13:10:05 +01:00
Pavel Raiskup
544fc0e2c2 maint: update bootstrap, gnulib, copyright dates
* gnulib: Update to the latest git version.
* gl-mod/bootstrap: Likewise.
* bootstrap: Regenerate.
2019-03-13 15:38:36 +01:00
Pavel Raiskup
b88cebd510 maint: update bootstrap, gnulib, copyright dates
* gnulib: Update to the latest git version.
* gl-mod/bootstrap: Likewise.
* bootstrap: Regenerate.
* gl/top/README-release.diff: Update the patch for the latest
changes in gnulib's README-release.
2018-07-24 09:06:44 +02:00
Alexander Shevchenko
99bd0948e2 libtool: add icl.exe support
A logical continuation of Automake commit
c40e27e1c2a60f58e72e65d73d808f782d55494a to provide
Windows ICC support similar as already done for MSVC.

Resolves bug 26484.

* m4/libtool.m4: Treat icl.exe equivalently to cl.exe.

Copyright-paperwork-exempt: Yes
2018-07-12 11:46:53 +02:00
Pavel Raiskup
6ca5e224bc docs: typo in 'win32-dll' description
Resolves bug 26516.  Thanks to Reuben Thomas.

* doc/libtool.texi (Configuring libtool): s/macro/option/ in
'win32-dll' option description.
2017-05-05 09:39:39 +02:00
Pavel Raiskup
1bfb11a46b libtool: quote 'cd' command in shipped relink_command
Per report from Eric Blake:
https://lists.gnu.org/archive/html/bug-libtool/2015-10/msg00009.html

* build-aux/ltmain.in (func_mode_link): Quote 'cd `pwd`' properly
before generating the $relink_command.  Do that for the potential
scenarios where the pwd could contain spaces or special shell
characters.
2017-04-25 14:33:14 +02:00
Pavel Raiskup
722b6af0fa doc: fix typos in --mode=install invocations
Per report from devel@lists.fedoraproject.org, thread id
CLHZMVL3CZ43KX7CD3PF3FDV255EA57O

* doc/libtool.texi (Install mode): With the
'libtool --mode=install' wrapper the 'install' command needs to be
specified.
2017-04-25 12:15:53 +02:00
Bert Wesarg
350082b6aa libtool: exit verbosely for fatal configure problems
Instead of calling not-existing function and processing subsequent
shell code.

* build-aux/ltmain.in (func_fatal_configuration): Fix typo in
func_fatal_error call.

Copyright-paperwork-exempt: Yes
2017-04-21 16:56:46 +02:00
Pavel Raiskup
792b680701 maint: update copyright years
Also sync gnulib & bootstrap git submodules.

* gnulib, gl-mod/bootstrap: Move to latest git versions.
* bootstrap: Regenerate.
* all files: Bump years by 'make update-copyright'.
2017-04-21 16:56:19 +02:00
Pavel Raiskup
f003a1f96e libltdl: handle ENOMEM in lt_dlloader_remove()
Reported by Alexander Hass.

* libltdl/lt_dlloader.c (lt_dlloader_remove): Detect NULL return
value from lt_dlinterface_register.
2017-01-16 14:38:07 +01:00
Pavel Raiskup
08c5524fb2 bootstrap: use the upstream repo as git module
.. instead of copying it all the time;  gnulib-tool and bootstrap
are now ready to do this correctly.

Bootstrap upstream is now dual-licensed as MIT/GPLv2+;  so the
sources are redistributed automatically under GPLv3+ license in
in libtool project.

* .gitmodules (bootstrap): New submodule.
* bootstrap.conf (local_gl_dir): Renamed to local_gl_path.
(local_gl_path): Renamed from local_gl_dir.  Two sub-directories
are now mentioned as two --local-dir's are used.
(gnulib_git_submodules): New option to automatically clone the
bootstrap git submodule.
* build-aux/ltmain.in (libtool_options_prep)
(libtool_parse_options): Changing function exit status is not
needed with new options-parser.
* libtoolize.in: Don't func_quote when it is not necessary, don't
set the function return value.
* gl-mod/bootstrap: New git submodule.
* gl/build-aux/bootstrap.in, gl/build-aux/extract-trace,
gl/build-aux/funclib.sh, gl/build-aux/inline-source,
gl/build-aux/options-parser, gl/doc/bootstrap.texi,
gl/modules/all-shells-tests, gl/modules/bootstrap,
gl/modules/extract-trace, gl/modules/funclib.sh,
gl/modules/funclib.sh-tests, gl/modules/inline-source
gl/modules/options-parser, gl/modules/options-parser-tests,
gl/tests/test-all-shells.sh, gl/tests/test-funclib-quote.sh
gl/tests/test-option-parser-helper,
gl/tests/test-option-parser.sh: Files removed, those are
automatically pulled from upstream now.
* bootstrap: Sync with upstream.
2016-03-09 09:38:47 +01:00
KO Myung-Hun
a938703c46 libtool: set file_list_spec to '@' on OS/2
Creating and linking reloadable objects sometimes fail.

* m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG) <os2-*>:
Set file_list_spec to '@'.
2016-02-25 09:56:52 +01:00
Pavel Raiskup
f10e22c2a1 tests: fix $objdir hardcoding check with CFLAGS=-g3
At least with gcc, specifying -g3 in CFLAGS ends up with macros
expanded including LT_OBJDIR macro.  This fooled the testsuite.

* tests/demo.at (Demo hardcode): Filter out the expanded LT_OBJDIR
macro.
2016-02-19 19:06:34 +01:00
Mike Frysinger
f9970d9929 libtool: pass through -fuse-ld flags
Starting with gcc-4.8, there's a -fuse-ld flag that can be used to
select between bfd & gold.  Make sure we pass it through to the
linking stage.

* build-aux/ltmain.in (func_mode_link): Pass -fuse-ld=* flags
through.
Copyright-paperwork-exempt: Yes
2016-02-19 11:29:11 +01:00
Pavel Raiskup
d7c8d3b43f m4/libtool.m4: FreeBSD elftoolchain strip support
References:
http://savannah.gnu.org/patch/?8675
Message-Id: <20150523-002056.sv85487.59958@savannah.gnu.org>

* m4/libtool.m4 (_LT_CMD_STRIPLIB): Remove the redundant tests for
empty $old_striplib and $striplib.  Move the test for empty $STRIP
variable up. Allow elftoolchain strip (with the same arguments we
used to have with GNU strip) on FreeBSD.
2016-02-19 10:21:15 +01:00
Mike Frysinger
807cbd63ab libtoolize: exec automake and autoconf only with --help
Same fix as applied to libtool in commit 408cfb9c5f
to delay use of automake/autoconf to when the --help option is
actually specified.

* libtoolize.in (func_help): Override func_help() from
gl/build-aux/options-parser to only run automake --version and
autoconf --version when libtool --help is executed on the command
line.
Copyright-paperwork-exempt: Yes
2016-02-19 09:50:34 +01:00
Pavel Raiskup
40bc0628d5 edit-readme-alpha: generate the "stable" README properly
Fixes bug#20196.  Reported by Peter Johansson and KO Myung-Hun

* build-aux/edit-readme-alpha: Invert the order of checks
and exit sooner if the file was already edited.  Also fix the
typo 's/sed -n/sed/' (to print the rest of the file).
* Makefile.am ($(readme)): Double-quote the `cmd` to let test -n
work correctly.
2016-02-18 00:14:07 +01:00
Pavel Raiskup
b89a47eae6 maint: fix for 'make sc_immutable_NEWS' hints
* NEWS: Remove the leading white-spaces before Copyright line
because it breaks the perl regexp in sc_immutable_NEWS rule.
* cfg.mk (old_NEWS_hash): Adjust to correct previous hash as the
old NEWS entries were not actually touched.
2016-02-17 09:19:49 +01:00
Pavel Raiskup
bb8e7b4a06 maint: update copyright years
Also update gnulib submodule as it contains updated copyright
years too.

* gnulib: Latest greatest git hash.
* all files: Run 'make update-copyright'.
2016-02-16 00:33:51 +01:00
Pavel Raiskup
b5d44b8447 libltdl: handle ENOMEM sooner
Fixes bug#19890.  Reported by Tobias Stoeckmann.

* libltdl/loaders/dld_link.c (vm_open): Do not even try dld_link()
in case of ENOMEM.
2016-02-12 16:16:15 +01:00
Pavel Raiskup
5944fdcc73 gl: minor typo fixes
* gl/build-aux/options-parser (func_run_hooks):
s/funcions.n./functions./, s/$@/${1+"$@"}/.
* gl/modules/funclib.sh: Sync license metadata with real module
code.
* bootstrap: Sync with funclib.sh
2016-02-03 10:23:43 +01:00
Pavel Raiskup
4985667996 gl-tests: dash && option-parser test fix
Rico pointed out that the testsuite failed on his system (dash
represented /bin/sh).  Turns out that 'shift' in dash exits shell
with exit status 2 when there are no items in the array.

The other issue was that 'test-option-parser.sh' did not
re-executed the test in proper shell, but in /bin/sh.

* gl/tests/test-option-parser-helper (test_parse_eat_test): Don't
shift for empty $@.
* gl/tests/test-option-parser.sh: Use $__GL_ALL_SHELLS_SHELL as
shell which runs the helper.
2016-02-03 10:12:33 +01:00
Jeremy Huddleston Sequoia
a5c6466528 libtool: fix GCC/clang linking with -fsanitize=*
References:
https://lists.gnu.org/archive/html/libtool/2014-04/msg00026.html

* build-aux/ltmain.in (func_mode_link): Pass -fsanitize=* to the
linker to allow trivial use of the clang address sanitizer.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
Copyright-paperwork-exempt: Yes
2015-11-30 09:39:31 +01:00
Pavel Raiskup
ae816aced1 gl-tests: make the failure more readable
* gl/tests/test-funclib-quote.sh (_compare_or_error): Put $1 into
error output, not having it like that was my mistake.
2015-11-30 07:11:10 +01:00
David Edelsohn
d15b321427 m4/libtool.m4: export AIX TLS symbols
TLS symbols in AIX display a new, different symbol type in nm output.
Libtool explicitly creates a list of exported symbols for AIX shared
libraries using nm and does not recognize the new TLS symbols, so
those symbols are not exported in AIX shared libraries.

This is a regression for TLS support on AIX where TLS symbols or GCC
"emultls" symbols were listed as global data and exported.

This patch updates libtool.m4 export_symbols_cmds for AIX in two
locations so that global symbols labeled with "L" for TLS are included
in the export list.

* m4/libtool.m4 (export_symbols_cmds) [AIX]: Add global TLS "L" symbols.
Message-Id: <CAGWvnym+hhoQJfkr=cncPZMnnMQ=RVUH2Bpw6+tP2hgEmESAsA@mail.gmail.com>
2015-11-25 09:51:12 -07:00
Pavel Raiskup
aabc46ac1b gl/tests: new tests for options-parser
* gl/build-aux/options-parser (func_parse_options): Put the info
message 'enabling shell trace mode' on stderr.
* gl/modules/options-parser-tests: New test module.
* gl/tests/test-option-parser.sh: New test-case.
* gl/tests/test-option-parser-helper: New test-case helper.
* bootstrap: Sync with option-parser.
2015-11-04 06:47:52 +01:00
Pavel Raiskup
dc8bd92d5f gl/funclib.sh: func_quotefast_eval & tilde fix
Testsuite detected that printf built-in in Bash up to 4.2 was not
able to properly escape tilde.

* gl/build-aux/funclib.sh (func_quote_for_eval): If printf
supports -v option, test also whether we properly escape tilde.
With Bash <= 4.2, call func_quote_portable with ~* strings.
* bootstrap: Sync with funclib.sh.
2015-11-04 06:47:52 +01:00
Pavel Raiskup
a3c6e99c9c syntax-check: fix sed syntax errors
Multi-line single-quoted shell arguments defined within makefile
rules end up having the trailing backslash.  This caused problem
in some sc_* rules as GNU sed does not interpret trailing
backslash the same way as SHELL (== appending next line).
Switching to double quotes means that SHELL will remove the
trailing backslash for subsequent sed call.  This silences a lot
of GNU sed warnings seen before like:

  sed: -e expression #1, char 96: unterminated address regex

* cfg.mk (sc_libtool_m4_cc_basename): Use $(SED) instead of sed,
use double quotes for sed's multi-line argument.
(sc_prohibit_set_dummy_without_shift): Likewise.
(sc_prohibit_test_const_follows_var): Likewise.
2015-11-04 06:47:21 +01:00
Pavel Raiskup
f323f10d2b gl/tests: new tests for func_quote* family
* gl/modules/funclib.sh-tests: New test module.
* gl/modules/all-shells-tests: New test (helper) module.
* gl/tests/test-funclib-quote.sh: New test case.
* gl/tests/test-all-shells.sh: New gl test helper.
* cfg.mk (sc_useless_braces_in_variable_derefs): Whitelist
new test-funclib-quote.sh as the pattern is used there
intentionally.
(sc_space_tab): Likewise.
(sc_useless_braces_in_variable_derefs): Remove /cvsu pattern as
the file is not used with git.
(sc_prohibit_command_in_subst): New checker.
2015-11-03 20:38:39 +01:00
Pavel Raiskup
ed4f739f62 check: enable gnulib's testsuite
* Makefile.am (SUBDIRS): Add gnulib-tests.
(EXTRA_DIST): Distribute also update-copyright script.  This does
not happen automatically because we manually remove ./lib
directory created by gnulib-tool.  Not having the file distributed
causes 'make check' failure, however.
(dotversion): Fix to point to $(top_srcdir).
* bootstrap.conf (gnulib_tool_options): Add gnulib-tool args
needed to successfully install gnulib's tests.
* configure.ac (CONFIG_STATUS_DEPENDENCIES): Look for .version in
$(top_srcdir).
* gnulib: Sync with upstream.
* build-aux/.gitignore: Ignore ar-lib coming from automake.
2015-11-03 20:34:42 +01:00
Pavel Raiskup
9187e9a231 funclib: refactor quoting methods a bit
From now we have two basic functions to perform string quoting for
shell evaluation -- 'func_quote_arg' to quote one argument and
'func_quote' which takes list of arguments to be quoted.

New function name-scheme should be more descriptive (previously we
called func_quote_for_eval with one argument and also multiple
arguments, while we had confusing
$func_quote_for_eval_unquoted_result which is redundant for
multiple-arguments call).

New abstraction allowed us (in an easy way) to implement
bash-specific optimization for quoting  (using
'printf -v VARNAME %q "$value"', suggested by Eric Blake), this
construct may be used on those places where we don't care much
about the result aesthetics (its thus not useful for '*.la'
generation or for error printing).

* gl/build-aux/funclib.sh (func_append_quoted): Use
func_quote_arg internally (kept in 'pretty' mode for now).
(func_quote): Made to be "main" high-level quoting method taking
list of arguments to be quoted into single command.  It replaces
func_quote_for_{expand,eval}.
(func_quote_portable): Implements quoting in shell, falling back
to portable sed call (rare cases).
(func_quotefast_eval): New internal function using fast
bash-specific construct, falling back to func_quote_portable for
non-Bash scripts.
(func_quote_arg): New function to quote one argument.
(func_quote_for_eval): Removed.  All callers changed to call
func_quote.
(func_quote_for_expand): Likewise.
* bootstrap: Sync with funclib.sh and options-parser.
2015-10-12 21:26:51 +02:00
Pavel Raiskup
16dbc070d3 libtool: optimizing options-parser hooks
Its not necessary to (re)func_quote_for_eval in each function in
the hook hierarchy.  Usually it is enough if the leaf function
does func_quote_for_eval and its caller just re-uses the
<CALLEE>_return variable.

This is follow up for the previous commit.

* gl/build-aux/options-parser (func_run_hooks): Propagate
$EXIT_SUCCESS return code down to caller if *any* hook succeeded.
Never re-quote the result -- either the arguments are left
untouched, or the options have already been properly quoted by
succeeding hooks.
(func_parse_options): Quote '$@' and return $EXIT_SUCCESS only if
we changed something.
(func_validate_options): Likewise.
(func_options_prep): Likewise.
(func_options_finish): New hook-caller for 'func_options' hooks.
(func_options): Propagate return value down to top-level caller,
but pay attention we have always set $func_options_result.
* build-aux/ltmain.in (libtool_options_prep): Quote '$@' and
return $EXIT_SUCCESS only if we changed something.
(libtool_parse_options): Likewise.
* bootstrap: Sync gl/build-aux/with option-parser.
2015-10-12 21:26:13 +02:00
Pavel Raiskup
32f0df9835 libtool: mitigate the $sed_quote_subst slowdown
When it is reasonably possible, use shell implementation for
quoting.

References:
http://lists.gnu.org/archive/html/libtool/2015-03/msg00005.html
http://lists.gnu.org/archive/html/libtool/2015-02/msg00000.html
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20006

* gl/build-aux/funclib.sh (func_quote): New function that can be
used as substitution for '$SED $sed_quote_subst' call.
* build-aux/ltmain.in (func_emit_wrapper): Use func_quote instead
of '$SED $sed_quote_subst'.
(func_mode_link): Likewise.
* NEWS: Document.
* bootstrap: Sync with funclib.sh.
2015-10-12 19:21:33 +02:00
Pavel Raiskup
b7b6ec33ba gnulib: sync with upstream
With gnulib commit f8fe25fab60e3, AM_PROG_AR is called
automatically from GL_EARLY macro, which brings its definition
into aclocal.m4.  Sufficiently new enough AM_PROG_AR uses guarding
AC_BEFORE([AM_PROG_AR], [LT_INIT]) call.

Existence of 'LT_INIT' string inside aclocal.m4 however broke
bootstrap's self-defensive libtool_check_for_bogus_macros
function.

* build-aux/no-bogus-m4-defines: New aux helper using m4 for
aclocal.m4 pre-processing.  As this is only bootstrap/dist time
assertion, we don't have to be too much careful (and the AC_BEFORE
pushdef is OK for now).
* boostrap.conf (libtool_check_for_bogus_macros): Use
no-bogus-m4-defines helper to detect bogus macros.
* Makefile.am: Likewise.
* gnulib: Sync with upstream.
* build-aux/git-log-fix: Fix typo.
* gl/build-aux/extract-trace: Fix the script timestamp.
* bootstrap: Sync with extract-trace.
2015-09-29 10:37:57 +02:00
Pavel Raiskup
5859cc50d6 maint: relax 'sc_prohibit_test_dollar' check
* cfg.mk (sc_prohibit_test_dollar): White-list the
'test ${VAR+y}' construct because that is autoconf-suggested
portable way to check for unset variable.
2015-09-26 18:00:17 +02:00