Skip to content

Commit bddda2a

Browse files
committed
Makefile: strip build path prefix from debug info
1 parent 78c2449 commit bddda2a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ OBJCOPY := $(TOOLCHAIN_PREFIX)objcopy
66

77
XTENSA_LIBS ?= $(shell $(CC) -print-sysroot)
88

9+
TOOLCHAIN_DIR=$(shell cd $(XTENSA_LIBS)/../../; pwd)
910

1011
OBJ_FILES := \
1112
crypto/aes.o \
@@ -45,6 +46,8 @@ CFLAGS += -Wall -Os -g -O2 -Wpointer-arith -Wl,-EL -nostdlib -mlongcalls -mno-te
4546

4647
CFLAGS += -ffunction-sections -fdata-sections
4748

49+
CFLAGS += -fdebug-prefix-map=$(PWD)= -fdebug-prefix-map=$(TOOLCHAIN_DIR)=xtensa-lx106-elf -gno-record-gcc-switches
50+
4851
MFORCE32 := $(shell $(CC) --help=target | grep mforce-l32)
4952
ifneq ($(MFORCE32),)
5053
# If the compiler supports the -mforce-l32 flag, the compiler will generate correct code for loading

0 commit comments

Comments
 (0)