Merge

Wed, 30 Oct 2013 13:41:36 -0700

author
lana
date
Wed, 30 Oct 2013 13:41:36 -0700
changeset 904
37d2736caf46
parent 903
067355edfbf8
parent 875
4f2011496393
child 905
763ada2a1d8c

Merge

common/autoconf/basics.m4 file | annotate | diff | comparison | revisions
common/autoconf/generated-configure.sh file | annotate | diff | comparison | revisions
common/autoconf/spec.gmk.in file | annotate | diff | comparison | revisions
     1.1 --- a/common/autoconf/basics.m4	Wed Oct 30 17:31:01 2013 +0000
     1.2 +++ b/common/autoconf/basics.m4	Wed Oct 30 13:41:36 2013 -0700
     1.3 @@ -656,7 +656,7 @@
     1.4    fi
     1.5  
     1.6    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
     1.7 -  BASIC_REQUIRE_PROG(DSYMUTIL, dsymutil)
     1.8 +    BASIC_REQUIRE_PROG(DSYMUTIL, dsymutil)
     1.9      BASIC_REQUIRE_PROG(XATTR, xattr)
    1.10      AC_PATH_PROG(CODESIGN, codesign)
    1.11      if test "x$CODESIGN" != "x"; then
     2.1 --- a/common/autoconf/generated-configure.sh	Wed Oct 30 17:31:01 2013 +0000
     2.2 +++ b/common/autoconf/generated-configure.sh	Wed Oct 30 13:41:36 2013 -0700
     2.3 @@ -869,6 +869,7 @@
     2.4  ZERO_ARCHDEF
     2.5  DEFINE_CROSS_COMPILE_ARCH
     2.6  LP64
     2.7 +OPENJDK_TARGET_OS_EXPORT_DIR
     2.8  OPENJDK_TARGET_OS_API_DIR
     2.9  OPENJDK_TARGET_CPU_JLI_CFLAGS
    2.10  OPENJDK_TARGET_CPU_OSARCH
    2.11 @@ -7149,6 +7150,13 @@
    2.12    fi
    2.13  
    2.14  
    2.15 +  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
    2.16 +      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
    2.17 +  else
    2.18 +      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
    2.19 +  fi
    2.20 +
    2.21 +
    2.22    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
    2.23      A_LP64="LP64:="
    2.24      # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
    2.25 @@ -29638,7 +29646,7 @@
    2.26        -I${JDK_OUTPUTDIR}/include \
    2.27        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
    2.28        -I${JDK_TOPDIR}/src/share/javavm/export \
    2.29 -      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
    2.30 +      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
    2.31        -I${JDK_TOPDIR}/src/share/native/common \
    2.32        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
    2.33  
    2.34 @@ -29905,11 +29913,11 @@
    2.35    elif test "x$enable_debug_symbols" = "xno"; then
    2.36      ENABLE_DEBUG_SYMBOLS=false
    2.37    else
    2.38 -  # Default is on if objcopy is found
    2.39 -  if test "x$OBJCOPY" != x; then
    2.40 -    ENABLE_DEBUG_SYMBOLS=true
    2.41 -  # MacOS X and Windows don't use objcopy but default is on for those OSes
    2.42 -  elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
    2.43 +    # Default is on if objcopy is found
    2.44 +    if test "x$OBJCOPY" != x; then
    2.45 +      ENABLE_DEBUG_SYMBOLS=true
    2.46 +    # MacOS X and Windows don't use objcopy but default is on for those OSes
    2.47 +    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
    2.48        ENABLE_DEBUG_SYMBOLS=true
    2.49      else
    2.50        ENABLE_DEBUG_SYMBOLS=false
    2.51 @@ -34245,10 +34253,10 @@
    2.52  ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
    2.53  
    2.54      PREV_CXXCFLAGS="$CXXFLAGS"
    2.55 -    PREV_LDFLAGS="$LDFLAGS"
    2.56 +    PREV_LIBS="$LIBS"
    2.57      PREV_CXX="$CXX"
    2.58      CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
    2.59 -    LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
    2.60 +    LIBS="$LIBS $FREETYPE_LIBS"
    2.61      CXX="$FIXPATH $CXX"
    2.62      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    2.63  /* end confdefs.h.  */
    2.64 @@ -34315,7 +34323,7 @@
    2.65  rm -f core conftest.err conftest.$ac_objext \
    2.66      conftest$ac_exeext conftest.$ac_ext
    2.67      CXXCFLAGS="$PREV_CXXFLAGS"
    2.68 -    LDFLAGS="$PREV_LDFLAGS"
    2.69 +    LIBS="$PREV_LIBS"
    2.70      CXX="$PREV_CXX"
    2.71      ac_ext=cpp
    2.72  ac_cpp='$CXXCPP $CPPFLAGS'
     3.1 --- a/common/autoconf/jdk-options.m4	Wed Oct 30 17:31:01 2013 +0000
     3.2 +++ b/common/autoconf/jdk-options.m4	Wed Oct 30 13:41:36 2013 -0700
     3.3 @@ -516,11 +516,11 @@
     3.4    elif test "x$enable_debug_symbols" = "xno"; then
     3.5      ENABLE_DEBUG_SYMBOLS=false
     3.6    else
     3.7 -  # Default is on if objcopy is found
     3.8 -  if test "x$OBJCOPY" != x; then
     3.9 -    ENABLE_DEBUG_SYMBOLS=true
    3.10 -  # MacOS X and Windows don't use objcopy but default is on for those OSes
    3.11 -  elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
    3.12 +    # Default is on if objcopy is found
    3.13 +    if test "x$OBJCOPY" != x; then
    3.14 +      ENABLE_DEBUG_SYMBOLS=true
    3.15 +    # MacOS X and Windows don't use objcopy but default is on for those OSes
    3.16 +    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
    3.17        ENABLE_DEBUG_SYMBOLS=true
    3.18      else
    3.19        ENABLE_DEBUG_SYMBOLS=false
     4.1 --- a/common/autoconf/libraries.m4	Wed Oct 30 17:31:01 2013 +0000
     4.2 +++ b/common/autoconf/libraries.m4	Wed Oct 30 13:41:36 2013 -0700
     4.3 @@ -481,10 +481,10 @@
     4.4      AC_MSG_CHECKING([if we can compile and link with freetype])
     4.5      AC_LANG_PUSH(C++)
     4.6      PREV_CXXCFLAGS="$CXXFLAGS"
     4.7 -    PREV_LDFLAGS="$LDFLAGS"
     4.8 +    PREV_LIBS="$LIBS"
     4.9      PREV_CXX="$CXX"
    4.10      CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS" 
    4.11 -    LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
    4.12 +    LIBS="$LIBS $FREETYPE_LIBS"
    4.13      CXX="$FIXPATH $CXX"
    4.14      AC_LINK_IFELSE([AC_LANG_SOURCE([[
    4.15            #include<ft2build.h>
    4.16 @@ -508,7 +508,7 @@
    4.17          ]
    4.18      )
    4.19      CXXCFLAGS="$PREV_CXXFLAGS"
    4.20 -    LDFLAGS="$PREV_LDFLAGS"
    4.21 +    LIBS="$PREV_LIBS"
    4.22      CXX="$PREV_CXX"
    4.23      AC_LANG_POP(C++)
    4.24  
     5.1 --- a/common/autoconf/platform.m4	Wed Oct 30 17:31:01 2013 +0000
     5.2 +++ b/common/autoconf/platform.m4	Wed Oct 30 13:41:36 2013 -0700
     5.3 @@ -327,6 +327,13 @@
     5.4    fi
     5.5    AC_SUBST(OPENJDK_TARGET_OS_API_DIR)
     5.6  
     5.7 +  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
     5.8 +      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
     5.9 +  else
    5.10 +      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
    5.11 +  fi
    5.12 +  AC_SUBST(OPENJDK_TARGET_OS_EXPORT_DIR)
    5.13 +
    5.14    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
    5.15      A_LP64="LP64:="
    5.16      # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
     6.1 --- a/common/autoconf/spec.gmk.in	Wed Oct 30 17:31:01 2013 +0000
     6.2 +++ b/common/autoconf/spec.gmk.in	Wed Oct 30 13:41:36 2013 -0700
     6.3 @@ -92,6 +92,7 @@
     6.4  OPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
     6.5  OPENJDK_TARGET_CPU_JLI_CFLAGS:=@OPENJDK_TARGET_CPU_JLI_CFLAGS@
     6.6  OPENJDK_TARGET_OS_API_DIR:=@OPENJDK_TARGET_OS_API_DIR@
     6.7 +OPENJDK_TARGET_OS_EXPORT_DIR:=@OPENJDK_TARGET_OS_EXPORT_DIR@
     6.8  
     6.9  # We are building on this build system.
    6.10  # When not cross-compiling, it is the same as the target.
     7.1 --- a/common/autoconf/toolchain.m4	Wed Oct 30 17:31:01 2013 +0000
     7.2 +++ b/common/autoconf/toolchain.m4	Wed Oct 30 13:41:36 2013 -0700
     7.3 @@ -942,7 +942,7 @@
     7.4        -I${JDK_OUTPUTDIR}/include \
     7.5        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
     7.6        -I${JDK_TOPDIR}/src/share/javavm/export \
     7.7 -      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
     7.8 +      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
     7.9        -I${JDK_TOPDIR}/src/share/native/common \
    7.10        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
    7.11  
     8.1 --- a/common/makefiles/JavaCompilation.gmk	Wed Oct 30 17:31:01 2013 +0000
     8.2 +++ b/common/makefiles/JavaCompilation.gmk	Wed Oct 30 13:41:36 2013 -0700
     8.3 @@ -506,30 +506,30 @@
     8.4  
     8.5      $$($1_BIN)/javac_state: $$($1_SRCS) $$($1_DEPENDS)
     8.6  	$(MKDIR) -p $$(@D)
     8.7 -	$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.batch.tmp)
     8.8 +	$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.$1_batch.tmp)
     8.9  	$(ECHO) Compiling $1
    8.10  	($$($1_JVM) $$($1_SJAVAC) \
    8.11  	    $$($1_REMOTE) \
    8.12  	    -j $(JOBS) \
    8.13  	    --permit-unidentified-artifacts \
    8.14  	    --permit-sources-without-package \
    8.15 -	    --compare-found-sources $$($1_BIN)/_the.batch.tmp \
    8.16 +	    --compare-found-sources $$($1_BIN)/_the.$1_batch.tmp \
    8.17  	    --log=$(LOG_LEVEL) \
    8.18  	    $$($1_SJAVAC_ARGS) \
    8.19  	    $$($1_FLAGS) \
    8.20  	    $$($1_HEADERS_ARG) \
    8.21  	    -d $$($1_BIN) && \
    8.22 -	$(MV) $$($1_BIN)/_the.batch.tmp $$($1_BIN)/_the.batch)
    8.23 +	$(MV) $$($1_BIN)/_the.$1_batch.tmp $$($1_BIN)/_the.$1_batch)
    8.24    else
    8.25      # Using plain javac to batch compile everything.
    8.26 -    $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/_the.batch
    8.27 +    $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_BIN)/_the.$1_batch
    8.28  
    8.29      # When building in batch, put headers in a temp dir to filter out those that actually
    8.30      # changed before copying them to the real header dir.
    8.31      ifneq (,$$($1_HEADERS))
    8.32        $1_HEADERS_ARG := -h $$($1_HEADERS).tmp
    8.33  
    8.34 -      $$($1_HEADERS)/_the.headers: $$($1_BIN)/_the.batch
    8.35 +      $$($1_HEADERS)/_the.$1_headers: $$($1_BIN)/_the.$1_batch
    8.36  		$(MKDIR) -p $$(@D)
    8.37  		for f in `ls $$($1_HEADERS).tmp`; do \
    8.38  		  if [ ! -f "$$($1_HEADERS)/$$$$f" ] || [ "`$(DIFF) $$($1_HEADERS)/$$$$f $$($1_HEADERS).tmp/$$$$f`" != "" ]; then \
    8.39 @@ -539,19 +539,19 @@
    8.40  		$(RM) -r $$($1_HEADERS).tmp
    8.41  		$(TOUCH) $$@
    8.42  
    8.43 -      $1 += $$($1_HEADERS)/_the.headers
    8.44 +      $1 += $$($1_HEADERS)/_the.$1_headers
    8.45      endif
    8.46  
    8.47      # When not using sjavac, pass along all sources to javac using an @file.
    8.48 -    $$($1_BIN)/_the.batch: $$($1_SRCS) $$($1_DEPENDS)
    8.49 +    $$($1_BIN)/_the.$1_batch: $$($1_SRCS) $$($1_DEPENDS)
    8.50  	$(MKDIR) -p $$(@D)
    8.51 -	$(RM) $$($1_BIN)/_the.batch $$($1_BIN)/_the.batch.tmp
    8.52 -	$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.batch.tmp)
    8.53 -	$(ECHO) Compiling `$(WC) $$($1_BIN)/_the.batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1
    8.54 +	$(RM) $$($1_BIN)/_the.$1_batch $$($1_BIN)/_the.$1_batch.tmp
    8.55 +	$$(call ListPathsSafely,$1_SRCS,\n, >> $$($1_BIN)/_the.$1_batch.tmp)
    8.56 +	$(ECHO) Compiling `$(WC) $$($1_BIN)/_the.$1_batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1
    8.57  	($$($1_JVM) $$($1_JAVAC) $$($1_FLAGS) \
    8.58  	    -implicit:none -sourcepath "$$($1_SRCROOTSC)" \
    8.59 -	    -d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.batch.tmp && \
    8.60 -	$(MV) $$($1_BIN)/_the.batch.tmp $$($1_BIN)/_the.batch)
    8.61 +	    -d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.$1_batch.tmp && \
    8.62 +	$(MV) $$($1_BIN)/_the.$1_batch.tmp $$($1_BIN)/_the.$1_batch)
    8.63  
    8.64    endif
    8.65  
     9.1 --- a/common/makefiles/NativeCompilation.gmk	Wed Oct 30 17:31:01 2013 +0000
     9.2 +++ b/common/makefiles/NativeCompilation.gmk	Wed Oct 30 13:41:36 2013 -0700
     9.3 @@ -435,36 +435,36 @@
     9.4  		$(CP) $$< $$@
     9.5          endif
     9.6  
     9.7 -                ifneq ($(OPENJDK_TARGET_OS), macosx)   # OBJCOPY is not used on MacOS X
     9.8 -                  ifneq ($(OPENJDK_TARGET_OS), windows)  # nor on Windows
     9.9 -                    ifeq ($(OPENJDK_TARGET_OS), solaris)
    9.10 -                        # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
    9.11 -                        # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
    9.12 -                        # empty section headers until a fixed $(OBJCOPY) is available.
    9.13 -                        # An empty section header has sh_addr == 0 and sh_size == 0.
    9.14 -                        # This problem has only been seen on Solaris X64, but we call this tool
    9.15 -                        # on all Solaris builds just in case.
    9.16 -                        #
    9.17 -                        # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
    9.18 -                        # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
    9.19 -                        $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \
    9.20 -					    $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
    9.21 -			    $(RM) $$@
    9.22 -			    $(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
    9.23 -			    $(OBJCOPY) --only-keep-debug $$< $$@
    9.24 -			    $(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
    9.25 -                    else # not solaris
    9.26 -                        $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET)
    9.27 -			    $(RM) $$@
    9.28 -			    $(OBJCOPY) --only-keep-debug $$< $$@
    9.29 -			    $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
    9.30 -                    endif # Touch to not retrigger rule on rebuild
    9.31 +        ifneq ($(OPENJDK_TARGET_OS), macosx)   # OBJCOPY is not used on MacOS X
    9.32 +          ifneq ($(OPENJDK_TARGET_OS), windows)  # nor on Windows
    9.33 +            ifeq ($(OPENJDK_TARGET_OS), solaris)
    9.34 +              # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
    9.35 +              # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
    9.36 +              # empty section headers until a fixed $(OBJCOPY) is available.
    9.37 +              # An empty section header has sh_addr == 0 and sh_size == 0.
    9.38 +              # This problem has only been seen on Solaris X64, but we call this tool
    9.39 +              # on all Solaris builds just in case.
    9.40 +              #
    9.41 +              # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
    9.42 +              # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
    9.43 +              $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \
    9.44 +				$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
    9.45 +		$(RM) $$@
    9.46 +		$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
    9.47 +		$(OBJCOPY) --only-keep-debug $$< $$@
    9.48 +		$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
    9.49 +            else # not solaris
    9.50 +              $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET)
    9.51 +		$(RM) $$@
    9.52 +		$(OBJCOPY) --only-keep-debug $$< $$@
    9.53 +		$(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
    9.54 +            endif # Touch to not retrigger rule on rebuild
    9.55  		$(TOUCH) $$@
    9.56 -                  endif # !windows
    9.57 -                endif # !macosx
    9.58 +          endif # !windows
    9.59 +        endif # !macosx
    9.60  
    9.61          ifeq ($(ZIP_DEBUGINFO_FILES), true)
    9.62 -                  ifneq ($(OPENJDK_TARGET_OS), macosx) # no MacOS X support yet
    9.63 +ifneq ($(OPENJDK_TARGET_OS), macosx) # no MacOS X support yet
    9.64            $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).diz
    9.65  
    9.66            ifeq ($(OPENJDK_TARGET_OS), windows)
    9.67 @@ -477,12 +477,12 @@
    9.68  		$(CD) $$($1_OBJECT_DIR) \
    9.69  		&& $(ZIP) -q $$@ $$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
    9.70            endif
    9.71 -                  endif # no MacOS X support yet
    9.72 +endif # no MacOS X support yet
    9.73          else
    9.74            ifeq ($(OPENJDK_TARGET_OS), windows)
    9.75              $1 += $$($1_OUTPUT_DIR)/$$($1_LIBRARY).map \
    9.76                  $$($1_OUTPUT_DIR)/$$($1_LIBRARY).pdb
    9.77 -                    else ifneq ($(OPENJDK_TARGET_OS), macosx) # MacOS X does not use .debuginfo files
    9.78 +          else ifneq ($(OPENJDK_TARGET_OS), macosx) # MacOS X does not use .debuginfo files
    9.79              $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
    9.80            endif
    9.81          endif
    9.82 @@ -519,36 +519,36 @@
    9.83  		$(CP) $$< $$@
    9.84          endif
    9.85  
    9.86 -                ifneq ($(OPENJDK_TARGET_OS), macosx)   # OBJCOPY is not used on MacOS X
    9.87 -                  ifneq ($(OPENJDK_TARGET_OS), windows)  # nor on Windows
    9.88 -                    ifeq ($(OPENJDK_TARGET_OS), solaris)
    9.89 -                        # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
    9.90 -                        # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
    9.91 -                        # empty section headers until a fixed $(OBJCOPY) is available.
    9.92 -                        # An empty section header has sh_addr == 0 and sh_size == 0.
    9.93 -                        # This problem has only been seen on Solaris X64, but we call this tool
    9.94 -                        # on all Solaris builds just in case.
    9.95 -                        #
    9.96 -                        # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
    9.97 -                        # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
    9.98 -                        $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \
    9.99 -					    $(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
   9.100 -			    $(RM) $$@
   9.101 -			    $(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
   9.102 -			    $(OBJCOPY) --only-keep-debug $$< $$@
   9.103 -			    $(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
   9.104 -                    else # not solaris
   9.105 -                        $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET)
   9.106 -			    $(RM) $$@
   9.107 -			    $(OBJCOPY) --only-keep-debug $$< $$@
   9.108 -			    $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
   9.109 -                    endif
   9.110 -			    $(TOUCH) $$@
   9.111 -                  endif # !windows
   9.112 -                endif # !macosx
   9.113 +        ifneq ($(OPENJDK_TARGET_OS), macosx)   # OBJCOPY is not used on MacOS X
   9.114 +          ifneq ($(OPENJDK_TARGET_OS), windows)  # nor on Windows
   9.115 +            ifeq ($(OPENJDK_TARGET_OS), solaris)
   9.116 +              # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
   9.117 +              # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
   9.118 +              # empty section headers until a fixed $(OBJCOPY) is available.
   9.119 +              # An empty section header has sh_addr == 0 and sh_size == 0.
   9.120 +              # This problem has only been seen on Solaris X64, but we call this tool
   9.121 +              # on all Solaris builds just in case.
   9.122 +              #
   9.123 +              # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
   9.124 +              # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
   9.125 +              $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \
   9.126 +				$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
   9.127 +		$(RM) $$@
   9.128 +		$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
   9.129 +		$(OBJCOPY) --only-keep-debug $$< $$@
   9.130 +		$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
   9.131 +            else # not solaris
   9.132 +              $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET)
   9.133 +		$(RM) $$@
   9.134 +		$(OBJCOPY) --only-keep-debug $$< $$@
   9.135 +		$(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
   9.136 +            endif
   9.137 +		$(TOUCH) $$@
   9.138 +          endif # !windows
   9.139 +        endif # !macosx
   9.140  
   9.141          ifeq ($(ZIP_DEBUGINFO_FILES), true)
   9.142 -                  ifneq ($(OPENJDK_TARGET_OS), macosx) # no MacOS X support yet
   9.143 +ifneq ($(OPENJDK_TARGET_OS), macosx) # no MacOS X support yet
   9.144            $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).diz
   9.145  
   9.146            ifeq ($(OPENJDK_TARGET_OS), windows)
   9.147 @@ -561,12 +561,12 @@
   9.148  		$(CD) $$($1_OBJECT_DIR) \
   9.149  		&& $(ZIP) -q $$@ $$($1_PROGRAM).debuginfo
   9.150            endif
   9.151 -                  endif # no MacOS X support yet
   9.152 +endif # no MacOS X support yet
   9.153          else
   9.154            ifeq ($(OPENJDK_TARGET_OS), windows)
   9.155              $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).map \
   9.156                  $$($1_OUTPUT_DIR)/$$($1_PROGRAM).pdb
   9.157 -                    else ifneq ($(OPENJDK_TARGET_OS), macosx) # MacOS X does not use .debuginfo files
   9.158 +          else ifneq ($(OPENJDK_TARGET_OS), macosx) # MacOS X does not use .debuginfo files
   9.159              $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).debuginfo
   9.160            endif
   9.161          endif

mercurial