public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kyrill  Tkachov <kyrylo.tkachov@foss.arm.com>
To: "Martin Liška" <mliska@suse.cz>, gcc-patches@gcc.gnu.org
Cc: Jakub Jelinek <jakub@redhat.com>, Jan Hubicka <hubicka@ucw.cz>,
	 James Greenhalgh <james.greenhalgh@arm.com>,
	Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>
Subject: Re: Add "native" as a valid option value for -march= on arm (PR driver/83193).
Date: Wed, 21 Feb 2018 09:24:00 -0000	[thread overview]
Message-ID: <5A8D3A9A.3040202@foss.arm.com> (raw)
In-Reply-To: <12f28b57-c526-c85e-5c9b-05fa5724cf17@suse.cz>

Hi Martin,

On 21/02/18 07:34, Martin Liška wrote:
> Hi.
>
> This is equivalent patch for ARM target.

Thanks for fixing this!

> Ready for trunk?

Have you tested this with a native and a cross-compiler like the aarch64 version?

> Thanks,
> Martin

 From 656a883bc5239439ba80743f15a8df704501ee71 Mon Sep 17 00:00:00 2001
From: marxin<mliska@suse.cz>
Date: Tue, 20 Feb 2018 14:09:22 +0100
Subject: [PATCH 1/3] Add "native" as a valid option value for -march= on arm
  (PR driver/83193).

gcc/ChangeLog:

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

	PR driver/83193
	* common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
	Add "native" as a possible value.
	* config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
	when native cpu detection is available.
---
  gcc/common/config/arm/arm-common.c | 6 ++++++
  gcc/config/arm/arm.h               | 1 +
  2 files changed, 7 insertions(+)

diff --git a/gcc/common/config/arm/arm-common.c b/gcc/common/config/arm/arm-common.c
index fc585e0b0ee..50f0bad3e36 100644
--- a/gcc/common/config/arm/arm-common.c
+++ b/gcc/common/config/arm/arm-common.c
@@ -353,6 +353,12 @@ arm_print_hint_for_arch_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
+


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?

Thanks,
Kyrill

  reply	other threads:[~2018-02-21  9:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20 13:25 [PATCH] Add "native" as a valid option value for -march= on i386 " Martin Liška
2018-02-20 15:58 ` Richard Sandiford
2018-02-20 17:49   ` Jakub Jelinek
2018-02-20 16:19     ` Richard Sandiford
2018-02-20 16:26       ` Martin Liška
2018-02-21  7:33         ` Martin Liška
2018-02-21 19:49           ` Jakub Jelinek
2018-02-21 14:19             ` Martin Liška
2018-02-21 14:23               ` Jakub Jelinek
2018-02-21  7:34 ` Add "native" as a valid option value for -march= on arm " Martin Liška
2018-02-21  9:24   ` Kyrill Tkachov [this message]
2018-02-21  9:53     ` Martin Liška
2018-02-21 12:26       ` Kyrill Tkachov
2018-02-21 14:03     ` Martin Liška
2018-02-22  8:52     ` Martin Liška
2018-02-22 10:59       ` Kyrill Tkachov
2018-02-22 12:16         ` Martin Liška
2018-03-08  9:02           ` Martin Liška
2018-03-09 15:43           ` Kyrill Tkachov
2018-03-09 15:46             ` Martin Liška
2018-02-21  7:35 ` [PATCH] Add "native" as a valid option value for -march= on aarch64 " Martin Liška

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5A8D3A9A.3040202@foss.arm.com \
    --to=kyrylo.tkachov@foss.arm.com \
    --cc=Ramana.Radhakrishnan@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=jakub@redhat.com \
    --cc=james.greenhalgh@arm.com \
    --cc=mliska@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).