From ec937e4d293c642dc45c20deef479dc79d80751a Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 11 Nov 2019 03:03:14 +0100 Subject: [PATCH] environment/build-style/go.sh: specify a default set of archs This is necessary so that crossbuilds to unsupported architectures are not actually attempted. There is a default archs set which covers all architectures supported by the official compiler, and setting it in the template can be used to restrict it more. Also, add missing GOARCHs. These are irrelevant to whether we can currently build for that arch or not. Just keep it around as a list of potential archs to support. These are taken from gccgo, and in case support for anything is added in the official compiler, they should match. --- common/environment/build-style/go.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/environment/build-style/go.sh b/common/environment/build-style/go.sh index 3e6c64f5c8..361166b297 100644 --- a/common/environment/build-style/go.sh +++ b/common/environment/build-style/go.sh @@ -1,15 +1,22 @@ +if [ -z "$archs" ]; then + archs="aarch64* armv[67]* i686* x86_64* ppc64le*" +fi hostmakedepends+=" go" nostrip=yes nopie=yes case "$XBPS_TARGET_MACHINE" in aarch64*) export GOARCH=arm64;; + armv5*) export GOARCH=arm; export GOARM=5;; armv6*) export GOARCH=arm; export GOARM=6;; armv7*) export GOARCH=arm; export GOARM=7;; i686*) export GOARCH=386;; x86_64*) export GOARCH=amd64;; ppc64le*) export GOARCH=ppc64le;; ppc64*) export GOARCH=ppc64;; + ppc*) export GOARCH=ppc;; + mipsel*) export GOARCH=mipsle;; + mips*) export GOARCH=mips;; esac export GOPATH="${wrksrc}/_build-${pkgname}-xbps"