Blame SOURCES/jdk8210761-rh1632174-libjsig_is_being_compiled_without_optimization.patch

1a0dbd
# HG changeset patch
1a0dbd
# User sgehwolf
1a0dbd
# Date 1537541916 -7200
1a0dbd
#      Fri Sep 21 16:58:36 2018 +0200
1a0dbd
# Node ID 4010c90156d1bfeaf988dbfeb01520f2e3a66ea8
1a0dbd
# Parent  54afe70c50b6a6685763d00883e5173c0ba3a19d
1a0dbd
8210761: libjsig is being compiled without optimization
1a0dbd
Reviewed-by: erikj, ihse
1a0dbd
1a0dbd
diff --git openjdk.orig/hotspot/make/linux/makefiles/jsig.make openjdk/hotspot/make/linux/makefiles/jsig.make
1a0dbd
--- openjdk.orig/hotspot/make/linux/makefiles/jsig.make
1a0dbd
+++ openjdk/hotspot/make/linux/makefiles/jsig.make
1a0dbd
@@ -51,10 +51,15 @@
1a0dbd
   JSIG_DEBUG_CFLAGS = -g
1a0dbd
 endif
1a0dbd
 
1a0dbd
+# Optimize jsig lib at level -O3 unless it's a slowdebug build
1a0dbd
+ifneq ($(DEBUG_LEVEL), slowdebug)
1a0dbd
+  JSIG_OPT_FLAGS = $(OPT_CFLAGS)
1a0dbd
+endif
1a0dbd
+
1a0dbd
 $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
1a0dbd
 	@echo Making signal interposition lib...
1a0dbd
 	$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
1a0dbd
-                         $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $< -ldl
1a0dbd
+                         $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(JSIG_OPT_FLAGS) $(EXTRA_CFLAGS) -o $@ $< -ldl
1a0dbd
 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
1a0dbd
   ifneq ($(STRIP_POLICY),no_strip)
1a0dbd
 	$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)