From 896453edf2637a472b8e2cf573bca60d91ff5d81 Mon Sep 17 00:00:00 2001 From: Erik Joelsson Date: Mon, 14 Mar 2016 12:00:24 +0100 Subject: [PATCH] 8151619: genSocketOptionRegistry.exe always relinked on Windows Reviewed-by: tbell --- common/autoconf/flags.m4 | 8 ++++---- common/autoconf/generated-configure.sh | 10 +++++----- make/common/NativeCompilation.gmk | 9 ++++++--- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/common/autoconf/flags.m4 b/common/autoconf/flags.m4 index 6b08cbb0a4f..76b6a39f881 100644 --- a/common/autoconf/flags.m4 +++ b/common/autoconf/flags.m4 @@ -427,6 +427,9 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION], elif test "x$TOOLCHAIN_TYPE" = xxlc; then CFLAGS_DEBUG_SYMBOLS="-g" CXXFLAGS_DEBUG_SYMBOLS="-g" + elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + CFLAGS_DEBUG_SYMBOLS="-Zi" + CXXFLAGS_DEBUG_SYMBOLS="-Zi" fi AC_SUBST(CFLAGS_DEBUG_SYMBOLS) AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS) @@ -654,7 +657,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK], CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC" elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \ - -Zi -MD -Zc:wchar_t- -W3 -wd4800 \ + -MD -Zc:wchar_t- -W3 -wd4800 \ -DWIN32_LEAN_AND_MEAN \ -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \ -D_WINSOCK_DEPRECATED_NO_WARNINGS \ @@ -801,9 +804,6 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK], LDFLAGS_SAFESH="-safeseh" LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH" fi - # TODO: make -debug optional "--disable-full-debug-symbols" - LDFLAGS_MICROSOFT_DEBUG="-debug" - LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT_DEBUG" elif test "x$TOOLCHAIN_TYPE" = xgcc; then # If this is a --hash-style=gnu system, use --hash-style=both, why? # We have previously set HAS_GNU_HASH if this is the case diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index 58beee04e52..b7ae33fa980 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -4862,7 +4862,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=1457684806 +DATE_WHEN_GENERATED=1457953189 ############################################################################### # @@ -46304,6 +46304,9 @@ $as_echo "$ac_cv_c_bigendian" >&6; } elif test "x$TOOLCHAIN_TYPE" = xxlc; then CFLAGS_DEBUG_SYMBOLS="-g" CXXFLAGS_DEBUG_SYMBOLS="-g" + elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + CFLAGS_DEBUG_SYMBOLS="-Zi" + CXXFLAGS_DEBUG_SYMBOLS="-Zi" fi @@ -46649,7 +46652,7 @@ $as_echo "$supports" >&6; } CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC" elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \ - -Zi -MD -Zc:wchar_t- -W3 -wd4800 \ + -MD -Zc:wchar_t- -W3 -wd4800 \ -DWIN32_LEAN_AND_MEAN \ -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \ -D_WINSOCK_DEPRECATED_NO_WARNINGS \ @@ -46796,9 +46799,6 @@ $as_echo "$supports" >&6; } LDFLAGS_SAFESH="-safeseh" LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH" fi - # TODO: make -debug optional "--disable-full-debug-symbols" - LDFLAGS_MICROSOFT_DEBUG="-debug" - LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT_DEBUG" elif test "x$TOOLCHAIN_TYPE" = xgcc; then # If this is a --hash-style=gnu system, use --hash-style=both, why? # We have previously set HAS_GNU_HASH if this is the case diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk index f675790efc6..b87bb0ab249 100644 --- a/make/common/NativeCompilation.gmk +++ b/make/common/NativeCompilation.gmk @@ -234,7 +234,10 @@ define add_native_source -include $$($1_$2_DEP_TARGETS) ifeq ($(TOOLCHAIN_TYPE), microsoft) - $1_$2_DEBUG_OUT_FLAGS:=-Fd$$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ)) + # To avoid name clashes between pdbs for objects and libs/execs, put + # object pdbs in a separate subdir. + $1_$2_DEBUG_OUT_FLAGS:=-Fd$$(strip $$(patsubst $$($1_OBJECT_DIR)/%, \ + $$($1_OBJECT_DIR)/pdb/%, $$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ)))) endif endif @@ -246,7 +249,7 @@ define add_native_source $$($1_$2_OBJ) : $2 $$($1_COMPILE_VARDEPS_FILE) $$($1_$2_VARDEPS_FILE) | $$($1_BUILD_INFO) $$(call LogInfo, Compiling $$(notdir $2) (for $$(notdir $$($1_TARGET)))) - $$(call MakeDir, $$(@D)) + $$(call MakeDir, $$(@D) $$(@D)/pdb) ifneq ($(TOOLCHAIN_TYPE), microsoft) ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s,$2), solstudio) # The Solaris studio compiler doesn't output the full path to the object file in the @@ -706,7 +709,7 @@ define SetupNativeCompilationBody # Generate debuginfo files. ifeq ($(OPENJDK_TARGET_OS), windows) - $1_EXTRA_LDFLAGS += "-pdb:$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).pdb" \ + $1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).pdb" \ "-map:$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).map" $1_DEBUGINFO_FILES := $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).pdb \ $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).map