Browse Source

rules.mk: replace iremap when using GCC 8

The original -iremap is replaced by -fmacro-prefix-map in GCC 8

Signed-off-by: Syrone Wong <[email protected]>
Syrone Wong 7 years ago
parent
commit
da9d760ea1
1 changed files with 4 additions and 0 deletions
  1. 4 0
      rules.mk

+ 4 - 0
rules.mk

@@ -141,6 +141,10 @@ endif
 
 
 ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_GCC_VERSION_4_8),$(CONFIG_TARGET_uml)),)
 ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_GCC_VERSION_4_8),$(CONFIG_TARGET_uml)),)
   iremap = -iremap$(1):$(2)
   iremap = -iremap$(1):$(2)
+  # just overwrite iremap for GCC 8.1 and higher to keep backward compatibility
+  ifeq ($(CONFIG_GCC_VERSION_8),y)
+    iremap = -fmacro-prefix-map=$(1)=$(2)
+  endif
 endif
 endif
 
 
 PACKAGE_DIR:=$(BIN_DIR)/packages
 PACKAGE_DIR:=$(BIN_DIR)/packages