From 86e02035d8011fa158125a541cde5cc55a21c1ea Mon Sep 17 00:00:00 2001
From: Dominik Vogt <vogt@linux.vnet.ibm.com>
Date: Thu, 9 Jul 2015 07:31:42 +0100
Subject: [PATCH] S390: Do not define EXTRA_SPEC_FUNCTIONS when cross
compiling.
---
gcc/config/s390/s390.h | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
@@ -126,26 +126,30 @@ enum processor_flags
{ "arch", "%{!march=*:-march=%(VALUE)}" }, \
{ "tune", "%{!mtune=*:-mtune=%(VALUE)}" }
+#ifdef __s390__
extern const char *s390_host_detect_local_cpu (int argc, const char **argv);
# define EXTRA_SPEC_FUNCTIONS \
{ "local_cpu_detect", s390_host_detect_local_cpu },
# define MARCH_MTUNE_NATIVE_SPECS \
- " %{march=native:%<march=native %:local_cpu_detect(arch)}" \
+ , " %{march=native:%<march=native %:local_cpu_detect(arch)}" \
" %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}"
+#else
+# define MARCH_MTUNE_NATIVE_SPECS
+#endif
/* Defaulting rules. */
#ifdef DEFAULT_TARGET_64BIT
#define DRIVER_SELF_SPECS \
"%{!m31:%{!m64:-m64}}", \
"%{!mesa:%{!mzarch:%{m31:-mesa}%{m64:-mzarch}}}", \
- "%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}}", \
+ "%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}}" \
MARCH_MTUNE_NATIVE_SPECS
#else
#define DRIVER_SELF_SPECS \
"%{!m31:%{!m64:-m31}}", \
"%{!mesa:%{!mzarch:%{m31:-mesa}%{m64:-mzarch}}}", \
- "%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}}", \
+ "%{!march=*:%{mesa:-march=g5}%{mzarch:-march=z900}}" \
MARCH_MTUNE_NATIVE_SPECS
#endif
--
2.3.0