kernel: backport rtc ds1308 support to 4.9
[openwrt/openwrt.git] / rules.mk
index b1ecc24fab1f9a97a4dd4a7a5c17753996003977..2af63520162d933607d6cda2230d409a169560b3 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -140,7 +140,11 @@ else
 endif
 
 ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_GCC_VERSION_4_8),$(CONFIG_TARGET_uml)),)
-  iremap = -iremap$(1):$(2)
+  ifeq ($(CONFIG_GCC_USE_EMBEDDED_PATH_REMAP),y)
+    iremap = -fmacro-prefix-map=$(1)=$(2)
+  else
+    iremap = -iremap$(1):$(2)
+  endif
 endif
 
 PACKAGE_DIR:=$(BIN_DIR)/packages