go: use go1.12-bootstrap, disable ppc* BE, disable cross-libc

This commit is contained in:
q66 2018-12-15 04:11:57 +01:00 committed by Michael Aldridge
parent 2d00eb9536
commit b09d6b8779

View file

@ -4,14 +4,13 @@ version=1.13.4
revision=1
create_wrksrc=yes
build_wrksrc=go
hostmakedepends="go1.4-bootstrap"
hostmakedepends="go1.12-bootstrap"
short_desc="Go Programming Language"
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
license="BSD-3-Clause"
homepage="http://golang.org/"
distfiles="https://golang.org/dl/go${version}.src.tar.gz"
checksum=95dbeab442ee2746b9acf0934c8e2fc26414a0565c008631b04addb8c02e7624
nostrip=yes
noverifyrdeps=yes
@ -21,20 +20,27 @@ case "${XBPS_TARGET_MACHINE}" in
mips*) _goarch=mips ;;
i686*) _goarch=386 ;;
x86_64*) _goarch=amd64 ;;
ppc64le*) _goarch=ppc64le ;;
ppc64*) broken="Upstream does not support ELFv2 for big endian ppc64";;
ppc*) broken="Upstream does not support 32-bit ppc";;
*) _goarch=${XBPS_TARGET_MACHINE} ;;
esac
if [ "$CROSS_BUILD" ]; then
if [ "${XBPS_MACHINE%%-musl}" = "${XBPS_TARGET_MACHINE%%-musl}" ]; then
broken="Cross-compiling to different libc is not supported"
fi
fi
do_build() {
unset GCC CC CXX LD CFLAGS
# FIXME: work around leaking go build-style vars when built as a
# dependency
unset CGO_CXXFLAGS CGO_CFLAGS CGO_ENABLED
export GOCACHE=off
export GOROOT_BOOTSTRAP="/usr/lib/go1.12"
export GOROOT=$PWD
export GOROOT_FINAL="/usr/lib/go"
export GOROOT_BOOTSTRAP="/usr/lib/go1.4"
export GOARCH=${_goarch}
cd "src"