Blame SOURCES/jdk8210647-rh1632174-libsaproc_is_being_compiled_without_optimization.patch

9fd28f
diff --git openjdk.orig/hotspot/make/linux/makefiles/saproc.make openjdk/hotspot/make/linux/makefiles/saproc.make
9fd28f
--- openjdk.orig/hotspot/make/linux/makefiles/saproc.make
9fd28f
+++ openjdk/hotspot/make/linux/makefiles/saproc.make
9fd28f
@@ -59,6 +59,11 @@
9fd28f
   SA_DEBUG_CFLAGS = -g
9fd28f
 endif
9fd28f
 
9fd28f
+# Optimize saproc lib at level -O3 unless it's a slowdebug build
9fd28f
+ifneq ($(DEBUG_LEVEL), slowdebug)
9fd28f
+  SA_OPT_FLAGS = $(OPT_CFLAGS)
9fd28f
+endif
9fd28f
+
9fd28f
 # if $(AGENT_DIR) does not exist, we don't build SA
9fd28f
 # also, we don't build SA on Itanium or zero.
9fd28f
 
9fd28f
@@ -95,6 +100,7 @@
9fd28f
 	           $(SASRCFILES)                                        \
9fd28f
 	           $(SA_LFLAGS)                                         \
9fd28f
 	           $(SA_DEBUG_CFLAGS)                                   \
9fd28f
+	           $(SA_OPT_FLAGS)                                      \
9fd28f
 	           $(EXTRA_CFLAGS)                                      \
9fd28f
 	           -o $@                                                \
9fd28f
 	           -lthread_db