Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8165158

Fix zero builds for non-listed architectures

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • infrastructure
    • None
    • b135
    • linux

      Matthias Klose to build-dev:

      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


      hotspot-undefined-target-cpu.diff

      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)
       

            erikj Erik Joelsson
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: