Hi Helmut, Hi Ulrich, Hi Andreas,

  A toolchain configured as --target=s390-linux currently fails to build
  gcc because of an undefined function:

    undefined reference to `s390_host_detect_local_cpu(int, char const**)'
    Makefile:1858: recipe for target 'xgcc' failed

  The patch below fixes the problem for me by adding a stub function in
  s390-common.c, but I am not sure if it is the correct solution.
  Please can you advise ?

Cheers
  Nick

Index: gcc/common/config/s390/s390-common.c
===================================================================
--- gcc/common/config/s390/s390-common.c        (revision 226094)
+++ gcc/common/config/s390/s390-common.c        (working copy)
@@ -119,6 +119,14 @@
     }
 }

+const char * s390_host_detect_local_cpu (int, const char **) __attribute__((weak));
+const char *
+s390_host_detect_local_cpu (int argc ATTRIBUTE_UNUSED,
+                           const char **argv ATTRIBUTE_UNUSED)
+{
+  return NULL;
+}
+
 #undef TARGET_DEFAULT_TARGET_FLAGS
 #define TARGET_DEFAULT_TARGET_FLAGS (TARGET_DEFAULT)

Reply via email to