From f4ececc8acceb53297b56aeb87257c90280be5b5 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 Cherry-picked: 087515a --- utils.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/utils.mk b/utils.mk index d41febc176..f58a37ca1e 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 $(CC).") endif override EXTRA_RUSTFLAGS += -C linker=$(CC) + undefine CC endif TRIPLE = $(ARCH)-unknown-linux-$(LIBC)