summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2015-04-17 16:54:58 +0200
committerPavel Raiskup <praiskup@redhat.com>2015-09-26 18:00:16 +0200
commit418129bc63afc312701e84cb8afa5ca413df1ab5 (patch)
tree9bd8b9d437103d3ae3243783fd41dde7b2cf318d /m4
parent4335de1dfb7d2ec728427e07a54136b94a2d40f6 (diff)
downloadlibtool-418129bc63afc312701e84cb8afa5ca413df1ab5.tar.gz
ARFLAGS: use 'cr' instead of 'cru' by default
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.
Diffstat (limited to 'm4')
-rw-r--r--m4/libtool.m46
1 files changed, 3 insertions, 3 deletions
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 2d6bda98..3335def6 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1042,8 +1042,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
- echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
- $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+ echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+ $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cat > conftest.c << _LT_EOF
@@ -1501,7 +1501,7 @@ _LT_DECL([], [AR], [1], [The archiver])
# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
# variable obsoleted/removed.
-test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cru}
+test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
lt_ar_flags=$AR_FLAGS
_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])