toolchain,build: prefer -ffile-prefix-map for gcc-8+
authorPaul Spooren <mail@aparcar.org>
Wed, 9 Oct 2019 04:41:00 +0000 (06:41 +0200)
committerPetr Štetiar <ynezz@true.cz>
Wed, 9 Oct 2019 07:13:44 +0000 (09:13 +0200)
-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>
rules.mk
toolchain/gcc/Config.in
toolchain/gcc/Config.version

index f1ca735f2ed212c4675c9a99d4591b7d8ac9e4b9..fbf42f725ddddba12c2d4b074347647b46ab23e0 100644 (file)
--- 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
 
index 0977f9b4e725729dbb6ebae437aad3dfc00e33a0..2c592a904b72e5bf786b03ed3a532be93ff40c70 100644 (file)
@@ -22,6 +22,11 @@ choice
                bool "gcc 9.x"
 endchoice
 
+config GCC_USE_IREMAP
+       default y if ( GCC_USE_VERSION_5 || GCC_USE_VERSION_7 )
+       default n
+       bool
+
 config GCC_USE_GRAPHITE
        bool
        prompt "Compile in support for the new Graphite framework in GCC 4.4+" if TOOLCHAINOPTS
index d9732b3e0ddca02f454165b24b955ae7d487c805..fd8d3873fa8ebb925332b2779f794642f37fb382 100644 (file)
@@ -11,11 +11,6 @@ config GCC_VERSION_9
        default y if GCC_USE_VERSION_9
        bool
 
-config GCC_USE_EMBEDDED_PATH_REMAP
-       default y if ( GCC_VERSION_8 || GCC_VERSION_9 )
-       default n
-       bool
-
 config GCC_VERSION
        string
        default "5.5.0"         if GCC_VERSION_5