8175819: OS name and arch in JMOD files should match the values as in the bundle names

Reviewed-by: erikj, ihse
This commit is contained in:
Mandy Chung 2017-04-20 08:00:18 -07:00
parent e8d9a616be
commit c41d918474
5 changed files with 31 additions and 64 deletions

View File

@ -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
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
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
OPENJDK_MODULE_TARGET_OS_NAME="macos"
else
REQUIRED_OS_VERSION=5.1
OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
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

View File

@ -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
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
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
OPENJDK_MODULE_TARGET_OS_NAME="macos"
else
REQUIRED_OS_VERSION=5.1
OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
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
])

View File

@ -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@

View File

@ -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 $@)

View File

@ -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) \