gcc: remove CCFLAGS only in pass1 of the toolchain

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Arne Fitzenreiter
2021-07-01 08:42:36 +02:00
parent 4301024b82
commit 05c54e822e

View File

@@ -35,13 +35,13 @@ DL_FILE = $(THISAPP).tar.xz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
ifeq "$(PASS)" "1"
CFLAGS := $(patsubst -march=%,,$(CFLAGS))
CFLAGS := $(patsubst -mfpu=%,,$(CFLAGS))
CFLAGS := $(patsubst -mtune=%,,$(CFLAGS))
CFLAGS := $(patsubst -mfloat-abi=%,,$(CFLAGS))
CFLAGS := $(filter-out -fexceptions,$(CFLAGS))
ifeq "$(PASS)" "1"
CFLAGS := $(patsubst -mindirect-branch=%,,$(CFLAGS))
CFLAGS := $(patsubst -mfunction-return=%,,$(CFLAGS))
CFLAGS := $(patsubst -fstack-clash-protection,,$(CFLAGS))