changeset 531:e175ecff1391

8001753: build-infra: mismatch with full debug symbol control for hotspot Summary: Enabling hotspot to use the FDS settings established at configure time Reviewed-by: dholmes, ohair
author erikj
date Tue, 11 Dec 2012 11:33:34 +0100
parents 2795874efd16
children cdb401a60cea
files common/autoconf/generated-configure.sh common/autoconf/hotspot-spec.gmk.in common/autoconf/jdk-options.m4 common/makefiles/NativeCompilation.gmk
diffstat 4 files changed, 64 insertions(+), 58 deletions(-) [+]
line wrap: on
line diff
--- a/common/autoconf/generated-configure.sh	Tue Dec 11 11:29:58 2012 +0100
+++ b/common/autoconf/generated-configure.sh	Tue Dec 11 11:33:34 2012 +0100
@@ -3674,7 +3674,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1355221697
+DATE_WHEN_GENERATED=1355221914
 
 ###############################################################################
 #
@@ -27820,34 +27820,34 @@
 # ENABLE_DEBUG_SYMBOLS
 # This must be done after the toolchain is setup, since we're looking at objcopy.
 #
-ENABLE_DEBUG_SYMBOLS=default
-
-# default on macosx is no...
-if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-   ENABLE_DEBUG_SYMBOLS=no
-fi
-
 # Check whether --enable-debug-symbols was given.
 if test "${enable_debug_symbols+set}" = set; then :
-  enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}
+  enableval=$enable_debug_symbols;
 fi
 
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
 $as_echo_n "checking if we should generate debug symbols... " >&6; }
 
-if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
+if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
    # explicit enabling of enable-debug-symbols and can't find objcopy
    #   this is an error
    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
 fi
 
-if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
+if test "x$enable_debug_symbols" = "xyes"; then
+  ENABLE_DEBUG_SYMBOLS=true
+elif test "x$enable_debug_symbols" = "xno"; then
+  ENABLE_DEBUG_SYMBOLS=false
+else
+  # default on macosx is false
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    ENABLE_DEBUG_SYMBOLS=false
   # Default is on if objcopy is found, otherwise off
-  if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
-     ENABLE_DEBUG_SYMBOLS=yes
-  else
-     ENABLE_DEBUG_SYMBOLS=no
+  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
+    ENABLE_DEBUG_SYMBOLS=true
+  else
+    ENABLE_DEBUG_SYMBOLS=false
   fi
 fi
 
@@ -27857,25 +27857,21 @@
 #
 # ZIP_DEBUGINFO_FILES
 #
-ZIP_DEBUGINFO_FILES=yes
-
 # Check whether --enable-zip-debug-info was given.
 if test "${enable_zip_debug_info+set}" = set; then :
-  enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}
+  enableval=$enable_zip_debug_info;
 fi
 
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
 $as_echo_n "checking if we should zip debug-info files... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP_DEBUGINFO_FILES" >&5
-$as_echo "$ZIP_DEBUGINFO_FILES" >&6; }
-
-# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
-#   use that...
-if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
-   ZIP_DEBUGINFO_FILES=1
-else
-   ZIP_DEBUGINFO_FILES=0
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
+$as_echo "${enable_zip_debug_info}" >&6; }
+
+if test "x${enable_zip_debug_info}" = "xno"; then
+   ZIP_DEBUGINFO_FILES=false
+else
+   ZIP_DEBUGINFO_FILES=true
 fi
 
 
--- a/common/autoconf/hotspot-spec.gmk.in	Tue Dec 11 11:29:58 2012 +0100
+++ b/common/autoconf/hotspot-spec.gmk.in	Tue Dec 11 11:33:34 2012 +0100
@@ -97,6 +97,24 @@
 
 USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@
 
+# Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols
+# creation. 
+ifeq ($(ENABLE_DEBUG_SYMBOLS), true) 
+  FULL_DEBUG_SYMBOLS=1
+  # Ensure hotspot uses the objcopy that configure located 
+  ALT_OBJCOPY:=$(OBJCOPY) 
+else 
+  FULL_DEBUG_SYMBOLS=0
+endif
+
+# Hotspot expects the variable ZIP_DEBUGINFO_FILES=1/0 and not true/false.
+ifeq ($(ZIP_DEBUGINFO_FILES)$(ENABLE_DEBUG_SYMBOLS), truetrue)
+  ZIP_DEBUGINFO_FILES:=1
+endif
+ifeq ($(ZIP_DEBUGINFO_FILES), false)
+  ZIP_DEBUGINFO_FILES:=0
+endif
+
 # Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files.
 # This is needed to get the LOG setting to work properly.
 include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
--- a/common/autoconf/jdk-options.m4	Tue Dec 11 11:29:58 2012 +0100
+++ b/common/autoconf/jdk-options.m4	Tue Dec 11 11:33:34 2012 +0100
@@ -432,32 +432,30 @@
 # ENABLE_DEBUG_SYMBOLS
 # This must be done after the toolchain is setup, since we're looking at objcopy.
 #
-ENABLE_DEBUG_SYMBOLS=default
-
-# default on macosx is no...
-if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-   ENABLE_DEBUG_SYMBOLS=no
-fi
-
 AC_ARG_ENABLE([debug-symbols],
-              [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])],
-              [ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}],
-)
+              [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])])
 
 AC_MSG_CHECKING([if we should generate debug symbols])
 
-if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
+if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
    # explicit enabling of enable-debug-symbols and can't find objcopy
    #   this is an error
    AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
 fi
 
-if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
+if test "x$enable_debug_symbols" = "xyes"; then
+  ENABLE_DEBUG_SYMBOLS=true
+elif test "x$enable_debug_symbols" = "xno"; then
+  ENABLE_DEBUG_SYMBOLS=false
+else
+  # default on macosx is false
+  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+    ENABLE_DEBUG_SYMBOLS=false
   # Default is on if objcopy is found, otherwise off
-  if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
-     ENABLE_DEBUG_SYMBOLS=yes
+  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
+    ENABLE_DEBUG_SYMBOLS=true
   else
-     ENABLE_DEBUG_SYMBOLS=no
+    ENABLE_DEBUG_SYMBOLS=false
   fi
 fi
 
@@ -466,22 +464,16 @@
 #
 # ZIP_DEBUGINFO_FILES
 #
-ZIP_DEBUGINFO_FILES=yes
-
 AC_ARG_ENABLE([zip-debug-info],
-              [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])],
-              [ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}],
-)
+              [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])])
 
 AC_MSG_CHECKING([if we should zip debug-info files])
-AC_MSG_RESULT([$ZIP_DEBUGINFO_FILES])
+AC_MSG_RESULT([${enable_zip_debug_info}])
 
-# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
-#   use that...
-if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
-   ZIP_DEBUGINFO_FILES=1
+if test "x${enable_zip_debug_info}" = "xno"; then
+   ZIP_DEBUGINFO_FILES=false
 else
-   ZIP_DEBUGINFO_FILES=0
+   ZIP_DEBUGINFO_FILES=true
 fi
 
 AC_SUBST(ENABLE_DEBUG_SYMBOLS)
--- a/common/makefiles/NativeCompilation.gmk	Tue Dec 11 11:29:58 2012 +0100
+++ b/common/makefiles/NativeCompilation.gmk	Tue Dec 11 11:33:34 2012 +0100
@@ -302,7 +302,7 @@
     endif
 
     ifneq (,$$($1_DEBUG_SYMBOLS))	
-        ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
+        ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
             # Programs don't get the debug symbols added in the old build. It's not clear if
             # this is intentional.
             ifeq ($$($1_PROGRAM),)
@@ -394,7 +394,7 @@
         endif
 
         ifneq (,$$($1_DEBUG_SYMBOLS))
-            ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
+            ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
                 ifeq ($(OPENJDK_TARGET_OS), windows)
                     $1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_LIBRARY).pdb" \
 				      "-map:$$($1_OBJECT_DIR)/$$($1_LIBRARY).map"
@@ -429,7 +429,7 @@
                 endif # Touch to not retrigger rule on rebuild
 			$(TOUCH) $$@
 
-                ifeq ($(ZIP_DEBUGINFO_FILES), 1)
+                ifeq ($(ZIP_DEBUGINFO_FILES), true)
                     $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz
 
                     ifeq ($(OPENJDK_TARGET_OS), windows)
@@ -472,7 +472,7 @@
     ifneq (,$$($1_PROGRAM))
         # A executable binary has been specified, setup the target for it.
         ifneq (,$$($1_DEBUG_SYMBOLS))
-            ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
+            ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
                 ifeq ($(OPENJDK_TARGET_OS), windows)
                     $1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_PROGRAM).pdb" \
 				      "-map:$$($1_OBJECT_DIR)/$$($1_PROGRAM).map"
@@ -507,7 +507,7 @@
                 endif
 			$(TOUCH) $$@
 
-                ifeq ($(ZIP_DEBUGINFO_FILES), 1)
+                ifeq ($(ZIP_DEBUGINFO_FILES), true)
                     $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).diz
 
                     ifeq ($(OPENJDK_TARGET_OS), windows)