mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-18 21:28:02 +00:00
toolchain/gcc: add config symbol to determine how to apply path remapping
Added boolean symbol for GCC 8 and higher, when we add newer GCC, we don't have
to modify rules.mk to keep things consistant.
Fixes: da9d760
("rules.mk: replace iremap when using GCC 8")
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
This commit is contained in:
parent
fc9cbf3bc0
commit
713cee6463
6
rules.mk
6
rules.mk
@ -140,10 +140,10 @@ else
|
|||||||
endif
|
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)
|
ifeq ($(CONFIG_GCC_USE_EMBEDDED_PATH_REMAP),y)
|
||||||
# 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)
|
iremap = -fmacro-prefix-map=$(1)=$(2)
|
||||||
|
else
|
||||||
|
iremap = -iremap$(1):$(2)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -10,6 +10,11 @@ config GCC_VERSION_8
|
|||||||
default y if GCC_USE_VERSION_8
|
default y if GCC_USE_VERSION_8
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
config GCC_USE_EMBEDDED_PATH_REMAP
|
||||||
|
default y if GCC_VERSION_8
|
||||||
|
default n
|
||||||
|
bool
|
||||||
|
|
||||||
config GCC_VERSION
|
config GCC_VERSION
|
||||||
string
|
string
|
||||||
default "5.5.0" if GCC_VERSION_5
|
default "5.5.0" if GCC_VERSION_5
|
||||||
|
Loading…
Reference in New Issue
Block a user