From: Mark Kettenis Date: Sat, 12 Jul 2025 10:45:58 +0000 (+0200) Subject: kbuild: Don't mandate gcc as the host compiler X-Git-Tag: v2025.10-rc1~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd0ade7d090a334b3986936d63a34001d99722ad;p=thirdparty%2Fu-boot.git kbuild: Don't mandate gcc as the host compiler Systems that use clang may not have gcc installed. Set HOSTCC to cc and HOSTCXX to c++ like we did before to make those systems work again. Fixes: 5f520875bdf0 ("kbuild: Bump the build system to 5.1") Signed-off-by: Mark Kettenis --- diff --git a/Makefile b/Makefile index a0f07c9f5c2..6a0251373c4 100644 --- a/Makefile +++ b/Makefile @@ -416,8 +416,8 @@ HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS 2>/dev/null) HOST_LFS_LDFLAGS := $(shell getconf LFS_LDFLAGS 2>/dev/null) HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null) -HOSTCC = gcc -HOSTCXX = g++ +HOSTCC = cc +HOSTCXX = c++ KBUILD_HOSTCFLAGS := -Wall -Wstrict-prototypes -O2 \ -fomit-frame-pointer -std=gnu11 $(HOST_LFS_CFLAGS) \ $(HOSTCFLAGS) #-Wmissing-prototypes Enable it and fix warnings