Makefile: Include debug symbols in the .elf
Signed-off-by: Sergey Alirzaev <zl29ah@gmail.com>
This commit is contained in:
parent
b513d085a5
commit
c19d1fbb59
4
Makefile
4
Makefile
|
@ -29,10 +29,10 @@ dirs-y = src
|
|||
cc-option=$(shell if test -z "`$(1) $(2) -S -o /dev/null -xc /dev/null 2>&1`" \
|
||||
; then echo "$(2)"; else echo "$(3)"; fi ;)
|
||||
|
||||
CFLAGS := -I$(OUT) -Isrc -I$(OUT)board-generic/ -std=gnu11 -O2 -MD -g \
|
||||
CFLAGS := -I$(OUT) -Isrc -I$(OUT)board-generic/ -std=gnu11 -O2 -MD \
|
||||
-Wall -Wold-style-definition $(call cc-option,$(CC),-Wtype-limits,) \
|
||||
-ffunction-sections -fdata-sections
|
||||
CFLAGS += -flto -fwhole-program -fno-use-linker-plugin
|
||||
CFLAGS += -flto -fwhole-program -fno-use-linker-plugin -ggdb3
|
||||
|
||||
OBJS_klipper.elf = $(patsubst %.c, $(OUT)src/%.o,$(src-y))
|
||||
OBJS_klipper.elf += $(OUT)compile_time_request.o
|
||||
|
|
|
@ -3,7 +3,9 @@ SECTIONS
|
|||
{
|
||||
/* binutils on the PRU doesn't support --gc-sections so manually
|
||||
* discard the .compile_time_request section */
|
||||
/* and GDB extended debugging information */
|
||||
/DISCARD/ : {
|
||||
*( .compile_time_request )
|
||||
*( .gnu.debug* )
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue