--- a/hotspot/make/bsd/makefiles/gcc.make Thu Aug 29 18:56:29 2013 -0400
+++ b/hotspot/make/bsd/makefiles/gcc.make Fri Aug 30 15:07:23 2013 -0400
@@ -129,13 +129,17 @@
# We only use precompiled headers for the JVM build
CFLAGS += $(VM_PCH_FLAG)
-
- # There are some files which don't like precompiled headers
- # The following files are build with 'OPT_CFLAGS/NOOPT' (-O0) in the opt build.
- # But Clang doesn't support a precompiled header which was compiled with -O3
- # to be used in a compilation unit which uses '-O0'. We could also prepare an
- # extra '-O0' PCH file for the opt build and use it here, but it's probably
- # not worth the effort as long as only two files need this special handling.
+
+ # The following files are compiled at various optimization
+ # levels due to optimization issues encountered at the
+ # 'OPT_CFLAGS_DEFAULT' level. The Clang compiler issues a compile
+ # time error if there is an optimization level specification
+ # skew between the PCH file and the C++ file. Especially if the
+ # PCH file is compiled at a higher optimization level than
+ # the C++ file. One solution might be to prepare extra optimization
+ # level specific PCH files for the opt build and use them here, but
+ # it's probably not worth the effort as long as only a few files
+ # need this special handling.
PCH_FLAG/loopTransform.o = $(PCH_FLAG/NO_PCH)
PCH_FLAG/sharedRuntimeTrig.o = $(PCH_FLAG/NO_PCH)
PCH_FLAG/sharedRuntimeTrans.o = $(PCH_FLAG/NO_PCH)
@@ -307,7 +311,7 @@
ifeq ($(USE_CLANG), true)
ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 1)
OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
- OPT_CFLAGS/unsafe.o += -01
+ OPT_CFLAGS/unsafe.o += -O1
endif
else
# 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.