Kaydet (Commit) d9cbc837 authored tarafından Michael Stahl's avatar Michael Stahl

gbuild: disable symbols on --enable-dbgutil --disable-symbols

Due to the setup of gb_DEBUGLEVEL in gbuild.mk, gb_SYMBOL was always
enabled when --enable-dbgutil is set, with no way to override it.
Fix that by turning configure's ENABLE_SYMBOLS into a tri-state, where
the new "FALSE" value, set by an explicit --disable-symbols, overrides
any implicit way of enabling symbols.
But by default an --enable-dbgutil still enables gb_SYMBOL.

Change-Id: I94c609863980ed1ab9c73d7a4861c394442b531d
üst 47919e05
......@@ -82,7 +82,7 @@ CXXFLAGS:=
.IF "$(COM)"=="GCC"
CFLAGS:=-fno-strict-aliasing $(EXTRA_CFLAGS)
CXXFLAGS:=-fno-strict-aliasing $(EXTRA_CFLAGS)
.IF "$(ENABLE_SYMBOLS)"!=""
.IF "$(ENABLE_SYMBOLS)"!="" && "$(ENABLE_SYMBOLS)"!="FALSE"
CFLAGS+=-g
CXXFLAGS+=-g
.ENDIF
......
......@@ -4048,7 +4048,11 @@ if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then
ENABLE_SYMBOLS="TRUE"
AC_MSG_RESULT([yes])
else
ENABLE_SYMBOLS=
if test -n "$enable_symbols" -a "$enable_symbols" = "no"; then
ENABLE_SYMBOLS="FALSE"
else
ENABLE_SYMBOLS=
fi
AC_MSG_RESULT([no])
fi
AC_SUBST(ENABLE_SYMBOLS)
......
......@@ -76,12 +76,6 @@ else
gb_PRODUCT := $(false)
endif
ifneq ($(strip $(ENABLE_SYMBOLS)$(enable_symbols)),)
gb_SYMBOL := $(true)
else
gb_SYMBOL := $(false)
endif
gb_TIMELOG := 0
ifneq ($(strip $(TIMELOG)$(timelog)),)
gb_TIMELOG := 1
......@@ -117,8 +111,18 @@ ENABLE_DEBUG_FOR := all
endif
endif
ifeq ($(or $(ENABLE_SYMBOLS),$(enable_symbols)),FALSE)
gb_SYMBOL := $(false)
else
ifneq ($(strip $(ENABLE_SYMBOLS)$(enable_symbols)),)
gb_SYMBOL := $(true)
else
ifneq ($(gb_DEBUGLEVEL),0)
gb_SYMBOL := $(true)
else
gb_SYMBOL := $(false)
endif
endif
endif
ifneq ($(nodep),)
......
......@@ -1040,7 +1040,7 @@ CDEFS+= -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH)
CDEFS+= -DSUPD=$(UPD)
# flags to enable build with symbols; required for crashdump feature
.IF ("$(ENABLE_CRASHDUMP)"!="" && "$(ENABLE_CRASHDUMP)"!="DUMMY") || "$(ENABLE_SYMBOLS)"!=""
.IF ("$(ENABLE_CRASHDUMP)"!="" && "$(ENABLE_CRASHDUMP)"!="DUMMY") || ("$(ENABLE_SYMBOLS)"!="" && "$(ENABLE_SYMBOLS)"!="FALSE")
# if debug is enabled, this may enable less debug info than debug, so rely just on debug
.IF "$(debug)" == ""
CFLAGSENABLESYMBOLS_CC_ONLY*=$(CFLAGSENABLESYMBOLS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment