Blame jdk8210761-rh1632174-libjsig_is_being_compiled_without_optimization.patch

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