[Buildroot] [PATCH 2/5] package/go: fix builds on GCC 15

Peter Korsgaard peter at korsgaard.com
Sat May 17 07:11:32 UTC 2025


>>>>> "Felicitas" == Felicitas Pojtinger <felicitas at pojtinger.com> writes:

 > Signed-off-by: Felicitas Pojtinger <felicitas at pojtinger.com>
 > ---
 >  package/go/go-bootstrap-stage1/go-bootstrap-stage1.mk | 3 ++-
 >  1 file changed, 2 insertions(+), 1 deletion(-)

 > diff --git a/package/go/go-bootstrap-stage1/go-bootstrap-stage1.mk b/package/go/go-bootstrap-stage1/go-bootstrap-stage1.mk
 > index 3e4ee574329..3d536a35596 100644
 > --- a/package/go/go-bootstrap-stage1/go-bootstrap-stage1.mk
 > +++ b/package/go/go-bootstrap-stage1/go-bootstrap-stage1.mk
 > @@ -17,12 +17,13 @@ HOST_GO_BOOTSTRAP_STAGE1_ROOT = $(HOST_DIR)/lib/go-$(GO_BOOTSTRAP_STAGE1_VERSION
 
 >  # The go build system is not compatible with ccache, so use
 >  # HOSTCC_NOCCACHE. See https://github.com/golang/go/issues/11685.
 > +# CFLAGS and GO_CCFLAGS have no effect, so overwrite CC directly.
 >  HOST_GO_BOOTSTRAP_STAGE1_MAKE_ENV = \
 >  	GOOS=linux \
 >  	GOROOT_FINAL="$(HOST_GO_BOOTSTRAP_STAGE1_ROOT)" \
 >  	GOROOT="$(@D)" \
 >  	GOBIN="$(@D)/bin" \
 > -	CC=$(HOSTCC_NOCCACHE) \
 > +	CC="$(HOSTCC_NOCCACHE) -std=gnu17" \

Does it have to be gnu17 specifically or could we use gnu99? We do
support older HOSTCC versions that do not support gnu17.

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list