From 5de81f076a743431ae2acafa81d0f1f15760d103 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 17 Jan 2023 00:10:22 +0100 Subject: [PATCH] go: add riscv64 --- common/environment/build-style/go.sh | 5 +++-- srcpkgs/go/template | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/environment/build-style/go.sh b/common/environment/build-style/go.sh index 74db82b2a1c..223bba83ff1 100644 --- a/common/environment/build-style/go.sh +++ b/common/environment/build-style/go.sh @@ -1,7 +1,7 @@ if [ -z "$hostmakedepends" -o "${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* riscv64*" fi hostmakedepends+=" go" nopie=yes @@ -9,7 +9,7 @@ else # gccgo compiler if [ -z "$archs" ]; then # we have support for these in our gcc - archs="aarch64* armv[567]* i686* x86_64* ppc64*" + archs="aarch64* armv[567]* i686* x86_64* ppc64* riscv64*" fi if [ "$CROSS_BUILD" ]; then # target compiler to use; otherwise it'll just call gccgo @@ -29,6 +29,7 @@ case "$XBPS_TARGET_MACHINE" in ppc*) export GOARCH=ppc;; mipsel*) export GOARCH=mipsle;; mips*) export GOARCH=mips;; + riscv64*) export GOARCH=riscv64;; esac export GOPATH="${wrksrc}/_build-${pkgname}-xbps" diff --git a/srcpkgs/go/template b/srcpkgs/go/template index dea0969cdb0..d077161ff44 100644 --- a/srcpkgs/go/template +++ b/srcpkgs/go/template @@ -25,6 +25,7 @@ case "${XBPS_TARGET_MACHINE}" in x86_64*) _goarch=amd64 ;; ppc64le*) _goarch=ppc64le ;; mips*) _goarch=mips ;; + riscv64*) _goarch=riscv64 ;; *) broken="Unsupported architecture ${XBPS_TARGET_MACHINE}" ;; esac