Blame SOURCES/jdk8210425-rh1632174-sharedRuntimeTrig_sharedRuntimeTrans_compiled_without_optimization.patch

fdc7ab
# HG changeset patch
fdc7ab
# User sgehwolf
fdc7ab
# Date 1536682731 -7200
fdc7ab
#      Tue Sep 11 18:18:51 2018 +0200
fdc7ab
# Node ID 7157249fdd4366d95dd68f3d083ebb0ef84c753b
fdc7ab
# Parent  8d86b149e10f0a0896e5fd4d8d407e5fda64a529
fdc7ab
8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
fdc7ab
Reviewed-by: duke
fdc7ab
fdc7ab
diff --git a/make/hotspot/lib/JvmOverrideFiles.gmk b/make/hotspot/lib/JvmOverrideFiles.gmk
fdc7ab
--- a/make/hotspot/lib/JvmOverrideFiles.gmk
fdc7ab
+++ b/make/hotspot/lib/JvmOverrideFiles.gmk
fdc7ab
@@ -43,20 +43,26 @@ ifeq ($(TOOLCHAIN_TYPE), gcc)
fdc7ab
   endif
fdc7ab
 endif
fdc7ab
 
fdc7ab
+LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_FLAG_NONE)
fdc7ab
+# If the FDLIBM_CFLAGS variable is non-empty we know
fdc7ab
+# that the fdlibm-fork in hotspot can get optimized
fdc7ab
+# by using -ffp-contract=off on GCC/Clang platforms.
fdc7ab
+ifneq ($(FDLIBM_CFLAGS), )
fdc7ab
+  LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_FLAG_NORM)
fdc7ab
+endif
fdc7ab
+
fdc7ab
 ifeq ($(OPENJDK_TARGET_OS), linux)
fdc7ab
   BUILD_LIBJVM_ostream.cpp_CXXFLAGS := -D_FILE_OFFSET_BITS=64
fdc7ab
   BUILD_LIBJVM_logFileOutput.cpp_CXXFLAGS := -D_FILE_OFFSET_BITS=64
fdc7ab
 
fdc7ab
-  ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)
fdc7ab
-    BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := -DNO_PCH $(CXX_O_FLAG_NONE)
fdc7ab
-    BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := -DNO_PCH $(CXX_O_FLAG_NONE)
fdc7ab
+  BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := -DNO_PCH $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)
fdc7ab
+  BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := -DNO_PCH $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)
fdc7ab
 
fdc7ab
-    ifeq ($(TOOLCHAIN_TYPE), clang)
fdc7ab
-      JVM_PRECOMPILED_HEADER_EXCLUDE := \
fdc7ab
-          sharedRuntimeTrig.cpp \
fdc7ab
-          sharedRuntimeTrans.cpp \
fdc7ab
-          #
fdc7ab
-    endif
fdc7ab
+  ifeq ($(TOOLCHAIN_TYPE), clang)
fdc7ab
+    JVM_PRECOMPILED_HEADER_EXCLUDE := \
fdc7ab
+       sharedRuntimeTrig.cpp \
fdc7ab
+       sharedRuntimeTrans.cpp \
fdc7ab
+       #
fdc7ab
   endif
fdc7ab
 
fdc7ab
   ifeq ($(OPENJDK_TARGET_CPU), x86)