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

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