Commit a08b5429 by Martin Liska Committed by Martin Liska

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

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

	PR driver/83193
	* config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
	Add "native" as a possible value.
	* config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
	the macro when native cpu detection is available.

From-SVN: r257874
parent a646fe9c
2018-02-21 Martin Liska <mliska@suse.cz>
PR driver/83193
* config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
Add "native" as a possible value.
* config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
the macro when native cpu detection is available.
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
......
......@@ -10628,6 +10628,13 @@ aarch64_print_hint_for_core_or_arch (const char *str, bool arch)
const struct processor *entry = arch ? all_architectures : all_cores;
for (; entry->name != NULL; entry++)
candidates.safe_push (entry->name);
#ifdef HAVE_LOCAL_CPU_DETECT
/* Add also "native" as possible value. */
if (arch)
candidates.safe_push ("native");
#endif
char *s;
const char *hint = candidates_list_and_hint (str, s, candidates);
if (hint)
......
......@@ -1002,6 +1002,7 @@ extern const char *aarch64_rewrite_mcpu (int argc, const char **argv);
#if defined(__aarch64__)
extern const char *host_detect_local_cpu (int argc, const char **argv);
#define HAVE_LOCAL_CPU_DETECT
# define EXTRA_SPEC_FUNCTIONS \
{ "local_cpu_detect", host_detect_local_cpu }, \
MCPU_TO_MARCH_SPEC_FUNCTIONS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment