Skip to content

Commit

Permalink
cpu: add support for ppc64 on platforms other than aix and linux
Browse files Browse the repository at this point in the history
This allows the cpu package to function on openbsd/ppc64.

Updates golang/go#56001

Change-Id: Iff306b6091da8f7dc28dd1bd2c9ba668b5318a67
Reviewed-on: https://go-review.googlesource.com/c/sys/+/439977
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
  • Loading branch information
4a6f656c committed Oct 10, 2022
1 parent a970992 commit 3938a4f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cpu/cpu_other_ppc64x.go
@@ -0,0 +1,15 @@
// Copyright 2022 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.

//go:build !aix && !linux && (ppc64 || ppc64le)
// +build !aix
// +build !linux
// +build ppc64 ppc64le

package cpu

func archInit() {
PPC64.IsPOWER8 = true
Initialized = true
}

0 comments on commit 3938a4f

Please sign in to comment.