249 OPT_CFLAGS = $(OPT_CFLAGS/$(OPT_CFLAGS_DEFAULT)) $(OPT_EXTRAS)
250
251 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp
252 # if we use expensive-optimizations
253 ifeq ($(BUILDARCH), ia64)
254 OPT_CFLAGS += -fno-expensive-optimizations
255 endif
256
257 OPT_CFLAGS/NOOPT=-O0
258
259 # Work around some compiler bugs.
260 ifeq ($(USE_CLANG), true)
261 ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 1)
262 OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
263 endif
264 else
265 # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
266 ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 3), 1)
267 OPT_CFLAGS/mulnode.o += $(OPT_CFLAGS/NOOPT)
268 endif
269 endif
270
271 # Flags for generating make dependency flags.
272 DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
273 ifeq ($(USE_CLANG),)
274 ifneq ("${CC_VER_MAJOR}", "2")
275 DEPFLAGS += -fpch-deps
276 endif
277 endif
278
279 #------------------------------------------------------------------------
280 # Linker flags
281
282 # statically link libstdc++.so, work with gcc but ignored by g++
283 STATIC_STDCXX = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
284
285 ifeq ($(USE_CLANG),)
286 # statically link libgcc and/or libgcc_s, libgcc does not exist before gcc-3.x.
287 ifneq ("${CC_VER_MAJOR}", "2")
288 STATIC_LIBGCC += -static-libgcc
|
249 OPT_CFLAGS = $(OPT_CFLAGS/$(OPT_CFLAGS_DEFAULT)) $(OPT_EXTRAS)
250
251 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp
252 # if we use expensive-optimizations
253 ifeq ($(BUILDARCH), ia64)
254 OPT_CFLAGS += -fno-expensive-optimizations
255 endif
256
257 OPT_CFLAGS/NOOPT=-O0
258
259 # Work around some compiler bugs.
260 ifeq ($(USE_CLANG), true)
261 ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 1)
262 OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
263 endif
264 else
265 # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
266 ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 3), 1)
267 OPT_CFLAGS/mulnode.o += $(OPT_CFLAGS/NOOPT)
268 endif
269 ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 9), 1)
270 OPT_CFLAGS/macroAssembler_x86.o += -fno-devirtualize
271 endif
272 endif
273
274 # Flags for generating make dependency flags.
275 DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
276 ifeq ($(USE_CLANG),)
277 ifneq ("${CC_VER_MAJOR}", "2")
278 DEPFLAGS += -fpch-deps
279 endif
280 endif
281
282 #------------------------------------------------------------------------
283 # Linker flags
284
285 # statically link libstdc++.so, work with gcc but ignored by g++
286 STATIC_STDCXX = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
287
288 ifeq ($(USE_CLANG),)
289 # statically link libgcc and/or libgcc_s, libgcc does not exist before gcc-3.x.
290 ifneq ("${CC_VER_MAJOR}", "2")
291 STATIC_LIBGCC += -static-libgcc
|