< prev index next >

make/linux/makefiles/gcc.make

Print this page

        

@@ -1,7 +1,7 @@
 #
-# Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License version 2 only, as
 # published by the Free Software Foundation.

@@ -263,10 +263,15 @@
 # Variable tracking size limit exceeded for VMStructs::init() 
 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
+  # The debug flag is added to OPT_CFLAGS, but lost in case of per-file overrides
+  # of OPT_CFLAGS. Restore it here.
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    OPT_CFLAGS/vmStructs.o += -g
+  endif
 endif
 
 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp
 # if we use expensive-optimizations
 ifeq ($(BUILDARCH), ia64)

@@ -275,10 +280,15 @@
 
 # Work around some compiler bugs.
 ifeq ($(USE_CLANG), true)
   ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 1)
     OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
+    # The debug flag is added to OPT_CFLAGS, but lost in case of per-file overrides
+    # of OPT_CFLAGS. Restore it here.
+    ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+      OPT_CFLAGS/loopTransform.o += -g
+    endif
   endif
 else
   # Do not allow GCC 4.1.1
   ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 1 \& $(CC_VER_MICRO) = 1), 1)
     $(error "GCC $(CC_VER_MAJOR).$(CC_VER_MINOR).$(CC_VER_MICRO) not supported because of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27724")
< prev index next >