Gary V. Vaughan [Mon, 27 Oct 2014 13:42:55 +0000 (13:42 +0000)]
testsuite: fixes required for `make distcheck CC=g++`.
* tests/demo.at (Pdemo conf): Overide _LT_DEMO_SETUP foo.h to
declare foo2.
* tests/mdemo.at (_LT_SETUP): Don't wrap `sub` dectlaration in
C++ guards, because sub.c is also compiled with g++ in this test.
* tests/old-ltdl-iface.at (old.c): Add a return type to main
declaration as required by C++.
Gary V. Vaughan [Sat, 25 Oct 2014 16:25:11 +0000 (17:25 +0100)]
libtool: fix GCC linking with -fstack-protector.
* build-aux/ltmain.in (func_mode_link): Pass -fstack-protector*
to the linker as it is required at link time to resolve libssp symbols.
From Yaakov Selkowitz
Gary V. Vaughan [Sat, 25 Oct 2014 15:59:07 +0000 (16:59 +0100)]
libtool: support Mac OS 10.10 and newer.
The current template mistakenly treats a MACOSX_DEPLOYMENT_TARGET
value of "10.10" as "10.1" followed by junk. Thinking that the
build is targeting 10.1 Puma instead of 10.10 Yosemite, it tells
the linker to ignore undefined symbols instead of dynamically
resolving them. This can cause runtime crashes* and will affect
subsequent versions of OS X.
* libtool.mk (_LT_REQUIRED_DARWIN_CHECKS): Improve case match so
as to reject 10.10.x on the 10.1 and 10.2 branch.
* THANKS: Add Lawrence Velázquez.
From Lawrence Velázquez
Peter Rosin [Tue, 6 May 2014 08:11:34 +0000 (10:11 +0200)]
libtool: fix nm test for MSYS/MinGW
The check for the -B option of nm does not work as intended on MSYS/MinGW.
MSYS converts /dev/null to the DOW/Windows "equivanent" special file NUL,
but the MinGW nm treats this file as any empty file. This means that
you might end up with some fallback nm instead of the desired nm. This
is not normally a problem, but if one nm is built without lto support, it
starts to matter.
Fixes sr #108558, reported by LRN.
* m4/libtool.m4 (LT_PATH_NM) [MSYS]: Use a non-existant file instead of
/dev/null when checking if nm supports -B.
Peter Rosin [Mon, 5 May 2014 22:03:19 +0000 (00:03 +0200)]
libtool: speed up ltwrapper_script detection in execute mode
Execute mode is slow and might even DOS the computer in extreme
cases when a parameter is a big binary file without newlines.
Work around this with different truncation if a suitable dd
utility is found.
Fixes bug#13472 and bug#16662.
Reported by Pavel Raiskup and Nick Bowler.
* m4/libtool.m4 (_LT_PATH_DD): New macro, for finding a dd utility
that works for the below purpose.
(_LT_CMD_TRUNCATE): New macro, for finding out how to truncate binary
pipes (fallback to the old sed truncation if no suitable dd is found
in _LT_PATH_DD).
(_LT_SETUP): Require _LT_CMD_TRUNCATE.
(LT_INIT): Require Autoconf 2.62, as needed by _LT_PATH_DD.
* build_aux/ltmain.in (func_lalib_p): Factor out the actual "generated
by libtool" test into...
(func_generated_by_libtool_p): ...this new function...
(func_ltwrapper_script_p): ...so that it can be reused here, when
truncating the pipe according to _LT_CMD_TRUNCATE.
* THANKS: Update.
Peter Rosin [Wed, 12 Feb 2014 09:01:13 +0000 (10:01 +0100)]
libtool: actually strip -Wl when relinking with $LD
Fixes the regression from commit v2.4.2.444 which is causing a
testsuite failure in duplicate_conv.at (seen on Cygwin).
* build-aux/ltmain.in (func_mode_link): $reload_cmds typically
starts with "$LD$reload_flag ..." when $LD is used to relink.
Make the case expression match that when checking if $LD is in
fact used to relink.
Gary V. Vaughan [Wed, 5 Feb 2014 23:05:04 +0000 (12:05 +1300)]
doc: remove redundant "in order to" phrase where possible.
* doc/libtool.texi: Remove many occurrences of the redundant
phrase "in order to", where ever "to" is as clear or clearer.
* THANKS: Add attribution.
Reported by Dave Yost
Gary V. Vaughan [Mon, 27 Jan 2014 02:04:53 +0000 (15:04 +1300)]
bootstrap: use `-d .git` to check whether we are in a git tree.
* gl/build-aux/bootstrap.in (func_require_git): .git is not a
regular file, use -d to check its existence.
* bootstrap: Regenerate.
* THANKS: Add Bruce Korb.
Reported by Bruce Korb
Copyright-paperwork-exempt: Yes Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Rainer Orth [Fri, 17 Jan 2014 21:07:52 +0000 (10:07 +1300)]
libtool: opt_duplicate_compiler_generated_deps is harmful on Solaris
Fix for http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452.
* build-aux/ltmain.in (libtool_validate_options): disable the
opt_duplicate_compiler_generated_deps optimization for Solaris2 so
that gcc-4.9+ compiled C++ code with -Wl,-Bdirect on 64-bit Solaris
x86 can avoid unwinding failures caused by accidental mixing of the
libc and libgcc_s unwinders in a single executable.
Todd C. Miller [Sat, 11 Jan 2014 00:15:32 +0000 (13:15 +1300)]
libtoolize: don't remove install-sh.
If you are not using automake, libtoolize would remove install-sh.
It needs the same treatment as config.guess and config.sub.
* libtoolize.in (func_require_seen_libtool): Remove install-sh
from $all_pkgaux_files, the list of files removed by
`libtoolize --force`.
* THANKS: Add Todd C. Miller.
* NEWS: Update.
Copyright-paperwork-exempt: Yes Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Gary V. Vaughan [Tue, 7 Jan 2014 03:06:02 +0000 (16:06 +1300)]
options-parser: --version works with 'DO NOT EDIT' preamble again.
* gl/build-aux/options-parser (func_version): Don't quit on first
leading '##' line, otherwise DO NOT edit warnings prevent version
information from being extracted correctly.
* bootstrap: Regenerate.
Gary V. Vaughan [Tue, 7 Jan 2014 01:16:34 +0000 (14:16 +1300)]
bootstrap: specify particular version in buildreq with =x.y.
* gl/build-aux/bootstrap.in (func_check_versions): If the version
number begins with '=' then it must match the installed version of
the named tool exactly.
* gl/doc/bootstrap.texi (buildreq): Document the '=vernum' feature.
* bootstrap: Regenerate.
Gary V. Vaughan [Sat, 4 Jan 2014 01:53:06 +0000 (14:53 +1300)]
bootstrap: replace spurious hyphen in some section comments.
* gl/build-aux/bootstrap.in: replace spurious hypen in same
section header comments with a space.
* gl/build-aux/extract-trace, gl/build-aux/options-parser:
Likewise.
* bootstrap: Regenerate.
Gary V. Vaughan [Fri, 3 Jan 2014 22:43:58 +0000 (11:43 +1300)]
inline-source: DO NOT EDIT warning only for top-level file.
* gl/build-aux/inline-source (func_include): When recursing, pass
through the value of `magic` so that only the very first #! magic
number has a DO NOT EDIT warning injected.
* bootstrap: Regenerate.
Gary V. Vaughan [Fri, 3 Jan 2014 07:07:48 +0000 (20:07 +1300)]
inline-source: gawk doesn't have boolean constants.
I've been writing a lot of Lua lately, but still a silly mistake:(
* gl/build-aux/inline-source (func_include): Use `magic` variable
to count #! lines found, and only output the DO NOT EDIT warning
after the first one.
Gary V. Vaughan [Fri, 3 Jan 2014 04:54:28 +0000 (17:54 +1300)]
libtool: rearrange header comments for correct version/help extraction.
* m4/libtool.m4 (_LT_COPYING): Rearrange the comments output to
the generated libtool script so that --version and --help behave
the same as pre-funclib.sh revisions.
(_LT_CONFIG_SAVE_COMMANDS): Likewise.
Gary V. Vaughan [Fri, 3 Jan 2014 04:01:18 +0000 (17:01 +1300)]
README: Tweak into markdown format and fix some bitrot.
* README: Moved from here...
* README.md: ...to here. Make some changes to be valid markdown
format, and fix some inaccuracies in text that is out of date.
* .gitignore: Add README.
Gary V. Vaughan [Fri, 3 Jan 2014 03:45:18 +0000 (16:45 +1300)]
bootstrap: support automake README requirement.
* gl/build-aux/bootstrap.in (func_ensure_README): New function.
Link missing README to existing alternative naming.
(require_automake_options): New functions. Fetch AM_INIT_AUTOMAKE
options from configure.ac.
(func_reconfigure): If we're using automake, and it's not in
foreign mode, link a README file if possible.
* bootstrap: Regenerate.
Gary V. Vaughan [Fri, 3 Jan 2014 03:01:53 +0000 (16:01 +1300)]
configury: use bootstrap ChangeLog management feature.
* gl/build-aux/bootstrap.in (func_autoreconf): Accept an optional
directory argument to pass to $AUTORECONF.
Update doc-comment.
* bootstrap.conf (func_reconfigure): Remove. Don't completely
overwrite bootstrap's func_reconfigure, shadowing auto-ChangeLog
management.
(func_autopoint, func_libtoolize): Overwrite these un-needed
calls instead.
(libtool_autoreconf_libltdl): New hook function to run second
autoreconf in libltdl directory.
(libtool_force_changelog): Remove. This is all handled by
bootstrap's func_reconfigure again.
* bootstrap: Regenerate.
Gary V. Vaughan [Fri, 3 Jan 2014 02:55:30 +0000 (15:55 +1300)]
bootstrap: force remove file droppings from previous run.
Now that we generate bootstrap.new with no write permission,
we have to force remove it before writing now content to the file.
* bootstrap.in (require_bootstrap_uptodate): Remove old
bootstrap.new output.
* bootstrap: Regenerate.
Gary V. Vaughan [Fri, 3 Jan 2014 01:59:24 +0000 (14:59 +1300)]
inline-source: add a DO NOT EDIT notice to generated files.
* gl/build-aux/inline-source (func_include): Add a DO NOT EDIT
notice below the #! magic number of generated files.
* gl/build-aux/bootstrap.in (func_require_bootstrap_uptodate):
Remove write bit from regenerated bootstrap.new if it differs
from incumbent bootstrap.
Change the update instructions to recommend `mv -f` to cope with
no write permission on old bootstrap script.
Gary V. Vaughan [Fri, 3 Jan 2014 01:24:51 +0000 (14:24 +1300)]
bootstrap: move included files below DO NOT EDIT comment.
* gl/build-aux/bootstrap.in: Reorder sections to load external
libraries as late as possible, leaving DO NOT EDIT comment
visible near the top of the generated bootstrap script.
Gary V. Vaughan [Fri, 3 Jan 2014 01:20:12 +0000 (14:20 +1300)]
maint: use before-save-hook in Emacs footers.
Updating to Emacs 24 now gives me warnings about write-file-hooks
being obsolete.
* 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: Set before-save-hook in Emacs file
footers instead of obsolete write-file-hooks.
Gary V. Vaughan [Fri, 3 Jan 2014 00:33:38 +0000 (13:33 +1300)]
libtoolize: use printf '%s\n' unconditionally.
It's been a year since the as_echo probes were removed in Autoconf,
so we can follow suit and remove our equivalent bs_echo probing
now. Retain $ECHO in case users need to override default printf
calls in museum piece environments.
* gl/build-aux/funclib.sh (ECHO): Default to 'printf %s\n'.
(bs_echo): Remove.
Adjust all bs_echo callers to use $ECHO instead.
* bootstrap: Regenerate.
* NEWS: Update.
Gary V. Vaughan [Thu, 2 Jan 2014 00:04:31 +0000 (13:04 +1300)]
bootstrap: push Peter's version sort fix back into funclib.sh.
Peter's a7462c5 fix was applied to the generated bootstrap script
instead of the funclib.sh source, and had have been overwritten
the next time bootstrap was regenerated.
* gl/build-aux/funclib.sh (func_sort_ver): Sort numerically on the
non-primary keys as well.
* bootstrap: Regenerate, with the change applied.
Gary V. Vaughan [Wed, 1 Jan 2014 23:13:13 +0000 (12:13 +1300)]
libtool: only strip -Wl when linking with $LD.
* build-aux/ltmain.in (func_mode_link): Don't strip -Wl from the
linker flags, except when linking with $LD, otherwise compiler
drivers that don't recognize and pass linker flags through will
choke on unrecognized options.
Gary V. Vaughan [Wed, 1 Jan 2014 22:58:35 +0000 (11:58 +1300)]
bootstrap: fix gitlog-to-changelog detection.
* gl/build-aux/bootstrap.in (func_ifcontains): Use a for loop
that relies on $IFS for element splitting instead of a one-shot
case glob that is not tolerant to \n in $gnulib_modules.
* THANKS: Add Reuben Thomas.
Reported by Reuben Thomas
Gary V. Vaughan [Mon, 23 Dec 2013 08:52:20 +0000 (21:52 +1300)]
tests: gcj cannot reliably compile directly to .o from .java
Some 4.3.x and 4.4.x releases of gcj insert a spurious 'dummy'
symbol into every object file when compiling directly from .java
to .o:
* tests/convenience.at (GCJ): make .class files from .java
sources first, and then compile those to native objects. This
works around http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42143
Gary V. Vaughan [Mon, 23 Dec 2013 05:58:31 +0000 (18:58 +1300)]
testsuite: with SunStudio12.x f77, don't fail on system symbols
Modern SunStudio f77 is just a wrapper for f90, which
explains why current master fails these test groups with:
Undefined first referenced
symbol in file
__f90_slw_ch .libs/foof2.o
__f90_sslw .libs/foof2.o
__f90_eslw .libs/foof2.o
ld: fatal: symbol referencing errors. No output written to
.libs/libfoo2.so.0.0.0
So we allow some undefined symbols in the libraries, which are
resolved by the $(FLIBS) added to the final binaries in the tests.
This seems like the simpler, and less error inducing solution to
me (compared to adding $(FLIBS) to every library LDFLAGS line).
* tests/f77demo.at (libfoo_la_LDFLAGS, libfoo2_la_LDFLAGS)
(libfoo3_la_LDFLAGS, libmix_la_LDFLAGS): Remove -no-undefined
flag.
* tests/fcdemo.at: Likewise.
Gary V. Vaughan [Wed, 30 Oct 2013 05:25:44 +0000 (18:25 +1300)]
maint: use $SED and $GREP, not sed and grep in all scripts.
Choosing between hardcoding a tool's name, or using the shell
variable with a path to the user's prefered implementation or
configure's idea of the best available is a premature
optimisation.
* build-aux/ltmain.in, gl/build-aux/bootstrap.in,
gl/build-aux/extract-trace, gl/build-aux/funclib.sh,
libtoolize.in: Use $SED and $GREP consistently throughout,
instead of hardcoding sed and grep.
* bootstrap: Regenerate.
Gary V. Vaughan [Wed, 30 Oct 2013 04:47:45 +0000 (17:47 +1300)]
tests: use TESTS_ENVIRONMENT for EGREP and FGREP.
Be consistent about passing commands to the testsuite, and use
TESTS_ENVIRONMENT consistent.
* Makefile.am (TESTS_ENVIRONMENT): Add EGREP and FGREP.
* tests/testsuite.at: Remove EGREP and FGREP extractions from
generated libtool script.
Gary V. Vaughan [Wed, 30 Oct 2013 04:21:38 +0000 (17:21 +1300)]
tests: use $SED throughout.
Trust the user, and use $SED from TESTS_ENVIRONMENT uniformly.
Hardcoding 'sed' for "simple" edits is a premature optimisation.
* tests/cdemo.at, tests/cmdline_wrap.at, tests/cwrapper.at,
tests/darwin.at, tests/demo.at, tests/duplicate_conv.at,
tests/duplicate_members.at, tests/execute-mode.at, tests/export.at,
tests/inherited_flags.at, tests/install.at, tests/libtoolize.at,
tests/mdemo.at, tests/need_lib_prefix.at, tests/old-m4-iface.at,
tests/sysroot.at, tests/tagdemo.at, tests/testsuite.at: Replace all
hardcoded sed invocations with $SED.
Gary V. Vaughan [Wed, 30 Oct 2013 02:33:20 +0000 (15:33 +1300)]
tests: run cmdline_wrap last, or not at all if anything else failed.
* Makefile.am (TESTSUITE_AT): Move stresstest.at and cmdline_wrap.at
to the end of the list.
* tests/cmdline_wrap.at: If previous tests have failed, then we
already know that rerunning them will fail too, so save time by
skipping in that case.
Gary V. Vaughan [Wed, 30 Oct 2013 01:55:00 +0000 (14:55 +1300)]
configury: use $(SED) where input does not end in newline.
On Solaris machines the system sed does not process the last
line of input unless it ends with a newline, which means it
cannot be used to massage the output of git-version-gen, because
it deliberately omits the terminating newline.
* Makefile.am (rebuild): Use the sed command found by configure,
which has a better chance of working properly than the first sed
on PATH.
Gary V. Vaughan [Tue, 29 Oct 2013 23:01:27 +0000 (12:01 +1300)]
tests: skip fcdemo checks when $FC cannot compile fortran90.
Avoid spurious fcdemo failures when Autoconf picks f77 or
similar for a fortran90 compiler.
* tests/testsuite.at (LT_AT_TAG): Using FC and FCFLAGS from make
TESTS_ENVIRONMENT, check that we really can compile fortran90
or else skip.
Gary V. Vaughan [Mon, 28 Oct 2013 07:14:22 +0000 (20:14 +1300)]
funclib.sh: simplify version comparison functions.
* gl/build-aux/funclib.sh (func_sort_ver): Much simplified.
(func_lt_ver): New function, return true if arguments are in
ascending order.
* gl/build-aux/bootstrap.in: Simplify with func_lt_ver.
* gl/build-aux/do-release-commit-and-tag.diff: Likewise.
* bootstrap: Regenerate.
Co-Authored-by: Paul Eggert <eggert@cs.ucla.edu> Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Gary V. Vaughan [Mon, 28 Oct 2013 06:55:36 +0000 (19:55 +1300)]
bootstrap: show found GREP and SED in verbose mode.
* gl/build-aux/bootstrap.in (EGREP, FGREP, GREP, SED): Remove.
These are already set by funclib.sh.
(func_prep): After --verbose has been processed, show the paths
to GREP and SED found by funclib.sh.
* bootstrap: Regenerate.
Gary V. Vaughan [Mon, 28 Oct 2013 05:50:36 +0000 (18:50 +1300)]
refactor: simplify program path searching in funclib.sh.
* gl/build-aux/funclib.sh (func_path_progs): New function. Factor
out common code from GREP and SED searches.
(func_check_prog_sed, func_check_prog_grep): New functions, for
non-common code.
(scriptversion): Update.
* bootstrap: Regenerate.
Gary V. Vaughan [Mon, 28 Oct 2013 04:38:23 +0000 (17:38 +1300)]
bootstrap: search for a non-truncating grep binary.
On at least Unixware 7.1.4, the first grep binary on PATH is
unable to process the extract-trace scripts.
* gl/build-aux/funclib.sh (GRUP): Search PATH for a grep binary
that doesn't truncate its own output if available, and set GREP
accordingly.
* Makefile.am (SCRIPT_ENV): Add setting for GREP.
* bootstrap: Regenerate.
Reported by Tim Rice.
Gary V. Vaughan [Mon, 28 Oct 2013 03:06:40 +0000 (16:06 +1300)]
bootstrap: search for a non-truncating sed binary.
On at least Unixware 7.1.4, the first sed binary on PATH is
unable to process the extract-trace scripts.
* gl/build-aux/funclib.sh (PATH_SEPARATOR): Set to : or ;
according to a feature test.
(func_executable_p): New function.
(SED): Search PATH for a sed binary that doesn't truncate its
own output if available, and set SED accordingly.
(scriptversion): Update.
* Makefile.am (SCRIPT_ENV): New macro, for propagating configured
variables.
(ltdl_ac_aux_dir, $(ltmain_sh), install-data-local): Use it.
* bootstrap: Regenerate.
Reported by Tim Rice.
Gary V. Vaughan [Sun, 27 Oct 2013 21:13:34 +0000 (10:13 +1300)]
tests: use autotest as_unset rather than rerolling $unset locally.
On at least Unixware 7.1.4, the shell variable 'unset' gets set
to 'no' during the testsuite run, breaking several test cases.
We should have been using Autotest $as_unset anyway.
* tests/testsuite.at (unset): Remove test and variable setting.
(LT_AT_MAKE): Use $as_unset as provided by autotest boilerplate
instead of our own $unset.
* tests/demo.at (uninstalled libraries ave priority): Likewise.
Reported by Tim Rice.
Gary V. Vaughan [Sat, 26 Oct 2013 02:44:46 +0000 (15:44 +1300)]
gnulib: use func_sort_ver instead of GNU sort -V in do-release-commit-and-tag.
* gl/build-aux/do-release-commit-and-tag: Source funclib.sh and
then use portable func_sort_ver rather than force installation of
all GNU coreutils just for sort -V support.
Gary V. Vaughan [Sat, 26 Oct 2013 00:33:14 +0000 (13:33 +1300)]
tests: use K&R main() syntax for old-ltdl-iface.at.
At least Mac OS 10.8.5 clang chokes on the previous
'const void *argv[]' parameter, but since we don't use it
anyway, keep to the theme of old api support and use K&R
syntax.
* tests/old-ltdl-iface.at (old.c): Use 'main ()' instead of
unportable 'int main (int argc, const void *argv[])'.
Gary V. Vaughan [Fri, 25 Oct 2013 23:20:18 +0000 (12:20 +1300)]
libltdl: bump -version-info revision by 1.
The only changes to libltdl sources since v2.4.2 have been
cosmetic and stylistic.
* libltdl/ltdl.mk (LTDL_VERSION_INFO): For a release with no
interface changes C:R:A becomes C:R+1:A.
Vadim Zeitlin [Thu, 10 Oct 2013 00:35:13 +0000 (17:35 -0700)]
libtool: Don't fall back to static libraries if building them was disabled
If -no-undefined was not specified but the platform didn't
support shared libraries with undefined symbols (e.g. Cygwin/
MinGW), static libraries were built instead of shared ones,
even if building them was explicitly disabled with --disable-
static configure option.
Fix this by stopping with a fatal error if a shared library
can't be built in this case instead of unexpectedly building a
static library instead.
* libltdl/config/ltmain.m4sh (func_mode_link()): Stop with
fatal error when trying to build a shared library without -no-
undefined on a platform not supporting undefined symbols in
shared libraries.
Fabian Groffen [Wed, 9 Oct 2013 21:44:15 +0000 (14:44 -0700)]
libtool: Fix x86_64-pc-solaris2.* GNU ld breakage
Since commit [1] libtool tries to set a 64-bits target for GNU
ld. However, it does so wrongly for x86_64-pc-solaris2.*
targets, causing libtool to believe the linker is called
ld_sol2. There is no such thing, and it obviously breaks
things further down. Some people wrongly assume there is
supposed to be an ld_sol2 on their systems, e.g. [2].
I think the original change is fragile, because it assumes it
has all CHOSTs matched, then appends _sol2. In the wild,
people have used amd64-pc-solaris2* too, so perhaps it would
be safer if the code only appended _sol2 if there is actually
an explicit target set.
Anyhow, since the 64-bits sparc target is called sparc64-* or
sparcv9-*, the sparc case is already correctly handled, so in
the attached patch, I just added an x86_64-* case, although I
could imagine relaxing the i?86 case to *86*-pc-solaris2* too.
In any case, defaulting to a linker called ld_sol2 is wrong.
DJ Delorie [Wed, 9 Oct 2013 21:25:13 +0000 (14:25 -0700)]
libtool: Add TPF settings for LT_SYS_DLOPEN_SELF
* m4/libtool.m4: Since we know that all TPF builds are cross-
builds, do not attempt to run linker tests during config. Use
known constants instead, since we know how dlopen() is
implemented.
Vincent Lefevre [Wed, 9 Oct 2013 21:19:07 +0000 (14:19 -0700)]
libtool: Fix $wl setting for tcc on GNU systems
(This addresses http://bugs.debian.org/663945. See there for
more-detailed discussion.)
tcc gained support for "-Wl,-rpath -Wl,<directory>" in its
commit 7fb0482a ("Support linker options passed in several -Wl
param", 2012-03-14) but libtool doesn't know to use it. Teach
it.
Without this change, running "make check" on MPFR when it has
been built with tcc and shared libraries doesn't work because
libtool generates a -rpath option, which tcc doesn't support.
Peter Johansson [Wed, 9 Oct 2013 21:08:25 +0000 (14:08 -0700)]
libtool: use AS_HELP_STRING in LT_WITH_SYSROOT help message.
This patch fixes so help output is formatted similar with
other macros using AS_HELP_STRING. Also it outputs '[=DIR]'
as I suspect intended rather than '=DIR'.
Joseph Prostko [Wed, 9 Oct 2013 20:34:08 +0000 (13:34 -0700)]
libtool: Haiku change for shlibpath_overrides_runpath
Pretty much all changes to Haiku for Libtool have been
upstreamed, however we currently have an incorrect value for
shlibpath_overrides_runpath. It should be "no" instead of
"yes".
Previously Scott McCreary had submitted patches for us, but I
told him I would work to get this committed, as he is quite
busy lately.
Here is a commit he made to our Haiku Ports site though, that
shows the exact change I am proposing done against Libtool
2.4.2.
Brooks Moses [Wed, 9 Oct 2013 19:32:48 +0000 (12:32 -0700)]
libtool: Discard "-mllvm $arg" options when linking.
Clang accepts options of the form "-mllvm $arg", and passes the
argument as an option to LLVM. These options caused problems
for Libtool when linking; in some cases, the -mllvm option is
passed through but the corresponding argument is dropped. (See
for example http://llvm.org/bugs/show_bug.cgi?id=14716.)
This patch resolves the issue by explicitly matching -mllvm and
taking an argument. Since Clang never uses LLVM for linking,
the matched "-mllvm $arg" option is irrelevant for the link
step, and we can simply discard it once we've recognized it.
Co-authored-by: Johannes Obermayr <johannesobermayr@gmx.de>
Copyright-paperwork-exempt: Yes
Ondřej Bílka [Wed, 9 Oct 2013 01:06:56 +0000 (18:06 -0700)]
maint: Fix various comment and documentation typos.
Ondřej writes: "Hi, this is upstream version of patch that I
sent to gcc. I generated this patch with tool that I am
writing: https://github.com/neleai/stylepp"
(Note: The generated patch was adjusted to retain the non-US
but correct spelling of 'rigourous' before commit. --Brooks)
Peter Rosin [Tue, 17 Sep 2013 18:33:12 +0000 (20:33 +0200)]
libtool: trust -print-search-dirs from recent GCC
Alan Modra hints in [1] that -print-search-dirs was fixed in
GCC 4.2(?), so that it nowadays automatically appends
-print-multi-os-directory for the applicable directories. I.e.
it should no longer be necessary for libtool to append a second
../lib64 when GCC has already done so. Also, the multi-os
appending loop seems to have been added specifically for early
(arguably broken) bi-arch enabled GCCs that printed -m32
directories even though -m64 was the default [2]. So, my
conclusion is that we want any libtool magic to affect
-print-search-dirs output from contemporary GCCs as little as
possible, while continuing to append the
-print-multi-os-directory for the legacy case.
* m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): If any of the
directories printed by -print-search-dirs ends with the
content of -print-multi-os-directory, then assume that
GCC adds the multi-os-directory where appropriate all by
itself and hence don't try to second guess when to add
it manually.
* THANKS: Update.
Gary V. Vaughan [Sun, 15 Sep 2013 13:35:15 +0000 (20:35 +0700)]
bootstrap: make ensure_changelog work for update mode projects.
* gl/build-aux/bootstrap.in (func_bootstrap): Move
func_changelog_ensure invocation from here...
(func_reconfigure): ...to here. If gnulib_modules is empty, then
grep gnulib-cache.m4 for gitlog-to-changelog before invoking
func_changelog_ensure.
* bootstrap: Regenerate.
Gary V. Vaughan [Sun, 15 Sep 2013 06:38:11 +0000 (13:38 +0700)]
bootstrap: fetch defaults from gnulib-cache.m4 for non-imported projects.
Recent changes uncovered some bugs in handling of gnulib-tool
options for projects that check in gnulib-cache.m4 rather than
keep a separate list of modules and options in bootstrap.conf.
* gl/build-aux/bootstrap.in (func_require_doc_base)
(func_require_gnulib_name, func_require_local_gl_dir): New
functions to set defaults from gnulib-cache.m4 in projects that
use gnulib-tool in --update mode.
(func_require_gnulib_tool_base_options): Use them to fetch
defaults.
(func_require_gnulib_copy_cmd): New function to calculate the
options required for gnlib-tool copy command.
(func_gnulib_tool_copy_file): Simplify accordingly.
(scriptversion): Bump.
Gary V. Vaughan [Thu, 29 Aug 2013 13:44:42 +0000 (20:44 +0700)]
bootstrap: gnulib_tool=true means no gnulib submodule.
* gl/build-aux/bootstrap.in (func_require_gnulib_tool): No
sneaking off and cloning gnulib when the user already specified
gnulib_tool=true in their bootstrap.conf!
* bootstrap: Regenerate.
Alan Modra [Fri, 23 Aug 2013 13:36:32 +0000 (20:36 +0700)]
bootstrap: make first char of IFS a space.
Putting tab first in IFS breaks func_echo_all usage of $*,
resulting in failure of func_infer_tag to match a command line
using a $CC with trailing spaces. The trailing spaces were
stripped out of CC_expanded but words in $CC were separated by
tabs. This didn't match the makefile expansion of $CC using the
standard IFS with a first char of space.
* gl/build-aux/funclib.sh (IFS): Make first char a space.
* bootstrap: Regenerate.
Gary V. Vaughan [Fri, 23 Aug 2013 13:28:25 +0000 (20:28 +0700)]
bootstrap: support --no-git and --no-po options.
* gl/build-aux/bootstrap.in (bootstrap_parse_options): Accept
--no-git as an alias for --skip-git for compatibility with gnulib
bootstrap, and --no-po for symmetry.
Reported by Mike Miller.
Gary V. Vaughan [Fri, 23 Aug 2013 13:17:50 +0000 (20:17 +0700)]
bootstrap: support gnulib gnulib_tool_option_extras settings.
* gl/build-aux/bootstrap.in (func_gnulib_tool): Even though we
don't need it, support gnulib_tool_option_extras for bootstrap.conf
ported from gnulib bootstrap.
* bootstrap: Regenerate.
Reported by Mike Miller.
Gary V. Vaughan [Fri, 23 Aug 2013 12:55:27 +0000 (19:55 +0700)]
bootstrap: support sha1 binary on OpenBSD.
* gl/build-aux/bootstrap.in (func_update_po_files): Remove the
use of --status in a way that will suppress all error messages,
but since this is only used to minimize updates, it shouldn't
cause an issue.
Look for a sha1 binary if the other SHA1SUM settings are not
found.
Also exit early if there is a problem updating the po file
checksums.
* bootstrap: Regenerate.
Ported from a gnulib patch by Padraig Brady.
Gary V. Vaughan [Fri, 23 Aug 2013 10:23:29 +0000 (17:23 +0700)]
bootstrap: support tools that don't accept '--version' in buildreq.
* gl/build-aux/bootstrap.in (func_check_tool): Check whether there
is an executable as given or on the command PATH.
(func_check_version): Use func_check_tool to avoid invoking --version
when buildreq specifies '-' for the version number.
* bootstrap: Regenerate.
Reported by Mike Miller.
Gary V. Vaughan [Fri, 23 Aug 2013 09:27:31 +0000 (16:27 +0700)]
bootstrap: diagnose bad $buildreq formatting.
Particularly when porting from gnulib bootstrap to libtool
bootstrap, it's easy to forget the extra URL column used for
error reporting.
* gl/build-aux/bootstrap.in (func_check_versions): A non-URL
pattern in the 3rd column of buildreq triggers a fatal error.
* bootstrap: Regenerate.
Reported by Mike Miller.
Gary V. Vaughan [Fri, 23 Aug 2013 08:59:46 +0000 (15:59 +0700)]
bootstrap: support OpenBSD sed.
* gl/build-aux/bootstrap.in (func_insert_if_absent): Work around
the problem of OpenBSD sed not supporting '-' as a notation for
standard input.
* bootstrap: Regenerate.
* THANKS: Add Mike Miller.
Reported by Mike Miller.
Copyright-paperwork-exempt: Yes Signed-off-by: Gary V. Vaughan <gary@gnu.org>