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
@@ -34,8 +34,9 @@ endif
|
||||
CSUPEROPT = -Os # save some code space
|
||||
|
||||
# Tune for Debugging or Optimization
|
||||
CFLAGS += -g # always include debug info in the ELF
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -ggdb
|
||||
CFLAGS += -O0
|
||||
else
|
||||
CFLAGS += -Os -DNDEBUG
|
||||
CFLAGS += -fdata-sections -ffunction-sections
|
||||
|
||||
Reference in New Issue
Block a user