]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* src/default.c (default_variables) [AIX]: [SV 59096] Fix ARFLAGS
authorPaul Smith <psmith@gnu.org>
Fri, 27 Nov 2020 21:16:38 +0000 (16:16 -0500)
committerPaul Smith <psmith@gnu.org>
Sun, 29 Nov 2020 22:55:32 +0000 (17:55 -0500)
Reported by Dmitry Goncharov <dgoncharov@users.sf.net>, with a patch
changing the pattern rule for building archives.  I decided to
change the default value of ARFLAGS on AIX instead.

src/default.c
src/read.c

index 751ea154e54e09fd02e602e8163eac299044b118..fffff8bcbb94976bb177c85efa388998d240fb33 100644 (file)
@@ -518,7 +518,12 @@ static const char *default_variables[] =
 #else /* !VMS */
 
     "AR", "ar",
-    "ARFLAGS", "rv",
+#ifdef _AIX
+    /* AIX requires object file format specification: choose -Xany.  */
+    "ARFLAGS", "-Xany -rv",
+#else
+    "ARFLAGS", "-rv",
+#endif
     "AS", "as",
 #ifdef GCC_IS_NATIVE
     "CC", "gcc",
index 57903bc89cebc707fc309be9690925f35177c2b6..3553fd79b1e4d17e12cc5c427d059ca42c20c26c 100644 (file)
@@ -1881,7 +1881,6 @@ static void check_specials (const struct nameseq* files, int set_default)
           /* These default values are based on IEEE Std 1003.1-2008.
              It requires '-O 1' for [CF]FLAGS, but GCC doesn't allow
              space between -O and the number so omit it here.  */
-          define_variable_cname ("ARFLAGS", "-rv", o_default, 0);
           define_variable_cname ("CC", "c99", o_default, 0);
           define_variable_cname ("CFLAGS", "-O1", o_default, 0);
           define_variable_cname ("FC", "fort77", o_default, 0);