aboutsummaryrefslogtreecommitdiffstats
path: root/rules.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2020-06-22 21:44:37 +0200
committerFelix Fietkau <nbd@nbd.name>2020-08-06 12:36:24 +0200
commiteb155f755a0e4308d8b08621649fd76bb917105c (patch)
treedbb65a93ede9a83f856328709d6cb5e6fd627cc3 /rules.mk
parent25e0ae6bfc3bdc05795b988c0b4faec993d71157 (diff)
downloadupstream-eb155f755a0e4308d8b08621649fd76bb917105c.tar.gz
upstream-eb155f755a0e4308d8b08621649fd76bb917105c.tar.bz2
upstream-eb155f755a0e4308d8b08621649fd76bb917105c.zip
build: make prefix mapping of debug information optional
Remapping the local build path in debug information makes debugging using ./scripts/remote-gdb harder, because files no longer refer to the full path on the build host. For local builds, debug information does not need to be reproducible, since it will be stripped out of packages anyway. For buildbot builds, it makes sense to keep debug information reproducible, since the full path is not needed (nor desired) anywhere. Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules.mk b/rules.mk
index e734b4a582..479172de03 100644
--- a/rules.mk
+++ b/rules.mk
@@ -144,7 +144,7 @@ ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_TARGET_uml)),)
ifeq ($(CONFIG_GCC_USE_IREMAP),y)
iremap = -iremap$(1):$(2)
else
- iremap = -ffile-prefix-map=$(1)=$(2)
+ iremap = -f$(if $(CONFIG_REPRODUCIBLE_DEBUG_INFO),file,macro)-prefix-map=$(1)=$(2)
endif
endif