RFR: 8055838 Hotspot does not compile with clang 6.0 (OS X Yosemite)

Staffan Larsen staffan.larsen at oracle.com
Tue Aug 26 09:47:36 UTC 2014


There is a check in the makefiles to lower the optimization level for some files on some versions of clang . This check needs to take clang 6.0 into account (which is the default compiler on OS X Yosemite). The straightforward fix is below. I have verified this by running the hotspot/compiler tests. With the higher optimization level, a couple of tests fail in compiler/5091921. With the lower optimization level these tests pass. So it seems the fix is still needed for clang 6.0.

bug: https://bugs.openjdk.java.net/browse/JDK-8055838

Thanks,
/Staffan


diff -r 8e575cec7af9 make/bsd/makefiles/gcc.make 
--- a/make/bsd/makefiles/gcc.make	Tue Aug 19 11:17:44 2014 -0700 
+++ b/make/bsd/makefiles/gcc.make	Fri Aug 22 19:06:41 2014 +0200 
@@ -325,6 +325,10 @@ 
   else ifeq ($(shell expr $(CC_VER_MAJOR) = 5 \& $(CC_VER_MINOR) = 1), 1) 
     OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT) 
     OPT_CFLAGS/unsafe.o += -O1 
+ # Clang 6.0 
+ else ifeq ($(shell expr $(CC_VER_MAJOR) = 6 \& $(CC_VER_MINOR) = 0), 1) 
+ OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT) 
+ OPT_CFLAGS/unsafe.o += -O1 
   else 
     $(error "Update compiler workarounds for Clang $(CC_VER_MAJOR).$(CC_VER_MINOR)") 
   endif 


More information about the hotspot-runtime-dev mailing list