From 59aab79a4c4cb1d443e1aad5dbced29b780a79b5 Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Tue, 26 Sep 2017 09:33:49 +0000 Subject: [PATCH] [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 --- gcc/ChangeLog | 5 +++++ gcc/config/arm/arm.h | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7c6d7dce293..5e7f82dc2c4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-09-26 Richard Earnshaw + + PR target/82175 + * config/arm/arm.h (DRIVER_SELF_SPECS): Separate sub-rules with commas. + 2017-09-26 Richard Biener PR tree-optimization/82320 diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index c71ad5cd710..a3ca800f7a5 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 %*}" \ " %