8001753: build-infra: mismatch with full debug symbol control for hotspot

Tue, 11 Dec 2012 11:33:34 +0100

author
erikj
date
Tue, 11 Dec 2012 11:33:34 +0100
changeset 533
e175ecff1391
parent 532
2795874efd16
child 534
cdb401a60cea

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

common/autoconf/generated-configure.sh file | annotate | diff | comparison | revisions
common/autoconf/hotspot-spec.gmk.in file | annotate | diff | comparison | revisions
common/autoconf/jdk-options.m4 file | annotate | diff | comparison | revisions
common/makefiles/NativeCompilation.gmk file | annotate | diff | comparison | revisions
     1.1 --- a/common/autoconf/generated-configure.sh	Tue Dec 11 11:29:58 2012 +0100
     1.2 +++ b/common/autoconf/generated-configure.sh	Tue Dec 11 11:33:34 2012 +0100
     1.3 @@ -3674,7 +3674,7 @@
     1.4  #CUSTOM_AUTOCONF_INCLUDE
     1.5  
     1.6  # Do not change or remove the following line, it is needed for consistency checks:
     1.7 -DATE_WHEN_GENERATED=1355221697
     1.8 +DATE_WHEN_GENERATED=1355221914
     1.9  
    1.10  ###############################################################################
    1.11  #
    1.12 @@ -27820,34 +27820,34 @@
    1.13  # ENABLE_DEBUG_SYMBOLS
    1.14  # This must be done after the toolchain is setup, since we're looking at objcopy.
    1.15  #
    1.16 -ENABLE_DEBUG_SYMBOLS=default
    1.17 -
    1.18 -# default on macosx is no...
    1.19 -if test "x$OPENJDK_TARGET_OS" = xmacosx; then
    1.20 -   ENABLE_DEBUG_SYMBOLS=no
    1.21 -fi
    1.22 -
    1.23  # Check whether --enable-debug-symbols was given.
    1.24  if test "${enable_debug_symbols+set}" = set; then :
    1.25 -  enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}
    1.26 +  enableval=$enable_debug_symbols;
    1.27  fi
    1.28  
    1.29  
    1.30  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
    1.31  $as_echo_n "checking if we should generate debug symbols... " >&6; }
    1.32  
    1.33 -if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
    1.34 +if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
    1.35     # explicit enabling of enable-debug-symbols and can't find objcopy
    1.36     #   this is an error
    1.37     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
    1.38  fi
    1.39  
    1.40 -if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
    1.41 +if test "x$enable_debug_symbols" = "xyes"; then
    1.42 +  ENABLE_DEBUG_SYMBOLS=true
    1.43 +elif test "x$enable_debug_symbols" = "xno"; then
    1.44 +  ENABLE_DEBUG_SYMBOLS=false
    1.45 +else
    1.46 +  # default on macosx is false
    1.47 +  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
    1.48 +    ENABLE_DEBUG_SYMBOLS=false
    1.49    # Default is on if objcopy is found, otherwise off
    1.50 -  if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
    1.51 -     ENABLE_DEBUG_SYMBOLS=yes
    1.52 -  else
    1.53 -     ENABLE_DEBUG_SYMBOLS=no
    1.54 +  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
    1.55 +    ENABLE_DEBUG_SYMBOLS=true
    1.56 +  else
    1.57 +    ENABLE_DEBUG_SYMBOLS=false
    1.58    fi
    1.59  fi
    1.60  
    1.61 @@ -27857,25 +27857,21 @@
    1.62  #
    1.63  # ZIP_DEBUGINFO_FILES
    1.64  #
    1.65 -ZIP_DEBUGINFO_FILES=yes
    1.66 -
    1.67  # Check whether --enable-zip-debug-info was given.
    1.68  if test "${enable_zip_debug_info+set}" = set; then :
    1.69 -  enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}
    1.70 +  enableval=$enable_zip_debug_info;
    1.71  fi
    1.72  
    1.73  
    1.74  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
    1.75  $as_echo_n "checking if we should zip debug-info files... " >&6; }
    1.76 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP_DEBUGINFO_FILES" >&5
    1.77 -$as_echo "$ZIP_DEBUGINFO_FILES" >&6; }
    1.78 -
    1.79 -# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
    1.80 -#   use that...
    1.81 -if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
    1.82 -   ZIP_DEBUGINFO_FILES=1
    1.83 -else
    1.84 -   ZIP_DEBUGINFO_FILES=0
    1.85 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
    1.86 +$as_echo "${enable_zip_debug_info}" >&6; }
    1.87 +
    1.88 +if test "x${enable_zip_debug_info}" = "xno"; then
    1.89 +   ZIP_DEBUGINFO_FILES=false
    1.90 +else
    1.91 +   ZIP_DEBUGINFO_FILES=true
    1.92  fi
    1.93  
    1.94  
     2.1 --- a/common/autoconf/hotspot-spec.gmk.in	Tue Dec 11 11:29:58 2012 +0100
     2.2 +++ b/common/autoconf/hotspot-spec.gmk.in	Tue Dec 11 11:33:34 2012 +0100
     2.3 @@ -97,6 +97,24 @@
     2.4  
     2.5  USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@
     2.6  
     2.7 +# Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols
     2.8 +# creation. 
     2.9 +ifeq ($(ENABLE_DEBUG_SYMBOLS), true) 
    2.10 +  FULL_DEBUG_SYMBOLS=1
    2.11 +  # Ensure hotspot uses the objcopy that configure located 
    2.12 +  ALT_OBJCOPY:=$(OBJCOPY) 
    2.13 +else 
    2.14 +  FULL_DEBUG_SYMBOLS=0
    2.15 +endif
    2.16 +
    2.17 +# Hotspot expects the variable ZIP_DEBUGINFO_FILES=1/0 and not true/false.
    2.18 +ifeq ($(ZIP_DEBUGINFO_FILES)$(ENABLE_DEBUG_SYMBOLS), truetrue)
    2.19 +  ZIP_DEBUGINFO_FILES:=1
    2.20 +endif
    2.21 +ifeq ($(ZIP_DEBUGINFO_FILES), false)
    2.22 +  ZIP_DEBUGINFO_FILES:=0
    2.23 +endif
    2.24 +
    2.25  # Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files.
    2.26  # This is needed to get the LOG setting to work properly.
    2.27  include $(SRC_ROOT)/common/makefiles/MakeBase.gmk
     3.1 --- a/common/autoconf/jdk-options.m4	Tue Dec 11 11:29:58 2012 +0100
     3.2 +++ b/common/autoconf/jdk-options.m4	Tue Dec 11 11:33:34 2012 +0100
     3.3 @@ -432,32 +432,30 @@
     3.4  # ENABLE_DEBUG_SYMBOLS
     3.5  # This must be done after the toolchain is setup, since we're looking at objcopy.
     3.6  #
     3.7 -ENABLE_DEBUG_SYMBOLS=default
     3.8 -
     3.9 -# default on macosx is no...
    3.10 -if test "x$OPENJDK_TARGET_OS" = xmacosx; then
    3.11 -   ENABLE_DEBUG_SYMBOLS=no
    3.12 -fi
    3.13 -
    3.14  AC_ARG_ENABLE([debug-symbols],
    3.15 -              [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])],
    3.16 -              [ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}],
    3.17 -)
    3.18 +              [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])])
    3.19  
    3.20  AC_MSG_CHECKING([if we should generate debug symbols])
    3.21  
    3.22 -if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
    3.23 +if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
    3.24     # explicit enabling of enable-debug-symbols and can't find objcopy
    3.25     #   this is an error
    3.26     AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
    3.27  fi
    3.28  
    3.29 -if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
    3.30 +if test "x$enable_debug_symbols" = "xyes"; then
    3.31 +  ENABLE_DEBUG_SYMBOLS=true
    3.32 +elif test "x$enable_debug_symbols" = "xno"; then
    3.33 +  ENABLE_DEBUG_SYMBOLS=false
    3.34 +else
    3.35 +  # default on macosx is false
    3.36 +  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
    3.37 +    ENABLE_DEBUG_SYMBOLS=false
    3.38    # Default is on if objcopy is found, otherwise off
    3.39 -  if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
    3.40 -     ENABLE_DEBUG_SYMBOLS=yes
    3.41 +  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
    3.42 +    ENABLE_DEBUG_SYMBOLS=true
    3.43    else
    3.44 -     ENABLE_DEBUG_SYMBOLS=no
    3.45 +    ENABLE_DEBUG_SYMBOLS=false
    3.46    fi
    3.47  fi
    3.48  
    3.49 @@ -466,22 +464,16 @@
    3.50  #
    3.51  # ZIP_DEBUGINFO_FILES
    3.52  #
    3.53 -ZIP_DEBUGINFO_FILES=yes
    3.54 -
    3.55  AC_ARG_ENABLE([zip-debug-info],
    3.56 -              [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])],
    3.57 -              [ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}],
    3.58 -)
    3.59 +              [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])])
    3.60  
    3.61  AC_MSG_CHECKING([if we should zip debug-info files])
    3.62 -AC_MSG_RESULT([$ZIP_DEBUGINFO_FILES])
    3.63 +AC_MSG_RESULT([${enable_zip_debug_info}])
    3.64  
    3.65 -# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
    3.66 -#   use that...
    3.67 -if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
    3.68 -   ZIP_DEBUGINFO_FILES=1
    3.69 +if test "x${enable_zip_debug_info}" = "xno"; then
    3.70 +   ZIP_DEBUGINFO_FILES=false
    3.71  else
    3.72 -   ZIP_DEBUGINFO_FILES=0
    3.73 +   ZIP_DEBUGINFO_FILES=true
    3.74  fi
    3.75  
    3.76  AC_SUBST(ENABLE_DEBUG_SYMBOLS)
     4.1 --- a/common/makefiles/NativeCompilation.gmk	Tue Dec 11 11:29:58 2012 +0100
     4.2 +++ b/common/makefiles/NativeCompilation.gmk	Tue Dec 11 11:33:34 2012 +0100
     4.3 @@ -302,7 +302,7 @@
     4.4      endif
     4.5  
     4.6      ifneq (,$$($1_DEBUG_SYMBOLS))	
     4.7 -        ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
     4.8 +        ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
     4.9              # Programs don't get the debug symbols added in the old build. It's not clear if
    4.10              # this is intentional.
    4.11              ifeq ($$($1_PROGRAM),)
    4.12 @@ -394,7 +394,7 @@
    4.13          endif
    4.14  
    4.15          ifneq (,$$($1_DEBUG_SYMBOLS))
    4.16 -            ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
    4.17 +            ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
    4.18                  ifeq ($(OPENJDK_TARGET_OS), windows)
    4.19                      $1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_LIBRARY).pdb" \
    4.20  				      "-map:$$($1_OBJECT_DIR)/$$($1_LIBRARY).map"
    4.21 @@ -429,7 +429,7 @@
    4.22                  endif # Touch to not retrigger rule on rebuild
    4.23  			$(TOUCH) $$@
    4.24  
    4.25 -                ifeq ($(ZIP_DEBUGINFO_FILES), 1)
    4.26 +                ifeq ($(ZIP_DEBUGINFO_FILES), true)
    4.27                      $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz
    4.28  
    4.29                      ifeq ($(OPENJDK_TARGET_OS), windows)
    4.30 @@ -472,7 +472,7 @@
    4.31      ifneq (,$$($1_PROGRAM))
    4.32          # A executable binary has been specified, setup the target for it.
    4.33          ifneq (,$$($1_DEBUG_SYMBOLS))
    4.34 -            ifeq ($(ENABLE_DEBUG_SYMBOLS), yes)
    4.35 +            ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
    4.36                  ifeq ($(OPENJDK_TARGET_OS), windows)
    4.37                      $1_EXTRA_LDFLAGS+="-pdb:$$($1_OBJECT_DIR)/$$($1_PROGRAM).pdb" \
    4.38  				      "-map:$$($1_OBJECT_DIR)/$$($1_PROGRAM).map"
    4.39 @@ -507,7 +507,7 @@
    4.40                  endif
    4.41  			$(TOUCH) $$@
    4.42  
    4.43 -                ifeq ($(ZIP_DEBUGINFO_FILES), 1)
    4.44 +                ifeq ($(ZIP_DEBUGINFO_FILES), true)
    4.45                      $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).diz
    4.46  
    4.47                      ifeq ($(OPENJDK_TARGET_OS), windows)

mercurial