Skip to content

Commit

Permalink
Do not add CPPFLAGS/CFLAGS to HOST_CPPFLAGS/HOST_CFLAGS
Browse files Browse the repository at this point in the history
When cross compiling, these variables may contain flags that are not
compatible with both toolchains.

Signed-off-by: Mike Gilbert <[email protected]>
  • Loading branch information
floppym committed Jan 17, 2022
1 parent 43d19f2 commit 9cb1255
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/include/defaults.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9cb1255

Please sign in to comment.