Blame jdk8210425-rh1632174-03-compile_with_o2_and_ffp_contract_off_as_for_fdlibm_zero.patch

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