aboutsummaryrefslogtreecommitdiffstats
path: root/rules.mk
diff options
context:
space:
mode:
authorPaul Spooren <mail@aparcar.org>2019-10-09 06:41:00 +0200
committerPetr Štetiar <ynezz@true.cz>2019-10-09 09:13:44 +0200
commitbd4d3cd1017feb469efa3112d2f92408a420be35 (patch)
tree9b1718dfdd3bcf7f5f3116c31bebb6184054c2d9 /rules.mk
parenta9e4e595e1869083aa1027c65a2718567cd6a3bd (diff)
downloadupstream-bd4d3cd1017feb469efa3112d2f92408a420be35.tar.gz
upstream-bd4d3cd1017feb469efa3112d2f92408a420be35.tar.bz2
upstream-bd4d3cd1017feb469efa3112d2f92408a420be35.zip
toolchain,build: prefer -ffile-prefix-map for gcc-8+
-ffile-prefix-map=OLD=NEW is an alias for both -fdebug-prefix-map and -fmacro-prefix-map and is available since GCC 8. Co-Developed-by: Andre Heider <a.heider@gmail.com> Signed-off-by: Andre Heider <a.heider@gmail.com> Signed-off-by: Paul Spooren <mail@aparcar.org> [refactored into separate commit] Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/rules.mk b/rules.mk
index f1ca735f2e..fbf42f725d 100644
--- a/rules.mk
+++ b/rules.mk
@@ -140,11 +140,11 @@ else
TOOLCHAIN_DIR_NAME:=toolchain-$(GNU_TARGET_NAME)
endif
-ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_GCC_VERSION_4_8),$(CONFIG_TARGET_uml)),)
- ifeq ($(CONFIG_GCC_USE_EMBEDDED_PATH_REMAP),y)
- iremap = -fmacro-prefix-map=$(1)=$(2)
- else
+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)
endif
endif