java-1.8.0-openjdk/jdk8210761-rh1632174-libjsig_is_being_compiled_without_optimization.patch

30 lines
1.2 KiB
Diff
Raw Normal View History

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