diff --git a/Makefile b/Makefile index 4d975ea3b..e48e869f1 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ OBJCOPY := $(TOOLCHAIN_PREFIX)objcopy XTENSA_LIBS ?= $(shell $(CC) -print-sysroot) +TOOLCHAIN_DIR=$(shell cd $(XTENSA_LIBS)/../../; pwd) OBJ_FILES := \ crypto/aes.o \ @@ -45,6 +46,8 @@ CFLAGS += -Wall -Os -g -O2 -Wpointer-arith -Wl,-EL -nostdlib -mlongcalls -mno-te CFLAGS += -ffunction-sections -fdata-sections +CFLAGS += -fdebug-prefix-map=$(PWD)= -fdebug-prefix-map=$(TOOLCHAIN_DIR)=xtensa-lx106-elf -gno-record-gcc-switches + MFORCE32 := $(shell $(CC) --help=target | grep mforce-l32) ifneq ($(MFORCE32),) # If the compiler supports the -mforce-l32 flag, the compiler will generate correct code for loading