From bddda2a0cfc4eb51a093e887dff47097459ec9d1 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Sat, 29 Apr 2017 22:52:55 +0800 Subject: [PATCH] Makefile: strip build path prefix from debug info --- Makefile | 3 +++ 1 file changed, 3 insertions(+) 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