go: add riscv64

This commit is contained in:
John 2023-01-17 00:10:22 +01:00 committed by John Zimmermann
parent 8bf21c5d51
commit 5de81f076a
2 changed files with 4 additions and 2 deletions

View file

@ -1,7 +1,7 @@
if [ -z "$hostmakedepends" -o "${hostmakedepends##*gcc-go-tools*}" ]; then if [ -z "$hostmakedepends" -o "${hostmakedepends##*gcc-go-tools*}" ]; then
# gc compiler # gc compiler
if [ -z "$archs" ]; then if [ -z "$archs" ]; then
archs="aarch64* armv[567]* i686* x86_64* ppc64le*" archs="aarch64* armv[567]* i686* x86_64* ppc64le* riscv64*"
fi fi
hostmakedepends+=" go" hostmakedepends+=" go"
nopie=yes nopie=yes
@ -9,7 +9,7 @@ else
# gccgo compiler # gccgo compiler
if [ -z "$archs" ]; then if [ -z "$archs" ]; then
# we have support for these in our gcc # 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 fi
if [ "$CROSS_BUILD" ]; then if [ "$CROSS_BUILD" ]; then
# target compiler to use; otherwise it'll just call gccgo # target compiler to use; otherwise it'll just call gccgo
@ -29,6 +29,7 @@ case "$XBPS_TARGET_MACHINE" in
ppc*) export GOARCH=ppc;; ppc*) export GOARCH=ppc;;
mipsel*) export GOARCH=mipsle;; mipsel*) export GOARCH=mipsle;;
mips*) export GOARCH=mips;; mips*) export GOARCH=mips;;
riscv64*) export GOARCH=riscv64;;
esac esac
export GOPATH="${wrksrc}/_build-${pkgname}-xbps" export GOPATH="${wrksrc}/_build-${pkgname}-xbps"

View file

@ -25,6 +25,7 @@ case "${XBPS_TARGET_MACHINE}" in
x86_64*) _goarch=amd64 ;; x86_64*) _goarch=amd64 ;;
ppc64le*) _goarch=ppc64le ;; ppc64le*) _goarch=ppc64le ;;
mips*) _goarch=mips ;; mips*) _goarch=mips ;;
riscv64*) _goarch=riscv64 ;;
*) broken="Unsupported architecture ${XBPS_TARGET_MACHINE}" ;; *) broken="Unsupported architecture ${XBPS_TARGET_MACHINE}" ;;
esac esac