Blame SOURCES/jdk8210425-rh1632174-sharedRuntimeTrig_sharedRuntimeTrans_compiled_without_optimization.patch

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