aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@arm.com>2017-09-26 09:33:49 +0000
committerRichard Earnshaw <rearnsha@gcc.gnu.org>2017-09-26 09:33:49 +0000
commit59aab79a4c4cb1d443e1aad5dbced29b780a79b5 (patch)
tree6c49aebbfda6afb9bb4dabbdacc355c26ff883eb /gcc/config
parent09fdb7014c9b121d4f695b1ce63d13f7e43a45c8 (diff)
downloadgcc-59aab79a4c4cb1d443e1aad5dbced29b780a79b5.zip
gcc-59aab79a4c4cb1d443e1aad5dbced29b780a79b5.tar.gz
gcc-59aab79a4c4cb1d443e1aad5dbced29b780a79b5.tar.bz2
[ARM] PR82175 - fix -mcpu=native not working correctly.
The new option processing machinery relies on %< rules in the specs to suppress options that are rewritten. Suppression appears to be a two phase process where the option is partially suppressed when %< is processed and then fully suppressed at the end of the string. Strings are separated by commas and there can be multiple strings used to form DRIVER_SELF_SPECS. The fix in this case is to separate the driver self specs for ARM into separate rules as described; this forces the -m{cpu,tune,arch}=native options to be properly removed before proceeding to the next rule set. PR target/82175 * config/arm/arm.h (DRIVER_SELF_SPECS): Separate sub-rules with commas. From-SVN: r253189
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/arm/arm.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index c71ad5c..a3ca800 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -2228,9 +2228,12 @@ const char *arm_be8_option (int argc, const char **argv);
" %{mfloat-abi=*: abi %*}" \
" %<march=*) "
+/* Complete set of specs for the driver. Commas separate the
+ individual rules so that any option suppression (%<opt...)is
+ completed before starting subsequent rules. */
#define DRIVER_SELF_SPECS \
- MCPU_MTUNE_NATIVE_SPECS \
- TARGET_MODE_SPECS \
+ MCPU_MTUNE_NATIVE_SPECS, \
+ TARGET_MODE_SPECS, \
ARCH_CANONICAL_SPECS
#define TARGET_SUPPORTS_WIDE_INT 1