]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-common.m4: change the ARFLAGS default to 'cr'
authorPavel Raiskup <praiskup@redhat.com>
Wed, 1 Jul 2015 07:38:35 +0000 (09:38 +0200)
committerPádraig Brady <P@draigBrady.com>
Wed, 1 Jul 2015 15:06:04 +0000 (16:06 +0100)
In some GNU/Linux distributions people started to compile 'ar'
binary with --enable-deterministic-archives (binutils project).
That, however, in combination with previous autotools 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 will disable the 'u', with the benefit of having
rather 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
Automake's ARFLAGS default, just to silent such warnings.

* m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): Set ARFLAGS='cr' if not
set already.

ChangeLog
m4/gnulib-common.m4

index 94852988ab75a43ac1666d308773ed5dfc505f65..5cab00b876fd3fcb411acb2ad3d811720a94769d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2015-07-01  Pavel Raiskup  <praiskup@redhat.com>
+
+       gnulib-common.m4: change the ARFLAGS default to 'cr'
+       In some GNU/Linux distributions people started to compile 'ar'
+       binary with --enable-deterministic-archives (binutils project).
+       That, however, in combination with previous autotools long time
+       working default AR{_,}FLAGS=cru causes warnings on such
+       installations:
+       ar: `u' modifier ignored since `D' is the default (see `U')
+       * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): Set ARFLAGS='cr' if not
+       set already.
+
 2015-07-01  Pavel Raiskup  <praiskup@redhat.com>
 
        selinux-h: avoid double free after *getfilecon()
index b301abeda055ac020108463dce6e22e9bf281e08..40e82f6e27fff92db63f693abdab53c22e2b4f27 100644 (file)
@@ -278,12 +278,12 @@ Amsterdam
       dnl but prefer ${host}-ar over ar (useful for cross-compiling).
       AC_CHECK_TOOL([AR], [ar], [ar])
       if test -z "$ARFLAGS"; then
-        ARFLAGS='cru'
+        ARFLAGS='cr'
       fi
     fi
   else
     if test -z "$ARFLAGS"; then
-      ARFLAGS='cru'
+      ARFLAGS='cr'
     fi
   fi
   AC_SUBST([AR])