8144930: gcc 4.1.2: fix build flags after "8114853 variable tracking size limit exceeded"
authorgoetz
Tue, 08 Dec 2015 20:51:09 -0500
changeset 34669 55788024bfaf
parent 34668 ebe7645f564b
child 34670 5ab871b40190
child 34671 1239543c7821
8144930: gcc 4.1.2: fix build flags after "8114853 variable tracking size limit exceeded" Reviewed-by: dholmes
hotspot/make/linux/makefiles/gcc.make
--- 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