HI,

I'm not sure whether it's the correct way to deal with the flag. When
we add GCC 9 in the future, we have to remember to apply this dirty
overwrite hack as well.
Please feel free to share more elegant ways.


Best Regards,
Syrone Wong


On Thu, Jun 21, 2018 at 11:08 PM,  <wong.syr...@gmail.com> wrote:
> From: Syrone Wong <wong.syr...@gmail.com>
>
> The original -iremap is replaced by -fmacro-prefix-map in GCC 8
>
> Signed-off-by: Syrone Wong <wong.syr...@gmail.com>
> ---
>  rules.mk | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/rules.mk b/rules.mk
> index a97b2d2155..8eb8e21a7e 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
> --
> 2.17.1
>

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel

Reply via email to