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

Fix zero builds for non-listed architectures

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: infrastructure
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b135
    • OS:
      linux

      Description

      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)
       

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: