Blame SOURCES/jdk8210647-rh1632174-libsaproc_is_being_compiled_without_optimization.patch

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