I noticed that although configure on aarch64 handles --with-arch and
--with-cpu, they aren't passed on to the compilation -- instead you just
get whatever the internal default is in the compiler back-end. This
patch fixes that by wiring up the missing logic.
2014-07-04 Richard Earnshaw <rearn...@arm.com>
PR target/61714
* aarch64.h (OPTION_DEFAULT_SPECS): Define.
Applied to trunk. It's trivial enough that I'll probably back-port it
to 4.9 as well.
R.
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index b95365a..080b23f 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -879,6 +879,13 @@ extern enum aarch64_code_model aarch64_cmodel;
#define ENDIAN_LANE_N(mode, n) \
(BYTES_BIG_ENDIAN ? GET_MODE_NUNITS (mode) - 1 - n : n)
+/* Support for a configure-time default CPU, etc. We currently support
+ --with-arch and --with-cpu. Both are ignored if either is specified
+ explicitly on the command line at run time. */
+#define OPTION_DEFAULT_SPECS \
+ {"arch", "%{!march=*:%{!mcpu=*:-march=%(VALUE)}}" }, \
+ {"cpu", "%{!march=*:%{!mcpu=*:-mcpu=%(VALUE)}}" },
+
#define BIG_LITTLE_SPEC \
" %{mcpu=*:-mcpu=%:rewrite_mcpu(%{mcpu=*:%*})}"