Blame SOURCES/dont-add-unnecessary-debug-links.patch

0ad01d
--- openjdk/make/common/NativeCompilation.gmk
0ad01d
+++ openjdk/make/common/NativeCompilation.gmk
0ad01d
@@ -437,29 +437,6 @@
0ad01d
 
0ad01d
         ifneq ($(OPENJDK_TARGET_OS), macosx)   # OBJCOPY is not used on MacOS X
0ad01d
           ifneq ($(OPENJDK_TARGET_OS), windows)  # nor on Windows
0ad01d
-            ifeq ($(OPENJDK_TARGET_OS), solaris)
0ad01d
-              # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
0ad01d
-              # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
0ad01d
-              # empty section headers until a fixed $(OBJCOPY) is available.
0ad01d
-              # An empty section header has sh_addr == 0 and sh_size == 0.
0ad01d
-              # This problem has only been seen on Solaris X64, but we call this tool
0ad01d
-              # on all Solaris builds just in case.
0ad01d
-              #
0ad01d
-              # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
0ad01d
-              # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
0ad01d
-              $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET) \
0ad01d
-				$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
0ad01d
-		$(RM) $$@
0ad01d
-		$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
0ad01d
-		$(OBJCOPY) --only-keep-debug $$< $$@
0ad01d
-		$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
0ad01d
-            else # not solaris
0ad01d
-              $$($1_OBJECT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo : $$($1_TARGET)
0ad01d
-		$(RM) $$@
0ad01d
-		$(OBJCOPY) --only-keep-debug $$< $$@
0ad01d
-		$(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
0ad01d
-            endif # Touch to not retrigger rule on rebuild
0ad01d
-		$(TOUCH) $$@
0ad01d
           endif # !windows
0ad01d
         endif # !macosx
0ad01d
 
0ad01d
@@ -483,7 +460,6 @@
0ad01d
             $1 += $$($1_OUTPUT_DIR)/$$($1_LIBRARY).map \
0ad01d
                 $$($1_OUTPUT_DIR)/$$($1_LIBRARY).pdb
0ad01d
           else ifneq ($(OPENJDK_TARGET_OS), macosx) # MacOS X does not use .debuginfo files
0ad01d
-            $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo
0ad01d
           endif
0ad01d
         endif
0ad01d
       endif
0ad01d
@@ -522,28 +498,8 @@
0ad01d
         ifneq ($(OPENJDK_TARGET_OS), macosx)   # OBJCOPY is not used on MacOS X
0ad01d
           ifneq ($(OPENJDK_TARGET_OS), windows)  # nor on Windows
0ad01d
             ifeq ($(OPENJDK_TARGET_OS), solaris)
0ad01d
-              # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
0ad01d
-              # Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
0ad01d
-              # empty section headers until a fixed $(OBJCOPY) is available.
0ad01d
-              # An empty section header has sh_addr == 0 and sh_size == 0.
0ad01d
-              # This problem has only been seen on Solaris X64, but we call this tool
0ad01d
-              # on all Solaris builds just in case.
0ad01d
-              #
0ad01d
-              # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
0ad01d
-              # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
0ad01d
-              $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET) \
0ad01d
-				$(FIX_EMPTY_SEC_HDR_FLAGS) $(ADD_GNU_DEBUGLINK)
0ad01d
-		$(RM) $$@
0ad01d
-		$(FIX_EMPTY_SEC_HDR_FLAGS) $(LOG_INFO) $$<
0ad01d
-		$(OBJCOPY) --only-keep-debug $$< $$@
0ad01d
-		$(CD) $$(@D) && $(ADD_GNU_DEBUGLINK) $(LOG_INFO) $$(@F) $$<
0ad01d
             else # not solaris
0ad01d
-              $$($1_OBJECT_DIR)/$$($1_PROGRAM).debuginfo : $$($1_TARGET)
0ad01d
-		$(RM) $$@
0ad01d
-		$(OBJCOPY) --only-keep-debug $$< $$@
0ad01d
-		$(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
0ad01d
             endif
0ad01d
-		$(TOUCH) $$@
0ad01d
           endif # !windows
0ad01d
         endif # !macosx
0ad01d
 
0ad01d
@@ -567,7 +523,6 @@
0ad01d
             $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).map \
0ad01d
                 $$($1_OUTPUT_DIR)/$$($1_PROGRAM).pdb
0ad01d
           else ifneq ($(OPENJDK_TARGET_OS), macosx) # MacOS X does not use .debuginfo files
0ad01d
-            $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).debuginfo
0ad01d
           endif
0ad01d
         endif
0ad01d
       endif