This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add "native" as a valid option value for -march= on arm (PR driver/83193).


On 02/21/2018 10:23 AM, Kyrill Tkachov wrote:
> 
> On arm we also support "native" as a value for -mcpu and -mtune. These are both handled by
> the arm_print_hint_for_cpu_option function in the same file. Can you please add this snippet
> to them as well?

Hi.

Can you please test for me attached follow up patch?
Thanks,
Martin
>From 3a40e8a873461f9f06a18539cfb7c366dd6efafb Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Wed, 21 Feb 2018 15:38:32 +0100
Subject: [PATCH] Add "native" as a valid option value for -mcpu/-mtune= on arm
 (PR driver/83193).

gcc/ChangeLog:

2018-02-21  Martin Liska  <mliska@suse.cz>

	PR driver/83193
	* common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
	Add "native" as a possible value.
---
 gcc/common/config/arm/arm-common.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/common/config/arm/arm-common.c b/gcc/common/config/arm/arm-common.c
index 50f0bad3e36..a404d4b1562 100644
--- a/gcc/common/config/arm/arm-common.c
+++ b/gcc/common/config/arm/arm-common.c
@@ -309,6 +309,12 @@ arm_print_hint_for_cpu_option (const char *target,
   auto_vec<const char*> candidates;
   for (; list->common.name != NULL; list++)
     candidates.safe_push (list->common.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 (target, s, candidates);
   if (hint)
-- 
2.16.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]