summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2020-05-10 11:04:09 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2020-05-10 11:25:28 +0200
commit592e020473b24f845df6002f082e7697c49c799c (patch)
tree6bc23f0cfc9d41ff79f5a86965c0651ecfa67866
parentc9b9973cae634c1d3ea2f5f5b79ee5a6f1f8d5c1 (diff)
downloadOSELAS.Toolchain-592e020473b24f845df6002f082e7697c49c799c.tar.gz
pre/toolchain: simplify TOOLCHAIN_CROSS_DEBUG_MAP
Don't add the same paths twice. So only add `realpath $(PTXDIST_SYSROOT_CROSS)` if it is actually different. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/pre/toolchain.make6
1 files changed, 5 insertions, 1 deletions
diff --git a/rules/pre/toolchain.make b/rules/pre/toolchain.make
index 33627bc..ec948f2 100644
--- a/rules/pre/toolchain.make
+++ b/rules/pre/toolchain.make
@@ -50,9 +50,13 @@ PTXDIST_HOST_LDFLAGS := -L${PTXDIST_PATH_SYSROOT_HOST_PREFIX}/lib
ifndef PTXCONF_TOOLCHAIN_DEBUG
TOOLCHAIN_CROSS_DEBUG_MAP := \
$(PTXDIST_SYSROOT_CROSS)= \
+ $(PTXDIST_WORKSPACE)/platform-=$(call remove_quotes,$(PTXCONF_PROJECT))/platform-
+
+ifneq ($(PTXDIST_SYSROOT_CROSS),$(call ptx/sh, realpath $(PTXDIST_SYSROOT_CROSS)))
+TOOLCHAIN_CROSS_DEBUG_MAP += \
$(call ptx/sh, realpath $(PTXDIST_SYSROOT_CROSS))= \
- $(PTXDIST_WORKSPACE)/platform-=$(call remove_quotes,$(PTXCONF_PROJECT))/platform- \
$(call ptx/sh, realpath $(PTXDIST_WORKSPACE))/platform-=$(call remove_quotes,$(PTXCONF_PROJECT))/platform-
+endif
TOOLCHAIN_CROSS_DEBUG_MAP_FLAGS := \
$(addprefix -fdebug-prefix-map=,$(TOOLCHAIN_CROSS_DEBUG_MAP))