From 0e020bbc24d89592e9ea15f9e8b887a71692eedf Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Fri, 27 Nov 2020 16:16:38 -0500 Subject: [PATCH] * src/default.c (default_variables) [AIX]: [SV 59096] Fix ARFLAGS Reported by Dmitry Goncharov , 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 | 7 ++++++- src/read.c | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/default.c b/src/default.c index 751ea154..fffff8bc 100644 --- a/src/default.c +++ b/src/default.c @@ -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", diff --git a/src/read.c b/src/read.c index 57903bc8..3553fd79 100644 --- a/src/read.c +++ b/src/read.c @@ -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);