build: make prefix mapping of debug information optional
[openwrt/staging/chunkeey.git] / rules.mk
index e734b4a582939cb192724f931d2b1492eb3d85bb..479172de033df5c4e3463f2cef2abb229b8685b5 100644 (file)
--- 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