8144930: gcc 4.1.2: fix build flags after "8114853 variable tracking size limit exceeded"
Reviewed-by: dholmes
--- a/hotspot/make/linux/makefiles/gcc.make Tue Dec 08 21:46:56 2015 +0000
+++ b/hotspot/make/linux/makefiles/gcc.make Tue Dec 08 20:51:09 2015 -0500
@@ -261,7 +261,11 @@
OPT_CFLAGS = $(OPT_CFLAGS/$(OPT_CFLAGS_DEFAULT)) $(OPT_EXTRAS)
# Variable tracking size limit exceeded for VMStructs::init()
-OPT_CFLAGS/vmStructs.o += -fno-var-tracking-assignments
+ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "1"
+ # GCC >= 4.3
+ # Gcc 4.1.2 does not support this flag, nor does it have problems compiling the file.
+ OPT_CFLAGS/vmStructs.o += -fno-var-tracking-assignments
+endif
# The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp
# if we use expensive-optimizations