7188168: 7071904 broke the DEBUG_BINARIES option on Linux

Change DEBUG_BINARIES option logic to be more clear.

Reviewed-by: fparain, andrew
This commit is contained in:
Daniel D. Daugherty 2012-08-02 14:54:14 -07:00
parent 38a6055c37
commit 4a848cf3e5
2 changed files with 42 additions and 41 deletions

View file

@ -1,5 +1,5 @@
#
# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 1999, 2012, 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
@ -133,8 +133,10 @@ $(GENERATEDFILES): refresh_adfiles
# Note that product files are updated via "mv", which is atomic.
TEMPDIR := $(OUTDIR)/mktmp$(shell echo $$$$)
# Debuggable by default
ifneq ($(DEBUG_BINARIES), true)
# Debuggable by default (unless already done by DEBUG_BINARIES)
CFLAGS += -g
endif
# Pass -D flags into ADLC.
ADLCFLAGS += $(SYSDEFS)

View file

@ -215,6 +215,10 @@ AOUT_FLAGS += -Xlinker -export-dynamic
#------------------------------------------------------------------------
# Debug flags
# DEBUG_BINARIES uses full -g debug information for all configs
ifeq ($(DEBUG_BINARIES), true)
CFLAGS += -g
else
# Use the stabs format for debugging information (this is the default
# on gcc-2.91). It's good enough, has all the information about line
# numbers and local variables, and libjvm_g.so is only about 16M.
@ -249,11 +253,6 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
OPT_CFLAGS += -gstabs
endif
endif
# DEBUG_BINARIES overrides everything, use full -g debug information
ifeq ($(DEBUG_BINARIES), true)
DEBUG_CFLAGS = -g
CFLAGS += $(DEBUG_CFLAGS)
endif
# If we are building HEADLESS, pass on to VM