From 087515a46e7da7cb202325566d481fe54a16dda1 Mon Sep 17 00:00:00 2001 From: James Tumber Date: Tue, 13 Dec 2022 14:02:25 +0000 Subject: [PATCH] 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 --- utils.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/utils.mk b/utils.mk index a7d559d347..27768809c8 100644 --- a/utils.mk +++ b/utils.mk @@ -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)