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

Use OPENJDK_TARGET_CPU_ARCH instead of legacy value for hotspot ARCH

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: infrastructure
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b23

      Backports

        Description

        When configuring the hotspot build the build system sets up the ARCH variable to reflect the target cpu. Currently the value is initialized to OPENJDK_TARGET_CPU_LEGACY, which is the internal legacy cpu name. For example, on x86 64-bit this is amd64 on linux (but x86_64 on mac).

        Depending on the platform ARCH is either honored or ignored. Solaris for example overrides the value of ARCH with the output from 'uname -p' (see hotspot/make/solaris/makefiles/defs.make). On BSD/OSX the value is also overidden, but with the output from 'uname -m' (see hotspot/make/bsd/makefiles/defs.make). Windows is.. different.

        On Linux the ARCH variable is honored, but if it is *not* set it is initialized to the output from 'uname -m' (see hotspot/make/linux/makefiles/defs.make).

        The goal in the new (JDK) build system is to have the "legacy" value gradually removed in favor of the other variables. We should move towards setting ARCH to OPENJDK_TARGET_CPU_ARCH instead of OPENJDK_TARGET_CPU_LEGACY and make sure the Hotspot build system picks it up correctly.

          Issue Links

            Activity

            Hide
            dholmes David Holmes added a comment -
            We need to set ARCH externally for cross-compilation builds.
            Show
            dholmes David Holmes added a comment - We need to set ARCH externally for cross-compilation builds.
            Hide
            mikael Mikael Vidstedt added a comment -
            Right, and to be clear I'm not suggesting removing that possibility, only potentially change what one needs to set ARCH to.
            Show
            mikael Mikael Vidstedt added a comment - Right, and to be clear I'm not suggesting removing that possibility, only potentially change what one needs to set ARCH to.
            Hide
            dholmes David Holmes added a comment -
            So the history here:

            +# Old name for OPENJDK_TARGET_CPU, uses i586 and amd64, instead of x86 and x86_64.
            +ARCH=$(OPENJDK_TARGET_CPU_LEGACY)

            If we drop use of i586 and amd64 this is probably not needed anymore.

            BTW it seems to me that these uses of OPENJDK_TARGET_CPU_LEGACY should actually be OPENJDK_TARGET_CPU_LEGACY_LIB

            ./jdk/make/CompileLaunchers.gmk: -DLIBARCHNAME='"$(OPENJDK_TARGET_CPU_LEGACY)"' \
            ./jdk/make/Images.gmk: $(call info-file-item, "OS_ARCH", "$(OPENJDK_TARGET_CPU_LEGACY)")
            ./jdk/make/CopyFiles.gmk: JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY)
            ./jdk/make/CopyFiles.gmk: DGALIBS = $(_DGALIBS_$(OPENJDK_TARGET_CPU_LEGACY):%=$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/%)
            ./jdk/make/CopyFiles.gmk: $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libxinerama.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libxinerama.so
            ./jdk/make/CopyFiles.gmk: $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNW%.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libjdgaSUNW%.so

            but there may be differences between the JDK notion of "lib arch" and hotspot's
            Show
            dholmes David Holmes added a comment - So the history here: +# Old name for OPENJDK_TARGET_CPU, uses i586 and amd64, instead of x86 and x86_64. +ARCH=$(OPENJDK_TARGET_CPU_LEGACY) If we drop use of i586 and amd64 this is probably not needed anymore. BTW it seems to me that these uses of OPENJDK_TARGET_CPU_LEGACY should actually be OPENJDK_TARGET_CPU_LEGACY_LIB ./jdk/make/CompileLaunchers.gmk: -DLIBARCHNAME='"$(OPENJDK_TARGET_CPU_LEGACY)"' \ ./jdk/make/Images.gmk: $(call info-file-item, "OS_ARCH", "$(OPENJDK_TARGET_CPU_LEGACY)") ./jdk/make/CopyFiles.gmk: JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY) ./jdk/make/CopyFiles.gmk: DGALIBS = $(_DGALIBS_$(OPENJDK_TARGET_CPU_LEGACY):%=$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/%) ./jdk/make/CopyFiles.gmk: $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libxinerama.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libxinerama.so ./jdk/make/CopyFiles.gmk: $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNW%.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libjdgaSUNW%.so but there may be differences between the JDK notion of "lib arch" and hotspot's
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/0a039fc78645
            User: dcubed
            Date: 2014-06-20 23:43:04 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/0a039fc78645 User: dcubed Date: 2014-06-20 23:43:04 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/hs-rt/rev/7b8b81ff3b31
            User: dcubed
            Date: 2014-06-21 04:00:42 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/hs-rt/rev/7b8b81ff3b31 User: dcubed Date: 2014-06-21 04:00:42 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/rev/7b8b81ff3b31
            User: lana
            Date: 2014-07-16 16:39:45 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/rev/7b8b81ff3b31 User: lana Date: 2014-07-16 16:39:45 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/0a039fc78645
            User: lana
            Date: 2014-07-16 16:39:59 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/0a039fc78645 User: lana Date: 2014-07-16 16:39:59 +0000

              People

              • Assignee:
                mikael Mikael Vidstedt
                Reporter:
                mikael Mikael Vidstedt
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: