* 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.
In some GNU/Linux distributions people started to compile 'ar'
binary with --enable-deterministic-archives (binutils project).
That, however, in combination with our previous long time working
default AR_FLAGS=cru causes warnings on such installations:
ar: `u' modifier ignored since `D' is the default (see `U')
The 'u' option (at least with GNU binutils) did small optimization
during repeated builds because it instructed 'ar' to not
open/close unchanged *.o files and to rather read their contents
from old archive file. However, its removal should not cause a
big performance hit for usual workflows.
Distributions started using --enable-deterministic-archives
knowing that it would disable the 'u', just to rather have a bit
more deterministic builds.
Also, to justify this change a bit more, keeping 'u' in ARFLAGS
could only result in many per-project changes to override
Libtool's ARFLAGS default, just to silent such warnings.
Fixes bug#19967. Reported by Eric Blake.
* m4/libtool.m4 (_LT_PROG_AR): Default AR_FLAGS to 'cr'.
(_LT_REQUIRED_DARWIN_CHECKS): Use $AR_FLAGS instead 'cru' string.
* doc/libtool.texi: Do 's/ar cru/ar cr/' in whole documentation.
* NEWS: Document.
Libtool has used $AR_FLAGS since 2000-05-29 commit
8300de4c54, Automake ARFLAGS since 2003-04-06 commit
a71b3490639831ca. Even though ARFLAGS is younger, it sounds like
better name according GNU Coding Standards.
Related to bug#20082.
* m4/libtool.m4 (_LT_PROG_AR): Copy ARFLAGS value into AR_FLAGS
variable if AR_FLAGS is not set. Add new _LT_DECL'ed variable
'lt_ar_flags' to keep the configure-time value of AR_FLAGS. The
new 'lt_ar_flags' is to be used as the default value for AR_FLAGS
at libtool-runtime.
* NEWS: Document.
Blacklisting of duplicated ChangeLog entries is now much easier
with new gitlog-to-changelog's option --ignore-matching -- so
patching the script is not necessary.
* Makefile.am ($(changelog)): Start ignoring entries having the
'Omit-from-ChangeLog.' "topic" line. Use TZ=UTC to generate the
same ChangeLog regardless of the actual time-zone.
* build-aux/git-log-fix: Put the "blacklist" mark at the beginning
of each commit as that is requirement for --ignore-matching.
* gl/build-aux/gitlog-to-changelog.diff: Removed.
* gnulib: Sync with upstream.
Signed-off-by: Pavel Raiskup <praiskup@redhat.com>
Some projects use this construct in configure.ac:
m4_define([version], m4_include([version]))
pkg_version=version
When the m4_include builtin is undefined (as was done in
libtoolize and extract-trace scripts), the call to this 'version'
macro enters an infinite recursion (until ENOMEM). So rather
re-define all potentially dangerous macros by empty strings,
suggested by Eric Blake.
While we are on it, merge the macro-"blacklist" with similar list
implemented in gettext, except for 'm4_esyscmd'. It's kept
defined because we already trace AC_INIT macro for package
version, while it is often specified by
m4_esyscmd(git-version-gen). Similarly to m4_include, m4_esyscmd
might be opt-in-blacklisted in future.
References:
http://lists.gnu.org/archive/html/libtool/2015-09/msg00000.htmlhttps://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764580
* gl/build-aux/extract-trace (_G_mini): Redefine trace-breaking
macros to empty strings rather than undefining those. Use 'dnl'
for comments.
* bootstrap: Likewise, sync with extract-trace.
* NEWS: Document.
* NO-THANKS: Mention Hiroyuki Sato.
Signed-off-by: Pavel Raiskup <praiskup@redhat.com>
Target 'bootstrap-deps' sometimes rebuilt $(bootstrap_files)
a bit earlier than the cleanup target 'bootstrap-deps-prep' was
invoked. As a result, some of $(bootstrap_files) were missing.
* Makefile.am (bootstrap-deps): Rebuild $(bootstrap_files) after
bootstrap-deps-prep dependency.
References:
https://bugzilla.redhat.com/show_bug.cgi?id=985592
* build-aux/ltmain.in (func_mode_link): Pass -specs=*
to the linker, Fedora uses this option for hardening.
Signed-off-by: Pavel Raiskup <praiskup@redhat.com>
Regression from 2.4.2 was causing noticable slow-down in builds
that call libtool many times.
* build-aux/ltmain.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.
* NO-THANKS: Add Robert Yang.
Reported by Robert Yang
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Libtool generator code needs to remember the configure time
LT_SYS_LIBRARY_PATH content to allow config.status properly
instantiate default LT_SYS_LIBRARY_PATH libtool run-time value;
Thats because config.status has no idea what the contents of
config.site file is (by default).
* m4/libtool.m4 (_LT_CONFIG): Use the _LT_DECLared
$configure_time_lt_sys_library_path variable as the default for
LT_SYS_DLSEARCH_PATH at run-time.
(_LT_SYS_DYNAMIC_LINKER): Don't change ac_cv_* variable if it is
not necessary. New $configure_time_lt_sys_library_path variable.
* NEWS: Update.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* m4/libtool.m4 (_LT_LIBTOOL_TAG_VARS): Encase the
configure/libtool shared function into parseable borders; for
testing purposes.
(func_munge_path_list): Typo s/$/@S|@/.
* tests/configure-funcs.at: New testcase.
* Makefile.am (TESTSUITE_AT): Mention new testcase.
* NEWS: Update.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* tests/testsuite.at (LT_AT_ACLOCAL): Inject a 1 second sleep
after aclocal to ensure subsequently generated autotools files
will be newer.
* NEWS: Update.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Fixes regression caused by commit 99a808be.
Makefile.in has aclocal.m4 as prerequisite, so Makefile.in
should be installed later to avoid unnecessary rebuild by
(versioned) aclocal.
* Makefile.am (pkgltdl_files): Move the Makefile.in file down in
the list after aclocal.m4.
* tests/libtoolize.at: Adjust to match reordered output.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* m4/libtool.m4 (_LT_PREPARE_CC_BASENAME): Factor cc_basename
calculation into a shell function...
(_LT_CONFIG_SAVE_COMMAND): ...and expand it into generated
libtool script.
(_LT_CC_BASENAME): Adjust accordingly.
(_LT_FUNC_SUNCC_CSTD_ABI): Remove from here...
* build-aux/ltmain.in (func_suncc_cstd_abi): ...and reimplement
here.
* m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS): Remove postdeps
augmentation from here...
* build-aux/ltmain.in (func_mode_link): ...and reimplement here
just before postdeps are added.
* NEWS: Update.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* m4/libtool.m4 (_LT_FUNC_SUNCC_CSTD_ABI): New function factored out
of repeated code. Take note of other known -Cstd incompatible
compiler flags.
(_LT_SYS_HIDDEN_LIBDEPS): Use it to determine whether -Cstd -Crun
can be safely added to postdeps with Sun Pro CXX.
* NEWS: Update.
* NO-THANKS: Add Marc Glisse.
Reported by Marc Glisse
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* m4/libtool.m4 (_LT_CONFIG_SAVE_COMMANDS): Copy configure-time
LT_SYS_LIBRARY_PATH settings as default, but allow run-time
override.
(_LT_SYS_DYNAMIC_LINKER): Save the unmunged
sys_lib_dlsearch_path_spec value, and use it for _LT_DECL,
but then munge it with LT_SYS_LIBRARY_PATH for use in ltdl.m4
macros, such as LT_SYS_DLSEARCH_PATH.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Revert 8728e07 and 440fee6.
Some GNU/Linux distributions install libraries into /lib64 (or
/usr/lib64) on 64-bit machines, while /lib (/usr/lib
respectively) stays for multilib variant. Other distributions
keep /usr/lib for 64-bit variant and reserve other directory for
multilib. Detection of what approach a given system uses is
difficult, however, especially because Glibc's ldconfig does not
report the full and correct list of search paths. Allow the user
to adjust Libtools heuristically determined search paths with
the new LT_SYS_LIBRARY_PATH environment variable at both
compile-time, when libtool is called, and at configure time.
* m4/libtool.m4 (_LT_PREPARE_MUNGE_PATH_LIST): Define a new
function to munge a libtool path list according to a user
supplied colon-delimited path.
(_LT_SYS_DYNAMIC_LINKER): Require _LT_PREPARE_MUNGE_PATH_LIST.
Mark LT_SYS_LIBRARY_PATH as precious to autoconf (to survive
automatic "autoreconf").
Call the new func_munge_path_list function on
sys_lib_dlsearch_path_spec - this propagates results to
generated libtool script.
(_LT_CONFIG): Expand _LT_PREPARE_MUNGE_PATH_LIST into generated
libtool script.
* build-aux/ltmain.in (func_mode_link): Call it to adjust
sys_lib_dlsearch_path according to LT_SYS_LIBRARY_PATH.
* doc/libtool.texi: Document new LT_SYS_LIBRARY_PATH.
* doc/notes.texi: Likewise.
* NEWS: Update.
References: http://thread.gmane.org/gmane.comp.gnu.libtool.general/8339/focus=8345
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* m4/m4.m4 (AC_PROG_GNU_M4): Reverse some test arguments for
sc_prohibit_test_const_follows_var.
Remove some spurious braces for
sc_useless_braces_in_variable_drefs.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* gl/build-aux/extract-trace (func_find_tool): Quote a bare
variable expansion in a test argument.
* bootstrap: Regenerate.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LIB): Add s390x to glibc/ELF
compatible CPUs that have /lib64 and /usr/lib64 in
sys_lib_dlsearch_path_spec.
Reported by Pavel Raiskup
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) <linux*, k*bsd*-gnu>
<kopensolaris*-gnu, gnu*>: If $host_cpu contains "64", add /lib64
and /usr/lib64 to sys_lib_dlsearch_path_spec.
Reported by Orion Poplawski, Christian Rössel, Olly Betts et. al.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* libltdl/ltdl.c, 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: For at
least gcc 4.8.3 and 4.9.1, __attribute__((__unused)) should
follow the unused parameter declaration.
* NO-THANKS: Add Дилян Палаузов.
Reported by Дилян Палаузов
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Testing whether -static-libtool-libs causes a non-libtool library to be
linked dynamically is effectively a test of the compiler's preference in
this case. The Cray compiler prefers static libraries if not told
otherwise.
* tests/static.at [static linking flags for programs]: Do not expect
-static-libtool-libs to fail.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
The run-time loader does not search /usr/local or subdirectories
by default on ia64 HP-UX.
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): Fix
sys_lib_dlsearch_path_spec for ia64 HP-UX.
* NEWS: Update.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* libltdl/ltdl.mk (AM_CPPFLAGS): Make sure the sed expression to
remove the first libltdl/ on each line is not confused by misuse
of linebreaks.
* Makefile.am (lt_Makefile_am): Also edit out the duplicated
include paths after libltdl/ elimination.
* NEWS: Update.
Reported by Michael Wobst
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) <freebsd-elf>: Set
soname_spec correctly, per original patch.
* NEWS: Update.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Now that libtoolize requires an installed GNU M4 to parse
configure.ac and aclocal.m4 sources for libltdl macros, let the
user know at configure time when it is missing.
* m4/m4.m4: New file for rejecting non-GNU and buggy GNU versions
of M4. Copied from GNU Autoconf m4.m4.
* Makefile.am (lt_aclocal_m4_deps): Add m4/m4.m4.
* configure.ac (AC_PROG_GNU_M4): Call it.
* NEWS: Update.
Reported by Michael Felt
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Support filename-based shared library versioning on AIX with the
lib.so library filename extension, which is used with runtime
linking only. Runtime linking is enabled by the -brtl linker
flag for executables and the -G linker flag for Shared Objects.
The behaviour is similar to Linux/SVR4 DT_SONAME, hence the name
"aix-soname=svr4".
* Makefile.am (TESTS_ENVIRONMENT): Pass with_aix_soname value
via lt_cv_with_aix_soname into testsuite.
* configure.ac: AC_SUBST with_aix_soname for testsuite.
* libltdl/loaders/dlopen.c (vm_open): Use RTLD_MEMBER flag for
dlopen when the filename does specify an archive member between
"()". Otherways, retry with appending LT_SHARED_LIB_MEMBER when
loading fails without but archive file seems to exist.
* m4/libtool.m4 (dynamic_linker): Describe configured shared
library versioning variant according to with_aix_soname and
runtime linking.
(soname_spec, library_names_spec, shlibpath_overrides_runpath)
(postinstall_cmds, postuninstall_cmds, hardcode_direct)
(hardcode_direct_absolute, no_undefined_flag)
(allow_undefined_flag): Set according to with_aix_soname and
runtime linking configuration.
(export_symbols_cmds): Decorate symbols with the weak keyword.
(archive_expsym_cmds): Create both shared libraries according to
with_aix_soname and runtime linking configuration. Filter -brtl
linker flag from compiler_flags for shared libraries due to its
side effects.
(enable_static): Respect with_aix_soname for disabling as well.
* m4/ltdl.m4 (LT_SHARED_LIB_MEMBER): Define, set based on the
value of the shared_archive_member_spec libtool variable.
* m4/ltoptions.m4 (_LT_WITH_AIX_SONAME): New. Provides
commandline option --with-aix-soname=aix|svr4|both. Declares
$shared_archive_member_spec as libtool variable.
(_LT_SET_OPTIONS): Define LT_INIT options "aix-soname=aix",
"aix-soname=svr4", "aix-soname=both". Default is
"aix-soname=aix".
* doc/libtool.texi (LT_INIT): Document new options.
* tests/deplibs-ident.at: To define whether this test should
XFAIL, use hardcode_action, hardcode_direct,
hardcode_direct_absolute configuration settings instead of
platforms aix, bitrig, hppa-hpux, interix or openbsd.
* tests/versioning.at: When shared_archive_member_spec is defined
and LDFLAGS contain -brtl, we can run the versioning check.
* NEWS: Update.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
The umask calls seem to be left over as a workaround for several
releases ago when libtoolize copied libltdl sources with the help
of tar. Now that we use cp or ln -s exclusively, this just
needlessly makes the files world writable; we should just respect
the users' own umask setting.
* libtoolize.in (func_copy): Remove umask 0 calls and simplify.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): Adopt downstream patch
used by FreeBSD for versioned library filenames.
* build-aux/ltmain.in (func_mode_link): Replace conflicting
freebsd-elf version_type case branches with a single calculation
setting major and versuffix to match downstream FreeBSD.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): Set version type to
"sco" for sco based hosts.
* build-aux/ltmain.in (func_mode_link): Accept new "sco"
version_type as equivalent to freebsd-elf.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* m4/ltdl.m4 (LT_FUNC_DLSYM_USCORE): Compile, load and get the
address of a symbol from a separate loadable module, rather than
assuming dlopen self works.
* NEWS: Update.
Reported by KO Myung-Hun
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* m4/ltdl.m4 (LT_LIB_DLLOAD): Save contents of LIBS before
calling AC_SEARCH_LIBS, which prepends to LIBS by default, and
restore afterwards. We set LIBADD_DLOPEN and LIBADD_SHL_LOAD
so that dynamic loader libraries can be added selectively only
where they are needed.
* NEWS: Update.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
On AIX, undefined symbols across shared libraries can work only
when the main program explicitly exports those symbols. As this
is bad practice anyway and -no-undefined should be preferred, we
skip this.
* tests/template.at: Skip test with undef syms across libraries
on AIX.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Accepting \? for at-most-once in basic regex is a GNU grep
extension, not accepted by AIX grep for example.
* tests/libtool.at: Use \{0,1\} instead of ? with GREP.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>