From c41d9184741d39c7351ca4d7f7e341539653e55d Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Thu, 20 Apr 2017 08:00:18 -0700 Subject: [PATCH] 8175819: OS name and arch in JMOD files should match the values as in the bundle names Reviewed-by: erikj, ihse --- common/autoconf/generated-configure.sh | 40 +++++++----------------- common/autoconf/platform.m4 | 43 +++++++++----------------- common/autoconf/spec.gmk.in | 7 ++--- make/CreateJmods.gmk | 4 +-- make/Images.gmk | 1 - 5 files changed, 31 insertions(+), 64 deletions(-) diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index e81d07ed6e0..0baf46fcdbe 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -995,9 +995,8 @@ OPENJDK_TARGET_CPU_OSARCH 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 @@ VS_SDK_PLATFORM_NAME_2013= #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_n "checking compilation type... " >&6; } $as_echo "$COMPILE_TYPE" >&6; } - 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 - 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_CPU" = xx86_64; then + OPENJDK_MODULE_TARGET_OS_ARCH="amd64" + else + OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU" + fi diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4 index 80d1656609b..c9c339decb3 100644 --- a/common/autoconf/platform.m4 +++ b/common/autoconf/platform.m4 @@ -433,37 +433,22 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER], ]) -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 - 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) + 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 + + AC_SUBST(OPENJDK_MODULE_TARGET_OS_NAME) + AC_SUBST(OPENJDK_MODULE_TARGET_OS_ARCH) ]) #%%% Build and target systems %%% @@ -480,7 +465,7 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET], 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 ]) diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in index 6d7a9721239..08a38c6bc15 100644 --- a/common/autoconf/spec.gmk.in +++ b/common/autoconf/spec.gmk.in @@ -101,10 +101,9 @@ OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@ 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@ diff --git a/make/CreateJmods.gmk b/make/CreateJmods.gmk index d0dc9fcfe23..65b9bf52343 100644 --- a/make/CreateJmods.gmk +++ b/make/CreateJmods.gmk @@ -135,8 +135,8 @@ $(JMODS_DIR)/$(MODULE).jmod: $(DEPS) $(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 $@) diff --git a/make/Images.gmk b/make/Images.gmk index ac671e80fd4..c8567bd0ee2 100644 --- a/make/Images.gmk +++ b/make/Images.gmk @@ -119,7 +119,6 @@ JLINK_TOOL := $(JLINK) -J-Djlink.debug=true \ --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) \