On 3/14/26 5:31 AM, James Le Cuirot wrote: > Some Go arch-specific variables can be set automatically based on the > tuple alone. Others cannot feasibly be determined automatically and must > therefore be set by the user. It is sometimes necessary to build Go code > for CBUILD, so use BUILD_GO* variables in case CHOST is a more advanced > model of CBUILD's architecture. > > Signed-off-by: James Le Cuirot <[email protected]> > --- > eclass/toolchain-funcs.eclass | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass > index 2b57fc118705..85d90f4579ef 100644 > --- a/eclass/toolchain-funcs.eclass > +++ b/eclass/toolchain-funcs.eclass > @@ -369,6 +369,10 @@ tc-export_build_env() { > : "${BUILD_CXXFLAGS:=${CXXFLAGS}}" > : "${BUILD_CPPFLAGS:=${CPPFLAGS}}" > : "${BUILD_LDFLAGS:=${LDFLAGS}}" > + : "${BUILD_GOAMD64:=${GOAMD64}}" > + : "${BUILD_GOARM64:=${GOARM64}}" > + : "${BUILD_GOPPC64:=${GOPPC64}}" > + : "${BUILD_GORISCV64:=${GORISCV64}}"
Would it make sense to only do this when go-env has been inherited, to
avoid cluttering the env?
> fi
> export BUILD_{C,CXX,CPP,LD}FLAGS
>
> @@ -392,6 +396,10 @@ tc-env_build() {
> CXXFLAGS=${BUILD_CXXFLAGS} \
> CPPFLAGS=${BUILD_CPPFLAGS} \
> LDFLAGS=${BUILD_LDFLAGS} \
> + GOAMD64=${BUILD_GOAMD64} \
> + GOARM64=${BUILD_GOARM64} \
> + GOPPC64=${BUILD_GOPPC64} \
> + GORISCV64=${BUILD_GORISCV64} \
> AR=$(tc-getBUILD_AR) \
> AS=$(tc-getBUILD_AS) \
> CC=$(tc-getBUILD_CC) \
--
Eli Schwartz
OpenPGP_signature.asc
Description: OpenPGP digital signature
