From 52cb0c7b0e9eaa757c70a745f737b7393ec3137e Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Mon, 19 Oct 2020 13:11:56 -0400 Subject: [PATCH] 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. --- gcc/config/rs6000/rs6000.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index b58eeae2b98..d05b85c3cdb 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"); -- 2.30.2