[PATCH] [8u] Prevent MSDOS8.3 named DLL in built image
Ali Ince
ali.ince at gmail.com
Fri Jun 21 15:52:30 UTC 2019
Hi Christoph,
First of all, sorry for being so late to get back on this. Actually, I
went on a larger fix as you suggested and came up with the patch below.
This is a best effort to disable all compiler warnings generated by
VS2017. I can see several smaller fixes in JBS that gets those warnings
cleaned and we should backport them later on after this change
(hopefully) gets applied.
A couple of notes I'd like to highlight are;
- Instead of SetupNativeCompilation's DISABLED_WARNINGS parameter we
have in later versions, I came up with adding warning flags to the
CFLAGS_windows parameter.
- In addition to disabling warnings generated by the compiler, I kept
the initial fix in and also enabled copying additional required MSVC
DLL's that needs to be copied into the JDK/bin folder during images phase.
- I'm not sure if it would be ok to remove the `CURRENTLY NOT WORKING`
text currently set in common/toolchain_windows.m4 since I don't know why
it's tagged as not working in the first place.
Please let me know if you'd want me to update any part of the fix.
Best regards.
Ali
diff -r f321c0bb9fb3 common/autoconf/toolchain_windows.m4
--- a/common/autoconf/toolchain_windows.m4 Fri Jun 14 13:46:37 2019 +0100
+++ b/common/autoconf/toolchain_windows.m4 Fri Jun 21 16:23:59 2019 +0100
@@ -493,7 +493,6 @@
if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 >
/dev/null; then
AC_MSG_RESULT([ok])
MSVC_DLL="$POSSIBLE_MSVC_DLL"
- BASIC_FIXUP_PATH(MSVC_DLL)
AC_MSG_CHECKING([for $DLL_NAME])
AC_MSG_RESULT([$MSVC_DLL])
else
diff -r e49125a0c77c make/windows/makefiles/compile.make
--- a/make/windows/makefiles/compile.make Wed Jun 19 09:42:12 2019 +0900
+++ b/make/windows/makefiles/compile.make Fri Jun 21 16:24:23 2019 +0100
@@ -159,6 +159,15 @@
!if "$(MSC_VER)" == "1913"
COMPILER_NAME=VS2017
!endif
+!if "$(MSC_VER)" == "1914"
+COMPILER_NAME=VS2017
+!endif
+!if "$(MSC_VER)" == "1915"
+COMPILER_NAME=VS2017
+!endif
+!if "$(MSC_VER)" == "1916"
+COMPILER_NAME=VS2017
+!endif
!endif
# By default, we do not want to use the debug version of the
msvcrt.dll file
diff -r e49125a0c77c make/windows/makefiles/sa.make
--- a/make/windows/makefiles/sa.make Wed Jun 19 09:42:12 2019 +0900
+++ b/make/windows/makefiles/sa.make Fri Jun 21 16:24:23 2019 +0100
@@ -111,22 +111,26 @@
!endif
!if "$(BUILDARCH)" == "ia64"
-SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -D "WIN32" -D
"WIN64" -D "_WINDOWS" -D "_CONSOLE" -D "_MBCS" -YX -FD -c
+SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -D "WIN32" -D
"WIN64" -D "_WINDOWS" -D "_CONSOLE" -D "_MBCS" -FD -c
!elseif "$(BUILDARCH)" == "amd64"
-SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -D "WIN32" -D
"WIN64" -D "_WINDOWS" -D "_CONSOLE" -D "_MBCS" -YX -FD -c
+SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -D "WIN32" -D
"WIN64" -D "_WINDOWS" -D "_CONSOLE" -D "_MBCS" -FD -c
!if "$(COMPILER_NAME)" == "VS2005"
# On amd64, VS2005 compiler requires bufferoverflowU.lib on the link
command line,
# otherwise we get missing __security_check_cookie externals at link
time.
SA_LD_FLAGS = bufferoverflowU.lib
!endif
!else
-SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 -Gm $(GX_OPTION) -D
"WIN32" -D "_WINDOWS" -D "_CONSOLE" -D "_MBCS" -YX -FD -c
+SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 -Gm $(GX_OPTION) -D
"WIN32" -D "_WINDOWS" -D "_CONSOLE" -D "_MBCS" -FD -c
!if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1"
# -ZI is incompatible with -O2 used for release/fastdebug builds.
# Using -Zi instead.
SA_CFLAGS = $(SA_CFLAGS) -Zi
!endif
!endif
+
+# Disable warnings for VS2017
+SA_CFLAGS = $(SA_CFLAGS) -D "_CRT_SECURE_NO_WARNINGS" -wd4244
+
!if "$(MT)" != ""
SA_LD_FLAGS = -manifest $(SA_LD_FLAGS)
!endif
diff -r e49125a0c77c make/windows/makefiles/sanity.make
--- a/make/windows/makefiles/sanity.make Wed Jun 19 09:42:12 2019 +0900
+++ b/make/windows/makefiles/sanity.make Fri Jun 21 16:24:23 2019 +0100
@@ -31,6 +31,10 @@
if "$(MSC_VER)" NEQ "1800" \
if "$(MSC_VER)" NEQ "1900" \
if "$(MSC_VER)" NEQ "1912" \
+ if "$(MSC_VER)" NEQ "1913" \
+ if "$(MSC_VER)" NEQ "1914" \
+ if "$(MSC_VER)" NEQ "1915" \
+ if "$(MSC_VER)" NEQ "1916" \
echo *** WARNING *** unrecognized cl.exe version $(MSC_VER)
($(RAW_MSC_VER)). Use FORCE_MSC_VER to override automatic detection.
checkLink:
@@ -39,4 +43,8 @@
if "$(LD_VER)" NEQ "1300" \
if "$(LD_VER)" NEQ "1400" \
if "$(LD_VER)" NEQ "1412" \
+ if "$(LD_VER)" NEQ "1413" \
+ if "$(LD_VER)" NEQ "1414" \
+ if "$(LD_VER)" NEQ "1415" \
+ if "$(LD_VER)" NEQ "1416" \
echo *** WARNING *** unrecognized link.exe version $(LD_VER)
($(RAW_LD_VER)). Use FORCE_LD_VER to override automatic detection.
diff -r e49125a0c77c src/share/vm/runtime/vm_version.cpp
--- a/src/share/vm/runtime/vm_version.cpp Wed Jun 19 09:42:12 2019 +0900
+++ b/src/share/vm/runtime/vm_version.cpp Fri Jun 21 16:24:23 2019 +0100
@@ -231,6 +231,12 @@
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.5 (VS2017)"
#elif _MSC_VER == 1913
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.6 (VS2017)"
+ #elif _MSC_VER == 1914
+ #define HOTSPOT_BUILD_COMPILER "MS VC++ 15.7 (VS2017)"
+ #elif _MSC_VER == 1915
+ #define HOTSPOT_BUILD_COMPILER "MS VC++ 15.8 (VS2017)"
+ #elif _MSC_VER == 1916
+ #define HOTSPOT_BUILD_COMPILER "MS VC++ 15.9 (VS2017)"
#else
#define HOTSPOT_BUILD_COMPILER "unknown MS VC++:" XSTR(_MSC_VER)
#endif
diff -r 6b678425fbbb make/CompileDemos.gmk
--- a/make/CompileDemos.gmk Mon Jun 17 17:19:58 2019 +0100
+++ b/make/CompileDemos.gmk Fri Jun 21 16:24:59 2019 +0100
@@ -251,6 +251,7 @@
LANG := $$(BUILD_DEMO_JVMTI_$1_LANG), \
OPTIMIZATION := LOW, \
CXXFLAGS := $$($1_CXXFLAGS), \
+ CXXFLAGS_windows := -wd4101 -wd4996, \
LDFLAGS := $(filter-out -incremental:no -opt:ref,
$$(LDFLAGS_JDKLIB)), \
LDFLAGS_macosx := $$(call SET_EXECUTABLE_ORIGIN), \
LDFLAGS_SUFFIX := $$($1_EXTRA_CXX), \
diff -r 6b678425fbbb make/CompileLaunchers.gmk
--- a/make/CompileLaunchers.gmk Mon Jun 17 17:19:58 2019 +0100
+++ b/make/CompileLaunchers.gmk Fri Jun 21 16:24:59 2019 +0100
@@ -487,6 +487,7 @@
CFLAGS_linux := -fPIC, \
CFLAGS_solaris := -KPIC, \
CFLAGS_macosx := -fPIC, \
+ CFLAGS_windows := -wd4005 -wd4018 -wd4267, \
MAPFILE := $(UNPACK_MAPFILE),\
LDFLAGS := $(UNPACKEXE_ZIPOBJS), \
LDFLAGS_windows := $(CXXFLAGS_JDKEXE), \
@@ -672,7 +673,8 @@
LANG := C++, \
CFLAGS := $(filter-out -Zc:wchar_t-, $(CFLAGS_JDKEXE))
-Zc:wchar_t \
-analyze- -Od -Gd -D_WINDOWS \
- -D_UNICODE -DUNICODE -RTC1 -EHsc, \
+ -D_UNICODE -DUNICODE -RTC1 -EHsc \
+ -wd4267 -wd4996, \
LDFLAGS := $(LDFLAGS_JDKEXE) \
Advapi32.lib Version.lib User32.lib, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jabswitch, \
diff -r 6b678425fbbb make/Images.gmk
--- a/make/Images.gmk Mon Jun 17 17:19:58 2019 +0100
+++ b/make/Images.gmk Fri Jun 21 16:24:59 2019 +0100
@@ -128,10 +128,22 @@
jhat$(EXE_SUFFIX)
endif
+# Build a list of platform DLL's to keep in the built image folder
+# Note that JDK image built on VS2010 requires only MSVCR_DLL to be
present, but this has
+# changed with later versions and we require more DLL's to be copied
over JDK image bin
+# folder
+ifeq ($(OPENJDK_TARGET_OS), windows)
+ KEEP_MSVC_DLLS = $(MSVCR_DLL) $(MSVCP_DLL)
+
+ ifneq ($(UCRT_DLL_DIR), )
+ KEEP_MSVC_DLLS += $(wildcard $(UCRT_DLL_DIR)/*.dll)
+ endif
+endif
+
WINDOWS_JDK_BIN_FILES = \
$(EXE_SUFFIX) \
$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
- $(notdir $(MSVCR_DLL))
+ $(notdir $(KEEP_MSVC_DLLS))
WINDOWS_JDKJRE_BIN_FILES := \
$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \
@@ -647,7 +659,7 @@
ifneq ($(POST_STRIP_CMD), )
ifeq ($(OPENJDK_TARGET_OS), windows)
- EXEC_LIST_BIN := $(filter-out %$(notdir $(MSVCR_DLL)), $(filter
%.exe %.dll, $(ALL_BIN_LIST)))
+ EXEC_LIST_BIN := $(filter-out %$(notdir $(KEEP_MSVC_DLLS)),
$(filter %.exe %.dll, $(ALL_BIN_LIST)))
else
# Find all executables in JDK_OUTPUTDIR since they exist when this
makefile is parsed
EXEC_LIST_BIN := $(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin
-type f -name \*$(EXE_SUFFIX) ! -name \*.debuginfo` \
diff -r 6b678425fbbb make/lib/Awt2dLibraries.gmk
--- a/make/lib/Awt2dLibraries.gmk Mon Jun 17 17:19:58 2019 +0100
+++ b/make/lib/Awt2dLibraries.gmk Fri Jun 21 16:24:59 2019 +0100
@@ -471,6 +471,7 @@
LANG := $(LIBAWT_LANG), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
+ CFLAGS_windows := -wd4244 -wd4267 -wd4297 -wd4302 -wd4311 -wd4312
-wd4996, \
ASFLAGS := $(LIBAWT_ASFLAGS), \
MAPFILE := $(LIBAWT_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -735,6 +736,7 @@
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBJPEG_CLOSED_INCLUDES) \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
+ CFLAGS_windows := -wd4267, \
MAPFILE := $(BUILD_LIBJPEG_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -911,7 +913,8 @@
CXXFLAGS := $(CXXFLAGS_JDKLIB)
$(BUILD_LIBFONTMANAGER_CFLAGS_COMMON), \
OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
CFLAGS_windows =
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/windows \
- -DCC_NOEX, \
+ -DCC_NOEX \
+ -wd4018 -wd4090 -wd4146 -wd4244 -wd4267 -wd4312 -wd4996, \
MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \
LDFLAGS := $(subst -Xlinker -z -Xlinker defs,, \
$(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB)))
$(LDFLAGS_CXX_JDK) \
@@ -1198,6 +1201,7 @@
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB)
$(GIFLIB_CFLAGS), \
+ CFLAGS_windows := -wd4018 -wd4244 -wd4267, \
MAPFILE :=
$(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
diff -r 6b678425fbbb make/lib/CoreLibraries.gmk
--- a/make/lib/CoreLibraries.gmk Mon Jun 17 17:19:58 2019 +0100
+++ b/make/lib/CoreLibraries.gmk Fri Jun 21 16:24:59 2019 +0100
@@ -59,6 +59,7 @@
OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include, \
+ CFLAGS_windows := -wd4018 -wd4146 -wd4244, \
CFLAGS_windows_debug := -DLOGGING, \
CFLAGS_aix := -qfloat=nomaf, \
CFLAGS_linux := $(LIBFDLIBM_CFLAGS), \
@@ -114,6 +115,7 @@
LANG := C, \
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB), \
+ CFLAGS_windows := -wd4244 -wd4267, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -216,6 +218,7 @@
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBJAVA_CFLAGS), \
+ CFLAGS_windows := -wd4005 -wd4013 -wd4028 -wd4101 -wd4102 -wd4267
-wd4311 -wd4312 -wd4996, \
MAPFILE := $(LIBJAVA_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -282,6 +285,7 @@
-I$(JDK_TOPDIR)/src/share/native/java/io \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io, \
CFLAGS_posix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
+ CFLAGS_windows := -wd4005 -wd4267, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
REORDER := $(BUILD_LIBZIP_REORDER), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
@@ -318,6 +322,7 @@
OPTIMIZATION := LOW, \
CFLAGS := $(CXXFLAGS_JDKLIB) \
-DNO_ZLIB -DUNPACK_JNI -DFULL, \
+ CFLAGS_windows := -wd4005 -wd4018 -wd4267, \
CFLAGS_release := -DPRODUCT, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
@@ -389,6 +394,9 @@
ifneq ($(MSVCP_DLL), )
LIBJLI_CFLAGS += -DMSVCP_DLL_NAME='"$(notdir $(MSVCP_DLL))"'
endif
+
+ # Add warning flags
+ LIBJLI_CFLAGS += -wd4101 -wd4244 -wd4047 -wd4267
else ifneq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBJLI_FILES += java_md_common.c
diff -r 6b678425fbbb make/lib/NetworkingLibraries.gmk
--- a/make/lib/NetworkingLibraries.gmk Mon Jun 17 17:19:58 2019 +0100
+++ b/make/lib/NetworkingLibraries.gmk Fri Jun 21 16:24:59 2019 +0100
@@ -67,6 +67,7 @@
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBNET_CFLAGS), \
+ CFLAGS_windows := -wd4005 -wd4013 -wd4047 -wd4090 -wd4101 -wd4133
-wd4244 -wd4715 -wd4996, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnet/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
diff -r 6b678425fbbb make/lib/NioLibraries.gmk
--- a/make/lib/NioLibraries.gmk Mon Jun 17 17:19:58 2019 +0100
+++ b/make/lib/NioLibraries.gmk Fri Jun 21 16:24:59 2019 +0100
@@ -139,6 +139,7 @@
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBNIO_CFLAGS), \
+ CFLAGS_windows := -wd4091 -wd4244 -wd4996, \
MAPFILE := $(BUILD_LIBNIO_MAPFILE), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(BUILD_LIBNIO_LDFLAGS) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
diff -r 6b678425fbbb make/lib/PlatformLibraries.gmk
--- a/make/lib/PlatformLibraries.gmk Mon Jun 17 17:19:58 2019 +0100
+++ b/make/lib/PlatformLibraries.gmk Fri Jun 21 16:24:59 2019 +0100
@@ -147,6 +147,7 @@
CFLAGS := $(CFLAGS_JDKLIB) \
-DACCESSBRIDGE_ARCH_$3 \
-I$(JDK_OUTPUTDIR)/gensrc_headers_ab/$3, \
+ CFLAGS_windows := -wd4302 -wd4311 -wd4312, \
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
winspool.lib jawt.lib comdlg32.lib advapi32.lib
shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
@@ -174,6 +175,7 @@
CFLAGS := $(CFLAGS_JDKLIB) \
-DACCESSBRIDGE_ARCH_$3 \
-I$(JDK_OUTPUTDIR)/gensrc_headers_ab/$3, \
+ CFLAGS_windows := -wd4302 -wd4311 -wd4312, \
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
@@ -199,6 +201,7 @@
CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT \
-DACCESSBRIDGE_ARCH_$3 \
-I$(JDK_OUTPUTDIR)/gensrc_headers_ab/$3, \
+ CFLAGS_windows := -wd4302 -wd4311 -wd4312, \
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
diff -r 6b678425fbbb make/lib/SecurityLibraries.gmk
--- a/make/lib/SecurityLibraries.gmk Mon Jun 17 17:19:58 2019 +0100
+++ b/make/lib/SecurityLibraries.gmk Fri Jun 21 16:24:59 2019 +0100
@@ -43,6 +43,7 @@
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB), \
+ CFLAGS_windows := -wd4313 -wd4477, \
MAPFILE := $(LIBJAAS_MAPFILE), \
LDFLAGS := $(filter-out -ljava, $(LDFLAGS_JDKLIB)) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -169,6 +170,7 @@
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi,
\
+ CFLAGS_windows := -wd4302 -wd4311, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := Crypt32.Lib advapi32.lib, \
@@ -199,6 +201,7 @@
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11
\
-I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11/wrapper,
\
+ CFLAGS_windows := -wd4013 -wd4267, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2pkcs11/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -242,6 +245,7 @@
CFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER),
$(CFLAGS_JDKLIB)) \
$(BUILD_LIBSUNEC_FLAGS) \
-DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
+ CFLAGS_windows := -wd4018 -wd4101 -wd4146 -wd4244 -wd4267, \
CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER),
$(CXXFLAGS_JDKLIB)) \
$(BUILD_LIBSUNEC_FLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \
diff -r 6b678425fbbb make/lib/ServiceabilityLibraries.gmk
--- a/make/lib/ServiceabilityLibraries.gmk Mon Jun 17 17:19:58 2019 +0100
+++ b/make/lib/ServiceabilityLibraries.gmk Fri Jun 21 16:24:59 2019 +0100
@@ -89,6 +89,7 @@
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket \
-I$(JDK_TOPDIR)/src/share/back/export \
-I$(JDK_TOPDIR)/src/share/back, \
+ CFLAGS_windows := -wd4996, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libdt_socket/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -124,6 +125,7 @@
-I$(JDK_TOPDIR)/src/share/transport/shmem \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem \
-I$(JDK_TOPDIR)/src/share/back/export, \
+ CFLAGS_windows := -wd4477 -wd4996, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LDFLAGS_windows := -export:jdwpTransport_OnLoad, \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
@@ -156,6 +158,7 @@
-I$(JDK_TOPDIR)/src/share/back \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back \
-I$(JDK_OUTPUTDIR)/gensrc_jdwp_headers, \
+ CFLAGS_windows := -wd4013 -wd4996, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjdwp/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -255,6 +258,7 @@
CFLAGS := $(LIBINSTRUMENT_CFLAGS), \
CFLAGS_debug := -DJPLIS_LOGGING, \
CFLAGS_release := -DNO_JPLIS_LOGGING, \
+ CFLAGS_windows := -wd4101 -wd4267 -wd4312, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libinstrument/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
@@ -378,6 +382,7 @@
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBHPROF_CFLAGS), \
CFLAGS_debug := -DHPROF_LOGGING, \
+ CFLAGS_windows := -wd4996, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libhprof/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
On 03/04/2019 07:58, Langer, Christoph wrote:
>
> Hi Ali,
>
> ok, in that case (working with --disable-warnings-as-errors) it might
> be worth a separate patch.
>
> Then please check whether it’s reasonable to backport a larger part of
> https://bugs.openjdk.java.net/browse/JDK-8201267. If so, please
> provide a webrev for it. Otherwise, let me know, too, and I can create
> a bug for just bringing in your original small fix and run it through
> the backport process.
>
> Best regards
>
> Christoph
>
> *From:*Ali Ince <ali.ince at gmail.com>
> *Sent:* Mittwoch, 3. April 2019 00:08
> *To:* Langer, Christoph <christoph.langer at sap.com>
> *Cc:* jdk8u-dev at openjdk.java.net
> *Subject:* Re: [PATCH] [8u] Prevent MSDOS8.3 named DLL in built image
>
> Hi Christoph,
>
> Thanks for your reply. I'm on Windows 10 but can also try a build on
> Windows 7 (which is AFAIK the oldest supported version by MSFT).
>
> I can build JDK8 with VS2017 for both 32-bit and 64-bit targets. My
> builds included the `--disable-warnings-as-errors` flag but it seems
> reasonable to try the build without this flag to see whether it will
> surface any errors. I'll give it a try and also make (well at least
> try) a comparison with the JDK11 changeset you've referenced.
>
> Best regards,
>
> Ali
>
> On Mon, Apr 1, 2019 at 7:06 AM Langer, Christoph
> <christoph.langer at sap.com <mailto:christoph.langer at sap.com>> wrote:
>
> Hi Ali,
>
> generally, I think this makes sense. Maybe, however, there are
> still some legacy compile environments around somewhere which will
> have a problem with that, e.g. very old Windows versions? It's
> hard to tell but it's probably reasonable to try out the fix.
>
> I found the change to be part of a VS2017 enabling fix for JDK11:
>
> https://bugs.openjdk.java.net/browse/JDK-8201267
> http://hg.openjdk.java.net/jdk/jdk/rev/7c224ec572d0
>
> So I have a general question: Shouldn't this fix be part of a
> larger change that would enable VS2017 for JDK8? I assume it won't
> be the only thing to touch...
>
> Best regards
> Christoph
>
>
>
> > -----Original Message-----
> > From: jdk8u-dev <jdk8u-dev-bounces at openjdk.java.net
> <mailto:jdk8u-dev-bounces at openjdk.java.net>> On Behalf Of Ali
> > Ince
> > Sent: Donnerstag, 28. März 2019 20:48
> > To: jdk8u-dev at openjdk.java.net <mailto:jdk8u-dev at openjdk.java.net>
> > Subject: [PATCH] [8u] Prevent MSDOS8.3 named DLL in built image
> >
> > Hi All,
> >
> > We're working on building JDK8U with VS2017 at AdoptOpenJDK and
> found
> > out that the new vcruntime140.dll is copied to the built image
> named as
> > `vcrunt~1.dll` which is basically because of the extra call to
> > `BASIC_FIXUP_PATH` call in `toolchain_windows.m4` file. If the
> call is
> > removed, everything works fine.
> >
> > On previous versions of VS, the VC runtime DLL was originally
> named in 8.3
> > style (ex. msvcr100.dll) and BASIC_FIXUP_PATH did not have any
> affect on
> > the file name itself. I've checked with `toolchain_windows.m4`
> files in jdk11u
> > and onwards and also saw that this call doesn't exist.
> >
> > I've came up with the following patch which removes this call.
> I'm not sure
> > what's the process about updating the checked-in
> generated_configure.sh
> > but I could also add the patch for that if it's required.
> >
> > Let me know if you have any feedback or comments.
> >
> > Regards,
> >
> > Ali
> >
> > ---------------------------------------------
> >
> > diff -r e0b7721459ee common/autoconf/toolchain_windows.m4
> > --- a/common/autoconf/toolchain_windows.m4 Wed Mar 20
> 16:32:54 2019
> > +0000
> > +++ b/common/autoconf/toolchain_windows.m4 Thu Mar 28
> 00:03:10 2019
> > +0000
> > @@ -493,7 +493,6 @@
> > if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH"
> > 2>&1 > /dev/null; then
> > AC_MSG_RESULT([ok])
> > MSVC_DLL="$POSSIBLE_MSVC_DLL"
> > - BASIC_FIXUP_PATH(MSVC_DLL)
> > AC_MSG_CHECKING([for $DLL_NAME])
> > AC_MSG_RESULT([$MSVC_DLL])
> > else
> >
>
More information about the jdk8u-dev
mailing list