diff options
author | tnn <tnn@pkgsrc.org> | 2020-05-01 20:57:43 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2020-05-01 20:57:43 +0000 |
commit | 6fc2e12c0f23dba885f1bbbcce5345f6ce51b53b (patch) | |
tree | 3cae5b3c5fbd52b4e157d4fb00db12e254b91854 /devel | |
parent | 219328b9d80d792c74dc3ee2dbd1bfd98dc56a7f (diff) | |
download | pkgsrc-6fc2e12c0f23dba885f1bbbcce5345f6ce51b53b.tar.gz |
go-sys: Fix SIGILL on netbsd/arm64
Diffstat (limited to 'devel')
-rw-r--r-- | devel/go-sys/Makefile | 7 | ||||
-rw-r--r-- | devel/go-sys/distinfo | 3 | ||||
-rw-r--r-- | devel/go-sys/patches/patch-cpu_cpu__arm64.go | 21 |
3 files changed, 28 insertions, 3 deletions
diff --git a/devel/go-sys/Makefile b/devel/go-sys/Makefile index 5a6f9630a34..6c4af2ed389 100644 --- a/devel/go-sys/Makefile +++ b/devel/go-sys/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.27 2020/04/12 11:01:34 bsiegert Exp $ +# $NetBSD: Makefile,v 1.28 2020/05/01 20:57:43 tnn Exp $ # DISTNAME= go-sys-0.0.20200202 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GITHUB:=golang/} GITHUB_PROJECT= sys @@ -23,6 +23,9 @@ REPLACE_BASH+= plan9/*.sh unix/*.sh windows/*.bash pre-patch: ${RM} -rf ${WRKSRC}/windows/mkwinsyscall +pre-build: + ${RM} -f ${WRKSRC}/*/*.go.orig + .include "../../lang/go/go-package.mk" .include "../../lang/perl5/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/devel/go-sys/distinfo b/devel/go-sys/distinfo index 3b3cf92325a..6b6c4ef04ef 100644 --- a/devel/go-sys/distinfo +++ b/devel/go-sys/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.4 2020/02/03 15:00:29 bsiegert Exp $ +$NetBSD: distinfo,v 1.5 2020/05/01 20:57:43 tnn Exp $ SHA1 (go-sys-0.0.20200202-d101bd2416.tar.gz) = d428638aaf94785499f3a8960088bfe30591db5d RMD160 (go-sys-0.0.20200202-d101bd2416.tar.gz) = b7b953b649c43d44d4eeb15b6598954ce2c06b73 SHA512 (go-sys-0.0.20200202-d101bd2416.tar.gz) = 0d9b69c7c7b0d525d359d70e75a243ee109fd1bcadd535a6c7704b7bdbeb1bd0f3140c09fcbd9c22ff777b7a54a4c9dfb4036dc837ad703fcbbb2cda1858326a Size (go-sys-0.0.20200202-d101bd2416.tar.gz) = 1539300 bytes +SHA1 (patch-cpu_cpu__arm64.go) = f04d8caad468f097e25d05e64eb681463ab6daa5 diff --git a/devel/go-sys/patches/patch-cpu_cpu__arm64.go b/devel/go-sys/patches/patch-cpu_cpu__arm64.go new file mode 100644 index 00000000000..85897fc679c --- /dev/null +++ b/devel/go-sys/patches/patch-cpu_cpu__arm64.go @@ -0,0 +1,21 @@ +$NetBSD: patch-cpu_cpu__arm64.go,v 1.1 2020/05/01 20:57:44 tnn Exp $ + +Fix SIGILL on netbsd/arm64 + +--- cpu/cpu_arm64.go.orig 2020-02-02 16:47:22.000000000 +0000 ++++ cpu/cpu_arm64.go +@@ -10,8 +10,13 @@ const cacheLineSize = 64 + + func init() { + switch runtime.GOOS { +- case "android", "darwin": ++ case "android", "darwin", "netbsd": + // Android and iOS don't seem to allow reading these registers. ++ // NetBSD: ++ // ID_AA64ISAR0_EL1 is a privileged register and cannot be read from EL0. ++ // It can be read via sysctl(3). Example for future implementers: ++ // https://nxr.netbsd.org/xref/src/usr.sbin/cpuctl/arch/aarch64.c ++ // + // Fake the minimal features expected by + // TestARM64minimalFeatures. + ARM64.HasASIMD = true |