127 VM_PCH_FLAG/AOUT = |
127 VM_PCH_FLAG/AOUT = |
128 VM_PCH_FLAG = $(VM_PCH_FLAG/$(LINK_INTO)) |
128 VM_PCH_FLAG = $(VM_PCH_FLAG/$(LINK_INTO)) |
129 |
129 |
130 # We only use precompiled headers for the JVM build |
130 # We only use precompiled headers for the JVM build |
131 CFLAGS += $(VM_PCH_FLAG) |
131 CFLAGS += $(VM_PCH_FLAG) |
132 |
132 |
133 # There are some files which don't like precompiled headers |
133 # The following files are compiled at various optimization |
134 # The following files are build with 'OPT_CFLAGS/NOOPT' (-O0) in the opt build. |
134 # levels due to optimization issues encountered at the |
135 # But Clang doesn't support a precompiled header which was compiled with -O3 |
135 # 'OPT_CFLAGS_DEFAULT' level. The Clang compiler issues a compile |
136 # to be used in a compilation unit which uses '-O0'. We could also prepare an |
136 # time error if there is an optimization level specification |
137 # extra '-O0' PCH file for the opt build and use it here, but it's probably |
137 # skew between the PCH file and the C++ file. Especially if the |
138 # not worth the effort as long as only two files need this special handling. |
138 # PCH file is compiled at a higher optimization level than |
|
139 # the C++ file. One solution might be to prepare extra optimization |
|
140 # level specific PCH files for the opt build and use them here, but |
|
141 # it's probably not worth the effort as long as only a few files |
|
142 # need this special handling. |
139 PCH_FLAG/loopTransform.o = $(PCH_FLAG/NO_PCH) |
143 PCH_FLAG/loopTransform.o = $(PCH_FLAG/NO_PCH) |
140 PCH_FLAG/sharedRuntimeTrig.o = $(PCH_FLAG/NO_PCH) |
144 PCH_FLAG/sharedRuntimeTrig.o = $(PCH_FLAG/NO_PCH) |
141 PCH_FLAG/sharedRuntimeTrans.o = $(PCH_FLAG/NO_PCH) |
145 PCH_FLAG/sharedRuntimeTrans.o = $(PCH_FLAG/NO_PCH) |
142 PCH_FLAG/unsafe.o = $(PCH_FLAG/NO_PCH) |
146 PCH_FLAG/unsafe.o = $(PCH_FLAG/NO_PCH) |
143 |
147 |
305 |
309 |
306 # Work around some compiler bugs. |
310 # Work around some compiler bugs. |
307 ifeq ($(USE_CLANG), true) |
311 ifeq ($(USE_CLANG), true) |
308 ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 1) |
312 ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 1) |
309 OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT) |
313 OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT) |
310 OPT_CFLAGS/unsafe.o += -01 |
314 OPT_CFLAGS/unsafe.o += -O1 |
311 endif |
315 endif |
312 else |
316 else |
313 # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation. |
317 # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation. |
314 ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 3), 1) |
318 ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 3), 1) |
315 OPT_CFLAGS/mulnode.o += $(OPT_CFLAGS/NOOPT) |
319 OPT_CFLAGS/mulnode.o += $(OPT_CFLAGS/NOOPT) |