build-style/go: allow usage with gccgo compiler
This checks if gcc-go-tools have been specified in host deps and if so, use gccgo to build (gcc-go-tools conflicts with go). Also, since gccgo is not a multi-compiler, we need to override GCCGO to get cross-builds. The gccgo for target is always installed, as it's a part of our cross-toolchains. [ci skip]
This commit is contained in:
parent
f5e86977ee
commit
1b2bf53e82
|
@ -1,9 +1,18 @@
|
||||||
if [ -z "$archs" ]; then
|
if [ "${hostmakedepends##*gcc-go-tools*}" ]; then
|
||||||
|
# gc compiler
|
||||||
|
if [ -z "$archs" ]; then
|
||||||
archs="aarch64* armv[567]* i686* x86_64* ppc64le*"
|
archs="aarch64* armv[567]* i686* x86_64* ppc64le*"
|
||||||
|
fi
|
||||||
|
hostmakedepends+=" go"
|
||||||
|
nopie=yes
|
||||||
|
else
|
||||||
|
# gccgo compiler
|
||||||
|
if [ "$CROSS_BUILD" ]; then
|
||||||
|
# target compiler to use; otherwise it'll just call gccgo
|
||||||
|
export GCCGO="${XBPS_CROSS_TRIPLET}-gccgo"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
hostmakedepends+=" go"
|
|
||||||
nostrip=yes
|
nostrip=yes
|
||||||
nopie=yes
|
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
aarch64*) export GOARCH=arm64;;
|
aarch64*) export GOARCH=arm64;;
|
||||||
|
|
Loading…
Reference in New Issue