From: Arne Fitzenreiter Date: Thu, 24 Sep 2020 05:36:01 +0000 (+0200) Subject: toolchain: fix build with gcc<8 on builder. X-Git-Tag: v2.25-core149~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d83422d1c06058b66762477d9dcd008ff70bf485;p=ipfire-2.x.git toolchain: fix build with gcc<8 on builder. gcc-7 not support -fcf-protection so filter it from CFLAGS. also filter -mtune in first pass because it should optimized for the actual host. Signed-off-by: Arne Fitzenreiter --- diff --git a/lfs/binutils b/lfs/binutils index 334adad258..6db2e990f0 100644 --- a/lfs/binutils +++ b/lfs/binutils @@ -51,6 +51,8 @@ ifeq "$(PASS)" "1" CFLAGS := $(patsubst -mfloat-abi=%,,$(CFLAGS)) CFLAGS := $(patsubst -mindirect-branch=%,,$(CFLAGS)) CFLAGS := $(patsubst -mfunction-return=%,,$(CFLAGS)) + CFLAGS := $(patsubst -fstack-clash-protection,,$(CFLAGS)) + CFLAGS := $(patsubst -fcf-protection,,$(CFLAGS)) TARGET = $(DIR_INFO)/$(THISAPP)-tools1 EXTRA_CONFIG = \ diff --git a/lfs/ccache b/lfs/ccache index 94d7bd149e..1361f3ed07 100644 --- a/lfs/ccache +++ b/lfs/ccache @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2018 IPFire Team # +# Copyright (C) 2007-2020 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -34,10 +34,13 @@ TARGET = $(DIR_INFO)/$(THISAPP)-pass$(PASS) ifeq "$(PASS)" "1" CFLAGS := $(patsubst -march=%,,$(CFLAGS)) + CFLAGS := $(patsubst -mtune=%,,$(CFLAGS)) CFLAGS := $(patsubst -mfpu=%,,$(CFLAGS)) CFLAGS := $(patsubst -mfloat-abi=%,,$(CFLAGS)) CFLAGS := $(patsubst -mindirect-branch=%,,$(CFLAGS)) CFLAGS := $(patsubst -mfunction-return=%,,$(CFLAGS)) + CFLAGS := $(patsubst -fstack-clash-protection,,$(CFLAGS)) + CFLAGS := $(patsubst -fcf-protection,,$(CFLAGS)) endif ############################################################################### diff --git a/lfs/gcc b/lfs/gcc index 7cbc8e9e84..3aa147ce81 100644 --- a/lfs/gcc +++ b/lfs/gcc @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2018 IPFire Team # +# Copyright (C) 2007-2020 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -44,6 +44,8 @@ CFLAGS := $(filter-out -fexceptions,$(CFLAGS)) ifeq "$(PASS)" "1" CFLAGS := $(patsubst -mindirect-branch=%,,$(CFLAGS)) CFLAGS := $(patsubst -mfunction-return=%,,$(CFLAGS)) +CFLAGS := $(patsubst -fstack-clash-protection,,$(CFLAGS)) +CFLAGS := $(patsubst -fcf-protection,,$(CFLAGS)) endif CXXFLAGS := $(CFLAGS) diff --git a/lfs/glibc b/lfs/glibc index 802c372a90..281c290dcd 100644 --- a/lfs/glibc +++ b/lfs/glibc @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2018 IPFire Team # +# Copyright (C) 2007-2020 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by #