The zero build for architectures not explicitly listed fails currently in
hotspot, because of an unset macro, and the compiler complains about a single -D
option passed.

Here are two proposals how to fix these:

 - Not passing the -D<cpu_define> if it is not set. Afaik the define
   is only used for hotspot builds, not for zero builds.

 - Provide a fall back for "unknown" zero architectures.

Matthias
Index: b/hotspot/make/lib/CompileJvm.gmk
===================================================================
--- a/hotspot/make/lib/CompileJvm.gmk
+++ b/hotspot/make/lib/CompileJvm.gmk
@@ -70,7 +70,7 @@ JVM_CFLAGS_TARGET_DEFINES += \
     -DINCLUDE_SUFFIX_OS=_$(HOTSPOT_TARGET_OS) \
     -DINCLUDE_SUFFIX_CPU=_$(HOTSPOT_TARGET_CPU_ARCH) \
     -DTARGET_COMPILER_$(HOTSPOT_TOOLCHAIN_TYPE) \
-    -D$(HOTSPOT_TARGET_CPU_DEFINE) \
+    $(if $(HOTSPOT_TARGET_CPU_DEFINE),-D$(HOTSPOT_TARGET_CPU_DEFINE)) \
     -DHOTSPOT_LIB_ARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' \
     #
 
Index: b/common/autoconf/platform.m4
===================================================================
--- a/common/autoconf/platform.m4
+++ b/common/autoconf/platform.m4
@@ -514,6 +514,8 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HEL
     HOTSPOT_$1_CPU_DEFINE=S390
   elif test "x$OPENJDK_$1_CPU" = xs390x; then
     HOTSPOT_$1_CPU_DEFINE=S390
+  elif test "x$OPENJDK_$1_CPU" != x; then
+    HOTSPOT_$1_CPU_DEFINE=$(echo $OPENJDK_$1_CPU | tr a-z A-Z)
   fi
   AC_SUBST(HOTSPOT_$1_CPU_DEFINE)
 

Reply via email to