From 0568e7449adfca1020bc94666f7fd8edda1ee4aa Mon Sep 17 00:00:00 2001 From: Severin Gehwolf Date: Tue, 9 Jun 2020 14:49:01 +0200 Subject: [PATCH] Disable stripping of debug symbols of static libraries Keep the debug symbols internal and accept the small size penalty --- java-11-openjdk.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/java-11-openjdk.spec b/java-11-openjdk.spec index d30ea87..2773d18 100644 --- a/java-11-openjdk.spec +++ b/java-11-openjdk.spec @@ -21,6 +21,9 @@ # Enable release builds by default on relevant arches. %bcond_without release +# Workaround for stripping of debug symbols from static libraries +%define __brp_strip_static_archive %{nil} + # The -g flag says to use strip -g instead of full strip on DSOs or EXEs. # This fixes detailed NMT and other tools which need minimal debug info. # See: https://bugzilla.redhat.com/show_bug.cgi?id=1520879 @@ -226,7 +229,7 @@ %global top_level_dir_name %{origin} %global minorver 0 %global buildver 5 -%global rpmrelease 0 +%global rpmrelease 1 #%%global tagsuffix "" # priority must be 8 digits in total; untill openjdk 1.8 we were using 18..... so when moving to 11 we had to add another digit %if %is_system_jdk @@ -1546,6 +1549,11 @@ $JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||") $JAVA_HOME/bin/javac -d . %{SOURCE15} $JAVA_HOME/bin/java -Djava.security.disableSystemPropertiesFile=true $(echo $(basename %{SOURCE15})|sed "s|\.java||") +# Check debug symbols in static libraries (smoke test) +export STATIC_LIBS_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{static_libs_image} +readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep w_remainder.c +readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep e_remainder.c + # Check debug symbols are present and can identify code find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0' lib do @@ -1911,6 +1919,10 @@ require "copy_jdk_configs.lua" %changelog +* Tue Jun 09 2020 Severin Gehwolf - 1:11.0.8.5-0.1.ea +- Disable stripping of debug symbols for static libraries part of + the -static-libs sub-package. + * Sun Jun 07 2020 Andrew Hughes - 1:11.0.8.5-0.0.ea - Update to shenandoah-jdk-11.0.8+5 (EA)