From: David Edelsohn Date: Mon, 19 Oct 2020 17:11:56 +0000 (-0400) Subject: rs6000: Allow -mabi=no-altivec override on command line for AIX. X-Git-Tag: basepoints/gcc-12~4118 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52cb0c7b0e9eaa757c70a745f737b7393ec3137e;p=thirdparty%2Fgcc.git rs6000: Allow -mabi=no-altivec override on command line for AIX. The override options machinery to set rs6000_altivec_abi for AIX doesn't check if the option is set on the command line. This patch checks for a command line option to not override it. gcc/ChangeLog: * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't implcitly enable Altivec ABI if set on the command line. --- diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index b58eeae2b98c..d05b85c3cdbc 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4324,7 +4324,9 @@ rs6000_option_override_internal (bool global_init_p) } /* Enable Altivec ABI for AIX -maltivec. */ - if (TARGET_XCOFF && (TARGET_ALTIVEC || TARGET_VSX)) + if (TARGET_XCOFF + && (TARGET_ALTIVEC || TARGET_VSX) + && !global_options_set.x_rs6000_altivec_abi) { if (main_target_opt != NULL && !main_target_opt->x_rs6000_altivec_abi) error ("target attribute or pragma changes AltiVec ABI");