Blame SOURCES/jdk8210425-rh1632174-03-compile_with_o2_and_ffp_contract_off_as_for_fdlibm_zero.patch

1a0dbd
--- openjdk/hotspot/make/linux/makefiles/zeroshark.make
1a0dbd
+++ openjdk/hotspot/make/linux/makefiles/zeroshark.make
1a0dbd
@@ -30,10 +30,13 @@ ifeq ($(USE_CLANG), true)
1a0dbd
   WARNING_FLAGS += -Wno-undef
1a0dbd
 endif
1a0dbd
 
1a0dbd
-# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
1a0dbd
-OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
1a0dbd
-# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
1a0dbd
-OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
1a0dbd
+ifeq ($(OPT_CFLAGS_NO_FMA),)
1a0dbd
+  OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
1a0dbd
+  OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
1a0dbd
+else
1a0dbd
+  OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/SPEED) $(OPT_CFLAGS_NO_FMA)
1a0dbd
+  OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/SPEED) $(OPT_CFLAGS_NO_FMA)
1a0dbd
+endif
1a0dbd
 
1a0dbd
 # Specify that the CPU is little endian, if necessary
1a0dbd
 ifeq ($(ZERO_ENDIANNESS), little)