From: Syrone Wong Date: Thu, 21 Jun 2018 15:08:11 +0000 (+0800) Subject: rules.mk: replace iremap when using GCC 8 X-Git-Tag: v19.07.0-rc1~3114 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=da9d760ea1c0450e9e6b1c0cdd5331e633c75887;p=openwrt%2Fopenwrt.git 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 --- diff --git a/rules.mk b/rules.mk index b1ecc24fab..d90e0ffed0 100644 --- a/rules.mk +++ b/rules.mk @@ -141,6 +141,10 @@ endif ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_GCC_VERSION_4_8),$(CONFIG_TARGET_uml)),) 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 PACKAGE_DIR:=$(BIN_DIR)/packages