Blame jdk8210761-rh1632174-libjsig_is_being_compiled_without_optimization.patch

35adfa
diff --git openjdk.orig/hotspot/make/linux/makefiles/jsig.make openjdk/hotspot/make/linux/makefiles/jsig.make
35adfa
--- openjdk.orig/hotspot/make/linux/makefiles/jsig.make
35adfa
+++ openjdk/hotspot/make/linux/makefiles/jsig.make
35adfa
@@ -51,10 +51,15 @@ ifeq ($(DEBUG_BINARIES), true)
35adfa
   JSIG_DEBUG_CFLAGS = -g
35adfa
 endif
35adfa
 
35adfa
+# Optimize jsig lib at level -O3 unless it's a slowdebug build
35adfa
+ifneq ($(DEBUG_LEVEL), slowdebug)
35adfa
+  JSIG_OPT_FLAGS = $(OPT_CFLAGS)
35adfa
+endif
35adfa
+
35adfa
 $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
35adfa
	@echo Making signal interposition lib...
35adfa
	$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
35adfa
-                         $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $< -ldl
35adfa
+                         $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(JSIG_OPT_FLAGS) $(EXTRA_CFLAGS) -o $@ $< -ldl
35adfa
 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
35adfa
	$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)
35adfa
   ifeq ($(STRIP_POLICY),all_strip)