On Wed, Jul 08, 2015 at 04:18:47PM -0400, DJ Delorie wrote: > > > Version 2 of the patch to enable the configure options > > --with-arch=native and --with-tune=native. > > This patch broke cross-compiling with --target=s390-* > > s390_host_detect_local_cpu is only defined if the --host is s390-* > > but EXTRA_SPEC_FUNCTIONS refers to it when --target is s390-*
Sorry about that. Does the attached Patch fix the problem? gcc/ChangeLog: -------------- 2015-07-09 Dominik Vogt <v...@linux.vnet.ibm.com> * config/s390/s390.h: S390: Do not define EXTRA_SPEC_FUNCTIONS when cross compiling. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany
>From 86e02035d8011fa158125a541cde5cc55a21c1ea Mon Sep 17 00:00:00 2001 From: Dominik Vogt <v...@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(-) diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index 85a0d1a..362e3d4 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -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