From 9cb125593132efed70ee67033607c63bc705c621 Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Mon, 17 Jan 2022 14:15:21 -0500 Subject: [PATCH] Do not add CPPFLAGS/CFLAGS to HOST_CPPFLAGS/HOST_CFLAGS When cross compiling, these variables may contain flags that are not compatible with both toolchains. Signed-off-by: Mike Gilbert --- src/include/defaults.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/defaults.mk b/src/include/defaults.mk index 9024a3a1..25e32694 100644 --- a/src/include/defaults.mk +++ b/src/include/defaults.mk @@ -71,13 +71,13 @@ override SOFLAGS = $(_SOFLAGS) \ -Wl,--version-script=$(MAP) \ $(call family,SOFLAGS) -HOST_CPPFLAGS ?= $(CPPFLAGS) +HOST_CPPFLAGS ?= override _HOST_CPPFLAGS := $(HOST_CPPFLAGS) override HOST_CPPFLAGS = $(_HOST_CPPFLAGS) \ -DEFIVAR_BUILD_ENVIRONMENT HOST_CFLAGS_GCC ?= HOST_CFLAGS_CLANG ?= -HOST_CFLAGS ?= $(CFLAGS) $(call family,HOST_CFLAGS) +HOST_CFLAGS ?= $(call family,HOST_CFLAGS) override _HOST_CFLAGS := $(HOST_CFLAGS) override HOST_CFLAGS = $(_HOST_CFLAGS) HOST_LDFLAGS_CLANG ?= -Wl,--fatal-warnings,-z,relro -rtlib=compiler-rt