[PATCH] Add "native" as a valid option value for -march= on i386 (PR driver/83193).

Jakub Jelinek jakub@redhat.com
Wed Feb 21 19:49:00 GMT 2018


On Wed, Feb 21, 2018 at 08:33:21AM +0100, Martin Liška wrote:
> >From 8f1783a9017ec06c578fd644e46168ec5763d5ca Mon Sep 17 00:00:00 2001
> From: marxin <mliska@suse.cz>
> Date: Tue, 20 Feb 2018 14:21:05 +0100
> Subject: [PATCH 3/3] Add "native" as a valid option value for -march= on i386
>  (PR driver/83193).
> 
> gcc/ChangeLog:
> 
> 2018-02-20  Martin Liska  <mliska@suse.cz>
> 
> 	PR driver/83193
> 	* config/i386/i386.c (ix86_option_override_internal):
> 	Add "native" as a possible value.
> ---
>  gcc/config/i386/i386.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
> index d54e7301e84..9f2c5218ae5 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

This just adds "native" as possible value for -march, but shouldn't it be
also for -mtune, i.e. around line 4268?

> +
>        char *s;
>        const char *hint
>  	= candidates_list_and_hint (opts->x_ix86_arch_string, s, candidates);
> -- 
> 2.16.1
> 


	Jakub



More information about the Gcc-patches mailing list