changeset 9687:37e693211deb

8144930: gcc 4.1.2: fix build flags after "8114853 variable tracking size limit exceeded" Reviewed-by: dholmes
author goetz
date Tue, 08 Dec 2015 20:51:09 -0500
parents a4bfa4a42d5f
children cbc2d5fbdae1 ac12ff34ee8e
files make/linux/makefiles/gcc.make
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/make/linux/makefiles/gcc.make	Tue Dec 08 21:46:56 2015 +0000
+++ b/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