From d83422d1c06058b66762477d9dcd008ff70bf485 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Thu, 24 Sep 2020 07:36:01 +0200 Subject: [PATCH] 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 --- lfs/binutils | 2 ++ lfs/ccache | 5 ++++- lfs/gcc | 4 +++- lfs/glibc | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) 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 # -- 2.39.5