Blame SOURCES/8206425-hotspot-remove-debuglink.patch

43ae3d
# HG changeset patch
43ae3d
# User sgehwolf
43ae3d
# Date 1530808022 -7200
43ae3d
#      Thu Jul 05 18:27:02 2018 +0200
43ae3d
# Node ID 5ba59d58d976db456c4455640111e8107b8d80e8
43ae3d
# Parent  ad057f2e3211cd18bc56550d8a2c400d92ec35b1
43ae3d
8206425: .gnu_debuglink sections added unconditionally when no debuginfo is stripped
43ae3d
Summary: Only add .gnu_debuglink sections when there is some stripping done.
43ae3d
Reviewed-by: erikj, dholmes
045ef6
43ae3d
diff --git openjdk.orig/hotspot/make/linux/makefiles/jsig.make openjdk/hotspot/make/linux/makefiles/jsig.make
43ae3d
--- openjdk.orig/hotspot/make/linux/makefiles/jsig.make
045ef6
+++ openjdk/hotspot/make/linux/makefiles/jsig.make
045ef6
@@ -57,14 +57,15 @@
045ef6
                          $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $< -ldl
045ef6
 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
045ef6
 	$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)
045ef6
+  ifeq ($(STRIP_POLICY),all_strip)
045ef6
 	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
045ef6
-  ifeq ($(STRIP_POLICY),all_strip)
045ef6
 	$(QUIETLY) $(STRIP) $@
045ef6
   else
045ef6
     ifeq ($(STRIP_POLICY),min_strip)
045ef6
+	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
045ef6
 	$(QUIETLY) $(STRIP) -g $@
045ef6
+    endif
045ef6
     # implied else here is no stripping at all
045ef6
-    endif
045ef6
   endif
045ef6
   ifeq ($(ZIP_DEBUGINFO_FILES),1)
045ef6
 	$(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO)
43ae3d
diff --git openjdk.orig/hotspot/make/linux/makefiles/saproc.make openjdk/hotspot/make/linux/makefiles/saproc.make
43ae3d
--- openjdk.orig/hotspot/make/linux/makefiles/saproc.make
045ef6
+++ openjdk/hotspot/make/linux/makefiles/saproc.make
43ae3d
@@ -100,14 +100,15 @@
045ef6
 	           -lthread_db
045ef6
 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
045ef6
 	$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO)
045ef6
+  ifeq ($(STRIP_POLICY),all_strip)
045ef6
 	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
045ef6
-  ifeq ($(STRIP_POLICY),all_strip)
045ef6
 	$(QUIETLY) $(STRIP) $@
045ef6
   else
045ef6
     ifeq ($(STRIP_POLICY),min_strip)
045ef6
+	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
045ef6
 	$(QUIETLY) $(STRIP) -g $@
045ef6
+    endif
045ef6
     # implied else here is no stripping at all
045ef6
-    endif
045ef6
   endif
045ef6
   ifeq ($(ZIP_DEBUGINFO_FILES),1)
045ef6
 	$(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO)
43ae3d
diff --git openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make
43ae3d
--- openjdk.orig/hotspot/make/linux/makefiles/vm.make
045ef6
+++ openjdk/hotspot/make/linux/makefiles/vm.make
045ef6
@@ -358,14 +358,15 @@
045ef6
 
045ef6
 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
045ef6
 	$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
43ae3d
+  ifeq ($(STRIP_POLICY),all_strip)
43ae3d
 	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
43ae3d
-  ifeq ($(STRIP_POLICY),all_strip)
045ef6
 	$(QUIETLY) $(STRIP) $@
045ef6
   else
045ef6
     ifeq ($(STRIP_POLICY),min_strip)
045ef6
+	$(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
43ae3d
 	$(QUIETLY) $(STRIP) -g $@
045ef6
+    endif
045ef6
     # implied else here is no stripping at all
045ef6
-    endif
045ef6
   endif
045ef6
   ifeq ($(ZIP_DEBUGINFO_FILES),1)
045ef6
 	$(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO)