ports: Always include debug information in the ELF.
For bare metal ARM & xtensa targets, passing -g will make the ELF file larger but doesn't change the binary size. However, this means tools like gdb, addr2line, etc can extract source-level information from the ELF. Also standardise -ggdb to -g, these produce the exact same ELF file on arm-none-eabi-gcc and will use DWARF format for all these ports.
This commit is contained in:
committed by
Damien George
parent
3c32ca6e77
commit
fdfe4eca74
@@ -297,8 +297,9 @@ SRC_QSTR += \
|
||||
# Compiler Flags
|
||||
# =============================================================================
|
||||
|
||||
CFLAGS += -g # always include debug info in the ELF
|
||||
ifeq ($(DEBUG),1)
|
||||
CFLAGS += -Og -ggdb
|
||||
CFLAGS += -Og
|
||||
else
|
||||
CFLAGS += -Os -DNDEBUG
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user