mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
build system: Add explicit DEBUG_FLAGS variable, pass to assembler also
This commit is contained in:
parent
6afea0e81c
commit
a3ce95e482
@ -165,7 +165,7 @@ $(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.cpp $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE
|
||||
|
||||
$(1)/%.o: $$(COMPONENT_PATH)/$(1)/%.S $(COMMON_MAKEFILES) $(COMPONENT_MAKEFILE) | $(1)
|
||||
$$(summary) AS $$@
|
||||
$$(CC) $$(CPPFLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
|
||||
$$(CC) $$(CPPFLAGS) $$(DEBUG_FLAGS) $$(addprefix -I ,$$(COMPONENT_INCLUDES)) $$(addprefix -I ,$$(COMPONENT_EXTRA_INCLUDES)) -I$(1) -c $$< -o $$@
|
||||
|
||||
# CWD is build dir, create the build subdirectory if it doesn't exist
|
||||
$(1):
|
||||
|
@ -241,13 +241,14 @@ OPTIMIZATION_FLAGS = -Og
|
||||
endif
|
||||
|
||||
# Enable generation of debugging symbols
|
||||
OPTIMIZATION_FLAGS += -ggdb
|
||||
# (we generate even in Release mode, as this has no impact on final binary size.)
|
||||
DEBUG_FLAGS ?= -ggdb
|
||||
|
||||
# List of flags to pass to C compiler
|
||||
# If any flags are defined in application Makefile, add them at the end.
|
||||
CFLAGS := $(strip \
|
||||
-std=gnu99 \
|
||||
$(OPTIMIZATION_FLAGS) \
|
||||
$(OPTIMIZATION_FLAGS) $(DEBUG_FLAGS) \
|
||||
$(COMMON_FLAGS) \
|
||||
$(COMMON_WARNING_FLAGS) -Wno-old-style-declaration \
|
||||
$(CFLAGS) \
|
||||
@ -259,7 +260,7 @@ CXXFLAGS := $(strip \
|
||||
-std=gnu++11 \
|
||||
-fno-exceptions \
|
||||
-fno-rtti \
|
||||
$(OPTIMIZATION_FLAGS) \
|
||||
$(OPTIMIZATION_FLAGS) $(DEBUG_FLAGS) \
|
||||
$(COMMON_FLAGS) \
|
||||
$(COMMON_WARNING_FLAGS) \
|
||||
$(CXXFLAGS) \
|
||||
|
Loading…
Reference in New Issue
Block a user