From e77772198cdc3dbfcf7f2de96630204df9fd3a0b Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 14 Feb 2019 22:28:15 +0100 Subject: [PATCH] cpu: fix build for GOARCH=arm64 on GOOS!=linux The current implementation for arm64 only supports linux (through HWCaps read from /proc/self/auxv) and fails to build e.g. on darwin/arm64. Fixes golang/go#30237 Change-Id: I9f32a285760795441a829b0a81b2d5aff04e2dc4 Reviewed-on: https://go-review.googlesource.com/c/162797 Run-TryBot: Tobias Klauser Run-TryBot: Ian Lance Taylor Reviewed-by: Ian Lance Taylor TryBot-Result: Gobot Gobot --- cpu/{cpu_arm64.go => cpu_linux_arm64.go} | 0 cpu/cpu_other_arm64.go | 11 +++++++++++ 2 files changed, 11 insertions(+) rename cpu/{cpu_arm64.go => cpu_linux_arm64.go} (100%) create mode 100644 cpu/cpu_other_arm64.go diff --git a/cpu/cpu_arm64.go b/cpu/cpu_linux_arm64.go similarity index 100% rename from cpu/cpu_arm64.go rename to cpu/cpu_linux_arm64.go diff --git a/cpu/cpu_other_arm64.go b/cpu/cpu_other_arm64.go new file mode 100644 index 00000000..dd1e76dc --- /dev/null +++ b/cpu/cpu_other_arm64.go @@ -0,0 +1,11 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !linux,arm64 + +package cpu + +const cacheLineSize = 64 + +func doinit() {}