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

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