changeset 2576:d0e9877fff61

8175819: OS name and arch in JMOD files should match the values as in the bundle names Reviewed-by: erikj, ihse
author mchung
date Thu, 20 Apr 2017 08:00:18 -0700
parents cfdfc9d56584
children a01845fd5cfb
files common/autoconf/generated-configure.sh common/autoconf/platform.m4 common/autoconf/spec.gmk.in make/CreateJmods.gmk make/Images.gmk
diffstat 5 files changed, 32 insertions(+), 65 deletions(-) [+]
line wrap: on
line diff
--- a/common/autoconf/generated-configure.sh	Wed Apr 19 13:37:34 2017 +0200
+++ b/common/autoconf/generated-configure.sh	Thu Apr 20 08:00:18 2017 -0700
@@ -995,9 +995,8 @@
 OPENJDK_TARGET_CPU_ISADIR
 OPENJDK_TARGET_CPU_LEGACY_LIB
 OPENJDK_TARGET_CPU_LEGACY
-REQUIRED_OS_VERSION
-REQUIRED_OS_ARCH
-REQUIRED_OS_NAME
+OPENJDK_MODULE_TARGET_OS_ARCH
+OPENJDK_MODULE_TARGET_OS_NAME
 COMPILE_TYPE
 OPENJDK_TARGET_CPU_ENDIAN
 OPENJDK_TARGET_CPU_BITS
@@ -5180,7 +5179,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1492592126
+DATE_WHEN_GENERATED=1492700323
 
 ###############################################################################
 #
@@ -16028,32 +16027,17 @@
 $as_echo "$COMPILE_TYPE" >&6; }
 
 
-  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
-    REQUIRED_OS_NAME=SunOS
-    REQUIRED_OS_VERSION=5.10
-  fi
-  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
-    REQUIRED_OS_NAME=Linux
-    REQUIRED_OS_VERSION=2.6
-  fi
-  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-    REQUIRED_OS_NAME=Windows
-    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
-      REQUIRED_OS_VERSION=5.2
-    else
-      REQUIRED_OS_VERSION=5.1
-    fi
-  fi
-  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
-    REQUIRED_OS_NAME="Mac OS X"
-    REQUIRED_OS_VERSION=11.2
-  fi
-  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
-    REQUIRED_OS_NAME=AIX
-    REQUIRED_OS_VERSION=7.1
-  fi
-  REQUIRED_OS_ARCH=${OPENJDK_TARGET_CPU}
-
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    OPENJDK_MODULE_TARGET_OS_NAME="macos"
+  else
+    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
+  fi
+
+  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
+  else
+    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
+  fi
 
 
 
--- a/common/autoconf/platform.m4	Wed Apr 19 13:37:34 2017 +0200
+++ b/common/autoconf/platform.m4	Thu Apr 20 08:00:18 2017 -0700
@@ -433,37 +433,22 @@
 
 ])
 
-AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
+AC_DEFUN([PLATFORM_SET_MODULE_TARGET_OS_VALUES],
 [
-  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
-    REQUIRED_OS_NAME=SunOS
-    REQUIRED_OS_VERSION=5.10
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    OPENJDK_MODULE_TARGET_OS_NAME="macos"
+  else
+    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
   fi
-  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
-    REQUIRED_OS_NAME=Linux
-    REQUIRED_OS_VERSION=2.6
+
+  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
+  else
+    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
   fi
-  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
-    REQUIRED_OS_NAME=Windows
-    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
-      REQUIRED_OS_VERSION=5.2
-    else
-      REQUIRED_OS_VERSION=5.1
-    fi
-  fi
-  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
-    REQUIRED_OS_NAME="Mac OS X"
-    REQUIRED_OS_VERSION=11.2
-  fi
-  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
-    REQUIRED_OS_NAME=AIX
-    REQUIRED_OS_VERSION=7.1
-  fi
-  REQUIRED_OS_ARCH=${OPENJDK_TARGET_CPU}
 
-  AC_SUBST(REQUIRED_OS_NAME)
-  AC_SUBST(REQUIRED_OS_ARCH)
-  AC_SUBST(REQUIRED_OS_VERSION)
+  AC_SUBST(OPENJDK_MODULE_TARGET_OS_NAME)
+  AC_SUBST(OPENJDK_MODULE_TARGET_OS_ARCH)
 ])
 
 #%%% Build and target systems %%%
@@ -480,7 +465,7 @@
 
   PLATFORM_EXTRACT_TARGET_AND_BUILD
   PLATFORM_SETUP_TARGET_CPU_BITS
-  PLATFORM_SET_RELEASE_FILE_OS_VALUES
+  PLATFORM_SET_MODULE_TARGET_OS_VALUES
   PLATFORM_SETUP_LEGACY_VARS
 ])
 
--- a/common/autoconf/spec.gmk.in	Wed Apr 19 13:37:34 2017 +0200
+++ b/common/autoconf/spec.gmk.in	Thu Apr 20 08:00:18 2017 -0700
@@ -101,10 +101,9 @@
 OPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
 OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
 
-# OS values for use in release file.
-REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@
-REQUIRED_OS_ARCH:=@REQUIRED_OS_ARCH@
-REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@
+# OS values for use in ModuleTarget class file attribute.
+OPENJDK_MODULE_TARGET_OS_NAME:=@OPENJDK_MODULE_TARGET_OS_NAME@
+OPENJDK_MODULE_TARGET_OS_ARCH:=@OPENJDK_MODULE_TARGET_OS_ARCH@
 
 LIBM:=@LIBM@
 LIBDL:=@LIBDL@
--- a/make/CreateJmods.gmk	Wed Apr 19 13:37:34 2017 +0200
+++ b/make/CreateJmods.gmk	Thu Apr 20 08:00:18 2017 -0700
@@ -135,8 +135,8 @@
 	$(RM) $@ $(JMODS_TEMPDIR)/$(notdir $@)
 	$(JMOD) create \
             --module-version $(VERSION_SHORT) \
-            --os-name '$(REQUIRED_OS_NAME)' \
-            --os-arch '$(REQUIRED_OS_ARCH)' \
+            --os-name '$(OPENJDK_MODULE_TARGET_OS_NAME)' \
+            --os-arch '$(OPENJDK_MODULE_TARGET_OS_ARCH)' \
             --module-path $(JMODS_DIR) \
 	    --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}' \
 	    $(JMOD_FLAGS) $(JMODS_TEMPDIR)/$(notdir $@)
--- a/make/Images.gmk	Wed Apr 19 13:37:34 2017 +0200
+++ b/make/Images.gmk	Thu Apr 20 08:00:18 2017 -0700
@@ -119,7 +119,6 @@
     --module-path $(IMAGES_OUTPUTDIR)/jmods \
     --endian $(OPENJDK_BUILD_CPU_ENDIAN) \
     --release-info $(BASE_RELEASE_FILE) \
-    --release-info add:OS_VERSION=\"$(REQUIRED_OS_VERSION)\" \
     --order-resources=$(call CommaList, $(JLINK_ORDER_RESOURCES)) \
     --dedup-legal-notices=error-if-not-same-content \
     $(JLINK_JLI_CLASSES) \