6950375: Remove msvcrt.dll from the Windows JRE bundles
Reviewed-by: prr
This commit is contained in:
parent
426009abd5
commit
d7cd379d57
jdk
@ -100,7 +100,6 @@ CACERTS_FILE.desc = Location of certificates file
|
|||||||
DEVTOOLS_PATH.desc = Directory containing zip and unzip
|
DEVTOOLS_PATH.desc = Directory containing zip and unzip
|
||||||
CUPS_HEADERS_PATH.desc = Include directory location for CUPS header files
|
CUPS_HEADERS_PATH.desc = Include directory location for CUPS header files
|
||||||
DXSDK_PATH.desc = Root directory of DirectX SDK
|
DXSDK_PATH.desc = Root directory of DirectX SDK
|
||||||
MSVCRT_DLL_PATH.desc = Directory containing mscvrt.dll
|
|
||||||
|
|
||||||
# Make variables to print out (description and value)
|
# Make variables to print out (description and value)
|
||||||
VARIABLE_PRINTVAL_LIST += \
|
VARIABLE_PRINTVAL_LIST += \
|
||||||
@ -133,12 +132,10 @@ VARIABLE_CHECKFIL_LIST += \
|
|||||||
ifeq ($(PLATFORM), windows)
|
ifeq ($(PLATFORM), windows)
|
||||||
|
|
||||||
VARIABLE_PRINTVAL_LIST += \
|
VARIABLE_PRINTVAL_LIST += \
|
||||||
DXSDK_PATH \
|
DXSDK_PATH
|
||||||
MSVCRT_DLL_PATH
|
|
||||||
|
|
||||||
VARIABLE_CHECKDIR_LIST += \
|
VARIABLE_CHECKDIR_LIST += \
|
||||||
DXSDK_PATH \
|
DXSDK_PATH
|
||||||
MSVCRT_DLL_PATH
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -68,28 +68,27 @@ PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
|
|||||||
|
|
||||||
# The following DLL's are considered MS runtime libraries and should
|
# The following DLL's are considered MS runtime libraries and should
|
||||||
# not to be REBASEd, see deploy/make/common/Release.gmk.
|
# not to be REBASEd, see deploy/make/common/Release.gmk.
|
||||||
# msvcrt.dll, msvcrnn.dll [msvcr71 or msvcr80 or msvcr90] : Microsoft runtimes
|
# msvcr*.dll: Microsoft runtimes
|
||||||
MS_RUNTIME_LIBRARIES = msvcrt.dll
|
|
||||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||||
ifeq ($(COMPILER_VERSION), VS2003)
|
ifeq ($(COMPILER_VERSION), VS2003)
|
||||||
MSVCRNN_DLL = msvcr71.dll
|
MSVCRNN_DLL = msvcr71.dll
|
||||||
MSVCPNN_DLL = msvcp71.dll
|
MSVCPNN_DLL = msvcp71.dll
|
||||||
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
|
MS_RUNTIME_LIBRARIES = msvcrt.dll $(MSVCRNN_DLL)
|
||||||
endif
|
endif
|
||||||
ifeq ($(COMPILER_VERSION), VS2005)
|
ifeq ($(COMPILER_VERSION), VS2005)
|
||||||
MSVCRNN_DLL = msvcr80.dll
|
MSVCRNN_DLL = msvcr80.dll
|
||||||
MSVCPNN_DLL = msvcp80.dll
|
MSVCPNN_DLL = msvcp80.dll
|
||||||
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
|
MS_RUNTIME_LIBRARIES = msvcrt.dll $(MSVCRNN_DLL)
|
||||||
endif
|
endif
|
||||||
ifeq ($(COMPILER_VERSION), VS2008)
|
ifeq ($(COMPILER_VERSION), VS2008)
|
||||||
MSVCRNN_DLL = msvcr90.dll
|
MSVCRNN_DLL = msvcr90.dll
|
||||||
MSVCPNN_DLL = msvcp90.dll
|
MSVCPNN_DLL = msvcp90.dll
|
||||||
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
|
MS_RUNTIME_LIBRARIES = msvcrt.dll $(MSVCRNN_DLL)
|
||||||
endif
|
endif
|
||||||
ifeq ($(COMPILER_VERSION), VS2010)
|
ifeq ($(COMPILER_VERSION), VS2010)
|
||||||
MSVCRNN_DLL = msvcr100.dll
|
MSVCRNN_DLL = msvcr100.dll
|
||||||
MSVCPNN_DLL = msvcp100.dll
|
MSVCPNN_DLL = msvcp100.dll
|
||||||
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
|
MS_RUNTIME_LIBRARIES = $(MSVCRNN_DLL)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -97,12 +96,12 @@ ifeq ($(ARCH_DATA_MODEL), 64)
|
|||||||
ifeq ($(COMPILER_VERSION), VS2008)
|
ifeq ($(COMPILER_VERSION), VS2008)
|
||||||
MSVCRNN_DLL = msvcr90.dll
|
MSVCRNN_DLL = msvcr90.dll
|
||||||
MSVCPNN_DLL = msvcp90.dll
|
MSVCPNN_DLL = msvcp90.dll
|
||||||
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
|
MS_RUNTIME_LIBRARIES = msvcrt.dll $(MSVCRNN_DLL)
|
||||||
endif
|
endif
|
||||||
ifeq ($(COMPILER_VERSION), VS2010)
|
ifeq ($(COMPILER_VERSION), VS2010)
|
||||||
MSVCRNN_DLL = msvcr100.dll
|
MSVCRNN_DLL = msvcr100.dll
|
||||||
MSVCPNN_DLL = msvcp100.dll
|
MSVCPNN_DLL = msvcp100.dll
|
||||||
MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL)
|
MS_RUNTIME_LIBRARIES = $(MSVCRNN_DLL)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -284,7 +283,7 @@ ifeq ($(MFC_DEBUG), true)
|
|||||||
MS_RUNTIME_OPTION=-MTd
|
MS_RUNTIME_OPTION=-MTd
|
||||||
else
|
else
|
||||||
# This MS debugging flag forces a dependence on the debug
|
# This MS debugging flag forces a dependence on the debug
|
||||||
# version of the runtime library (MSVCRTD.DLL), as does -MDd.
|
# version of the runtime library (MSVCR*D.DLL), as does -MDd.
|
||||||
# We cannot re-distribute this debug runtime.
|
# We cannot re-distribute this debug runtime.
|
||||||
MS_RUNTIME_OPTION=-MDd
|
MS_RUNTIME_OPTION=-MDd
|
||||||
endif
|
endif
|
||||||
|
@ -551,18 +551,6 @@ ifndef ALT_BOOTDIR
|
|||||||
_BOOTDIR3 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
|
_BOOTDIR3 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# 32 bit always needs 2 runtimes, 64 bit usually does too
|
|
||||||
|
|
||||||
# MSVCRT_DLL_PATH: location of msvcrt.dll that will be re-distributed
|
|
||||||
ifdef ALT_MSVCRT_DLL_PATH
|
|
||||||
xALT_MSVCRT_DLL_PATH :="$(subst \,/,$(ALT_MSVCRT_DLL_PATH))"
|
|
||||||
MSVCRT_DLL_PATH :=$(call FullPath,$(xALT_MSVCRT_DLL_PATH))
|
|
||||||
else
|
|
||||||
MSVCRT_DLL_PATH :=$(call FullPath,$(_system_root)/system32/)
|
|
||||||
endif
|
|
||||||
MSVCRT_DLL_PATH:=$(call AltCheckSpaces,MSVCRT_DLL_PATH)
|
|
||||||
MSVCRT_DLL_PATH:=$(call AltCheckValue,MSVCRT_DLL_PATH)
|
|
||||||
|
|
||||||
# 32bit always needs the MSVCRNN runtime, 64bit does when using VS2008
|
# 32bit always needs the MSVCRNN runtime, 64bit does when using VS2008
|
||||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||||
_NEEDS_MSVCRNN = true
|
_NEEDS_MSVCRNN = true
|
||||||
|
@ -96,7 +96,6 @@ ifeq ($(PLATFORM),solaris)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),windows)
|
ifeq ($(PLATFORM),windows)
|
||||||
ALL_SETTINGS+=$(call addAltSetting,MSVCRT_DLL_PATH)
|
|
||||||
ifneq ($(MSVCRNN_DLL),)
|
ifneq ($(MSVCRNN_DLL),)
|
||||||
ALL_SETTINGS+=$(call addAltSetting,MSVCRNN_DLL_PATH)
|
ALL_SETTINGS+=$(call addAltSetting,MSVCRNN_DLL_PATH)
|
||||||
endif
|
endif
|
||||||
|
@ -879,13 +879,6 @@ sane-devtools_path:
|
|||||||
######################################################
|
######################################################
|
||||||
sane-msvcrt_path:
|
sane-msvcrt_path:
|
||||||
ifeq ($(PLATFORM), windows)
|
ifeq ($(PLATFORM), windows)
|
||||||
@if [ ! -r "$(MSVCRT_DLL_PATH)/msvcrt.dll" ]; then \
|
|
||||||
$(ECHO) "ERROR: You do not have access to msvcrt.dll. \n" \
|
|
||||||
" Please check your access to \n" \
|
|
||||||
" $(MSVCRT_DLL_PATH) \n" \
|
|
||||||
" and/or check your value of ALT_MSVCRT_DLL_PATH. \n" \
|
|
||||||
"" >> $(ERROR_FILE) ; \
|
|
||||||
fi
|
|
||||||
ifneq ($(MSVCRNN_DLL),)
|
ifneq ($(MSVCRNN_DLL),)
|
||||||
@if [ ! -r "$(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)" ]; then \
|
@if [ ! -r "$(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)" ]; then \
|
||||||
$(ECHO) "ERROR: You do not have access to $(MSVCRNN_DLL). \n" \
|
$(ECHO) "ERROR: You do not have access to $(MSVCRNN_DLL). \n" \
|
||||||
|
@ -93,10 +93,6 @@ ifeq ($(PLATFORM), windows)
|
|||||||
|
|
||||||
IMPORT_LIST += $(MS_RUNTIME_LIBRARIES:%=$(BINDIR)/%)
|
IMPORT_LIST += $(MS_RUNTIME_LIBRARIES:%=$(BINDIR)/%)
|
||||||
|
|
||||||
# NOTE: These might actually come from BUILDDIR, depends on the settings.
|
|
||||||
$(BINDIR)/msvcrt.dll: $(MSVCRT_DLL_PATH)/msvcrt.dll
|
|
||||||
$(install-import-file)
|
|
||||||
$(call chmod-file, a+x)
|
|
||||||
$(BINDIR)/$(MSVCRNN_DLL): $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)
|
$(BINDIR)/$(MSVCRNN_DLL): $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)
|
||||||
$(install-import-file)
|
$(install-import-file)
|
||||||
$(call chmod-file, a+x)
|
$(call chmod-file, a+x)
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
#
|
#
|
||||||
# Assumes basic unix utilities are in the PATH already (uname, hostname, etc.).
|
# Assumes basic unix utilities are in the PATH already (uname, hostname, etc.).
|
||||||
#
|
#
|
||||||
# On Windows, assumes PROCESSOR_IDENTIFIER, VS71COMNTOOLS,
|
# On Windows, assumes PROCESSOR_IDENTIFIER, VS100COMNTOOLS,
|
||||||
# SYSTEMROOT (or SystemRoot), COMPUTERNAME (or hostname works), and
|
# SYSTEMROOT (or SystemRoot), COMPUTERNAME (or hostname works), and
|
||||||
# USERNAME is defined in the environment.
|
# USERNAME is defined in the environment.
|
||||||
# This profile does not rely on using vcvars32.bat and 64bit Setup.bat.
|
# This profile does not rely on using vcvars32.bat and 64bit Setup.bat.
|
||||||
@ -81,8 +81,7 @@
|
|||||||
# Windows Only:
|
# Windows Only:
|
||||||
# ALT_UNIXCOMMAND_PATH
|
# ALT_UNIXCOMMAND_PATH
|
||||||
# ALT_DXSDK_PATH
|
# ALT_DXSDK_PATH
|
||||||
# ALT_MSVCRT_DLL_PATH
|
# ALT_MSVCRNN_DLL_PATH
|
||||||
# ALT_MSVCR71_DLL_PATH
|
|
||||||
#
|
#
|
||||||
#############################################################################
|
#############################################################################
|
||||||
#
|
#
|
||||||
@ -213,77 +212,16 @@ else
|
|||||||
# Compiler setup (nasty part)
|
# Compiler setup (nasty part)
|
||||||
# NOTE: You can use vcvars32.bat to set PATH, LIB, and INCLUDE.
|
# NOTE: You can use vcvars32.bat to set PATH, LIB, and INCLUDE.
|
||||||
# NOTE: CYGWIN has a link.exe too, make sure the compilers are first
|
# NOTE: CYGWIN has a link.exe too, make sure the compilers are first
|
||||||
if [ "${windows_arch}" = i586 ] ; then
|
|
||||||
# 32bit Windows compiler settings
|
|
||||||
# VisualStudio .NET 2003 VC++ 7.1 (VS71COMNTOOLS should be defined)
|
|
||||||
vs_root=$(${cygpath} "${VS71COMNTOOLS}/../..")
|
|
||||||
# Fill in PATH, LIB, and INCLUDE (unset all others to make sure)
|
|
||||||
vc7_root="${vs_root}/Vc7"
|
|
||||||
compiler_path="${vc7_root}/bin"
|
|
||||||
platform_sdk="${vc7_root}/PlatformSDK"
|
|
||||||
|
|
||||||
# LIB and INCLUDE must use ; as a separator
|
# Use supplied vsvars.sh
|
||||||
include4sdk="${vc7_root}/atlmfc/include"
|
repo=`hg root`
|
||||||
include4sdk="${include4sdk};${vc7_root}/include"
|
if [ -f "${repo}/make/scripts/vsvars.sh" ] ; then
|
||||||
include4sdk="${include4sdk};${platform_sdk}/include/prerelease"
|
eval `sh ${repo}/make/scripts/vsvars.sh -v10`
|
||||||
include4sdk="${include4sdk};${platform_sdk}/include"
|
elif [ -f "${repo}/../make/scripts/vsvars.sh" ] ; then
|
||||||
include4sdk="${include4sdk};${vs_root}/SDK/v1.1/include"
|
eval `sh ${repo}/../make/scripts/vsvars.sh -v10`
|
||||||
lib4sdk="${lib4sdk};${vc7_root}/lib"
|
|
||||||
lib4sdk="${lib4sdk};${platform_sdk}/lib/prerelease"
|
|
||||||
lib4sdk="${lib4sdk};${platform_sdk}/lib"
|
|
||||||
lib4sdk="${lib4sdk};${vs_root}/SDK/v1.1/lib"
|
|
||||||
# Search path and DLL locating path
|
|
||||||
# WARNING: CYGWIN has a link.exe too, make sure compilers are first
|
|
||||||
path4sdk="${vs_root}/Common7/Tools/bin;${path4sdk}"
|
|
||||||
path4sdk="${vs_root}/SDK/v1.1/bin;${path4sdk}"
|
|
||||||
path4sdk="${vs_root}/Common7/Tools;${path4sdk}"
|
|
||||||
path4sdk="${vs_root}/Common7/Tools/bin/prerelease;${path4sdk}"
|
|
||||||
path4sdk="${vs_root}/Common7/IDE;${path4sdk}"
|
|
||||||
path4sdk="${compiler_path};${path4sdk}"
|
|
||||||
elif [ "${windows_arch}" = amd64 ] ; then
|
|
||||||
# AMD64 64bit Windows compiler settings
|
|
||||||
if [ "${ALT_DEPLOY_MSSDK}" != "" ] ; then
|
|
||||||
platform_sdk=${ALT_DEPLOY_MSSDK}
|
|
||||||
else
|
else
|
||||||
platform_sdk=$(${cygpath} "C:/Program Files/Microsoft Platform SDK/")
|
echo "WARNING: No make/scripts/vsvars.sh file found"
|
||||||
fi
|
fi
|
||||||
if [ "${ALT_COMPILER_PATH}" != "" ] ; then
|
|
||||||
compiler_path=${ALT_COMPILER_PATH}
|
|
||||||
if [ "${ALT_DEPLOY_MSSDK}" = "" ] ; then
|
|
||||||
platform_sdk=${ALT_COMPILER_PATH}/../../../..
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
compiler_path="${platform_sdk}/Bin/win64/x86/AMD64"
|
|
||||||
fi
|
|
||||||
# LIB and INCLUDE must use ; as a separator
|
|
||||||
include4sdk="${platform_sdk}/Include"
|
|
||||||
include4sdk="${include4sdk};${platform_sdk}/Include/crt/sys"
|
|
||||||
include4sdk="${include4sdk};${platform_sdk}/Include/mfc"
|
|
||||||
include4sdk="${include4sdk};${platform_sdk}/Include/atl"
|
|
||||||
include4sdk="${include4sdk};${platform_sdk}/Include/crt"
|
|
||||||
lib4sdk="${platform_sdk}/Lib/AMD64"
|
|
||||||
lib4sdk="${lib4sdk};${platform_sdk}/Lib/AMD64/atlmfc"
|
|
||||||
# Search path and DLL locating path
|
|
||||||
# WARNING: CYGWIN has a link.exe too, make sure compilers are first
|
|
||||||
path4sdk="${platform_sdk}/bin;${path4sdk}"
|
|
||||||
path4sdk="${compiler_path};${path4sdk}"
|
|
||||||
fi
|
|
||||||
# Export LIB and INCLUDE
|
|
||||||
unset lib
|
|
||||||
unset Lib
|
|
||||||
LIB="${lib4sdk}"
|
|
||||||
export LIB
|
|
||||||
unset include
|
|
||||||
unset Include
|
|
||||||
INCLUDE="${include4sdk}"
|
|
||||||
export INCLUDE
|
|
||||||
|
|
||||||
# Turn all \\ into /, remove duplicates and trailing /
|
|
||||||
slash_path="$(echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g')"
|
|
||||||
path4sdk="${slash_path}"
|
|
||||||
|
|
||||||
# Convert path4sdk to cygwin style
|
|
||||||
path4sdk="$(/usr/bin/cygpath -p ${path4sdk})"
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -389,10 +389,9 @@ Library: Use <code>/opt:REF </code> when building the dll.
|
|||||||
<li>
|
<li>
|
||||||
MS DLL Runtime: Use the <code>/MD /D _STATIC_CPPLIB</code> option.
|
MS DLL Runtime: Use the <code>/MD /D _STATIC_CPPLIB</code> option.
|
||||||
<br>
|
<br>
|
||||||
This causes your dll to become dependent on MSVCRT.DLL and/or
|
This causes your dll to become dependent on just MSVCR*.DLL.
|
||||||
the newer C++ runtime MSVCR71.DLL.
|
|
||||||
The option /D _STATIC_CPPLIB prevents you from becoming dependent on the
|
The option /D _STATIC_CPPLIB prevents you from becoming dependent on the
|
||||||
C++ library MSVCP71.DLL.
|
C++ library MSVCP*.DLL.
|
||||||
This is what we use in the JDK, but there are probably many combinations
|
This is what we use in the JDK, but there are probably many combinations
|
||||||
that you could safely use, unfortunately there are many combinations
|
that you could safely use, unfortunately there are many combinations
|
||||||
of runtimes that will not work.
|
of runtimes that will not work.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user