Skip to contentSkip to conversation

kbuild: Don't mandate gcc as the host compiler

PATCH In review Mark Kettenis 5 participants 6 messages Jul 12, 2025 – Jul 21, 2025 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
index e8f12716640..121ebd5c353 100644
@@ -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
Signature · 1 line
2.49.0
#1 lore raw
Quoted 8 lines

From: Mark Kettenis <[email protected]>
Date: Sat, 12 Jul 2025 12:45:58 +0200

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")

Just realized I forgot my Signed-of-by tag. So:

Or should I resend the patch with that included?

Quoted 23 lines
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
index e8f12716640..121ebd5c353 100644
@@ -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
Signature · 1 line
2.49.0
#2 lore raw

Hi Mark,

Quoted 7 lines · Mark Kettenis
Quoted 7 lines

From: Mark Kettenis <[email protected]>
Date: Sat, 12 Jul 2025 12:45:58 +0200

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.

Quoted 8 lines
Quoted 1 line
Fixes 5f520875bdf0 ("kbuild: Bump the build system to 5.1")

Just realized I forgot my Signed-of-by tag. So:

Or should I resend the patch with that included?

I would recommend resending the patch so that it's less work for maintainer(s) when applying the patch.

Cheers,
Quentin

#3 lore raw
Quoted 14 lines · Quentin Schulz

Hi Mark,

Quoted 11 lines · Mark Kettenis
Quoted 8 lines

From: Mark Kettenis <[email protected]>
Date: Sat, 12 Jul 2025 12:45:58 +0200

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")

Just realized I forgot my Signed-of-by tag. So:

Quoted 7 lines
Quoted 4 lines

Or should I resend the patch with that included?

I would recommend resending the patch so that it's less work for maintainer(s) when applying the patch.

I "b4 shazam -S" most things, so this is fine with me as-is, FWIW.

Signature · 1 line
Tom
#4 lore raw
In reply to Mark Kettenis
Quoted 5 lines · Mark Kettenis

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.

Applied to u-boot/master, thanks!

[1/1] kbuild: Don't mandate gcc as the host compiler

      commit: bd0ade7d090a334b3986936d63a34001d99722ad
Signature · 1 line
Tom
#5 lore raw

I was on PTO but fwiw this looks ok to me

Cheers
/Ilias

Quoted 17 lines · Tom Rini
Quoted 5 lines · Mark Kettenis

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.

Applied to u-boot/master, thanks!

[1/1] kbuild: Don't mandate gcc as the host compiler

      commit: bd0ade7d090a334b3986936d63a34001d99722ad

--
Tom