From 462c3e357b53ce86eb2f6f5db8172e6b3775925c Mon Sep 17 00:00:00 2001 From: marxin Date: Thu, 22 Feb 2018 08:50:41 +0000 Subject: [PATCH] Add "native" as a valid option value for -march= on i386 (PR driver/83193). 2018-02-22 Martin Liska PR driver/83193 * config/i386/i386.c (ix86_option_override_internal): Add "native" as a possible value for -march and -mtune. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257893 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 07dd795476d..d813f81a1a6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-02-22 Martin Liska + + PR driver/83193 + * config/i386/i386.c (ix86_option_override_internal): + Add "native" as a possible value for -march and -mtune. + 2018-02-22 Jakub Jelinek PR target/84502 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index d54e7301e84..18d9084fd30 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4193,6 +4193,11 @@ ix86_option_override_internal (bool main_args_p, || ((processor_alias_table[i].flags & PTA_64BIT) != 0))) candidates.safe_push (processor_alias_table[i].name); +#ifdef HAVE_LOCAL_CPU_DETECT + /* Add also "native" as possible value. */ + candidates.safe_push ("native"); +#endif + char *s; const char *hint = candidates_list_and_hint (opts->x_ix86_arch_string, s, candidates); @@ -4265,6 +4270,11 @@ ix86_option_override_internal (bool main_args_p, || ((processor_alias_table[i].flags & PTA_64BIT) != 0)) candidates.safe_push (processor_alias_table[i].name); +#ifdef HAVE_LOCAL_CPU_DETECT + /* Add also "native" as possible value. */ + candidates.safe_push ("native"); +#endif + char *s; const char *hint = candidates_list_and_hint (opts->x_ix86_tune_string, s, candidates); -- 2.11.4.GIT