agent: unset CC for cross-build

When `HOST_ARCH` != `ARCH` unset `CC`

Specifying a foreign CC is incompatible with building libgit2. Thus after the RUSTFLAGS linker
has been set we can safely unset CC to avoid passing this value through the build.

Fixes: #5890

Signed-off-by: James Tumber <james.tumber@ibm.com>
This commit is contained in:
James Tumber 2022-12-13 14:02:25 +00:00
parent 3952fedcd0
commit 087515a46e

View File

@ -169,6 +169,7 @@ ifneq ($(HOST_ARCH),$(ARCH))
$(warning "WARNING: A foreign ARCH was passed, but no CC alternative. Using gcc.")
endif
override EXTRA_RUSTFLAGS += -C linker=$(CC)
undefine CC
endif
TRIPLE = $(ARCH)-unknown-linux-$(LIBC)