Blame SOURCES/jdk8210425-rh1632174-02-compile_with_o2_and_ffp_contract_off_as_for_fdlibm_aarch64.patch

2d54fe
diff --git openjdk.orig/hotspot/make/linux/makefiles/aarch64.make openjdk/hotspot/make/linux/makefiles/aarch64.make
2d54fe
index 3d17326..7cdb498 100644
2d54fe
--- openjdk.orig/hotspot/make/linux/makefiles/aarch64.make
2d54fe
+++ openjdk/hotspot/make/linux/makefiles/aarch64.make
2d54fe
@@ -22,10 +22,13 @@
2d54fe
 #  
2d54fe
 #
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
 # Must also specify if CPU is little endian
2d54fe
 CFLAGS += -DVM_LITTLE_ENDIAN
2d54fe