diff options
author | Martin Liska <mliska@suse.cz> | 2018-02-21 15:05:17 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-02-21 14:05:17 +0000 |
commit | a646fe9c48679d9904473676705f75dae5dd59c2 (patch) | |
tree | 06c7ebde19fccfce2b67450ae34350b68044c942 /gcc | |
parent | c8602fe6127fde5e75b4f9288f86d33a5b885660 (diff) | |
download | gcc-a646fe9c48679d9904473676705f75dae5dd59c2.zip gcc-a646fe9c48679d9904473676705f75dae5dd59c2.tar.gz gcc-a646fe9c48679d9904473676705f75dae5dd59c2.tar.bz2 |
Add "native" as a valid option value for -march= on arm (PR driver/83193).
2018-02-21 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.
From-SVN: r257873
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/common/config/arm/arm-common.c | 6 | ||||
-rw-r--r-- | gcc/config/arm/arm.h | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a07661b..730ab68 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2018-02-21 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. + 2018-02-21 Jakub Jelinek <jakub@redhat.com> Martin Sebor <msebor@redhat.com> diff --git a/gcc/common/config/arm/arm-common.c b/gcc/common/config/arm/arm-common.c index fc585e0..50f0bad 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 + char *s; const char *hint = candidates_list_and_hint (target, s, candidates); if (hint) diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 6f3c4f4..bbf3937 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -2194,6 +2194,7 @@ extern const char *arm_target_thumb_only (int argc, const char **argv); an ARM chip. */ #if defined(__arm__) extern const char *host_detect_local_cpu (int argc, const char **argv); +#define HAVE_LOCAL_CPU_DETECT # define MCPU_MTUNE_NATIVE_FUNCTIONS \ { "local_cpu_detect", host_detect_local_cpu }, # define MCPU_MTUNE_NATIVE_SPECS \ |