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

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