java-1.8.0-openjdk/8210425-03-rh1630426-hotspot-opt-fix-zero.patch
Severin Gehwolf 68ef862ac2 Add another optimization gap fix for Zero.
Add patch 8210425-03-rh1630426-hotspot-opt-fix-zero.patch which
performs the same opt steps for Zero arches when they are being
built. This issue showed up on arm (32 bit) and s390x
only as those are Zero arches for JDK 8.
2018-10-12 16:18:07 +02:00

21 lines
861 B
Diff

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