1
0
mirror of https://github.com/golang/go synced 2024-07-05 09:50:19 +00:00

cmd/internal/notsha256: add purego tag as needed

This permits building the package with gccgo, when using gccgo
as a bootstrap compiler.

Fixes #53662

Change-Id: Ic7ae9323ec5954e9306a32e1160e9aa1ed3aa202
Reviewed-on: https://go-review.googlesource.com/c/go/+/415935
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Ian Lance Taylor 2022-07-03 13:34:47 -07:00 committed by Gopher Robot
parent f4755fc733
commit 177306f630
6 changed files with 15 additions and 4 deletions

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !purego
// +build !purego
// SHA256 block routine. See sha256block.go for Go equivalent.
//
// The algorithm is detailed in FIPS 180-4:

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !purego
// +build !purego
package notsha256
var useAVX2 = false

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !purego
// +build !purego
#include "textflag.h"
// SHA256 block routine. See sha256block.go for Go equivalent.

View File

@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build 386 || amd64 || ppc64le || ppc64
//go:build !purego && (386 || amd64 || ppc64le || ppc64)
// +build !purego
// +build 386 amd64 ppc64le ppc64
package notsha256

View File

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !amd64 && !386 && !ppc64le && !ppc64
// +build !amd64,!386,!ppc64le,!ppc64
//go:build purego || (!amd64 && !386 && !ppc64le && !ppc64)
// +build purego !amd64,!386,!ppc64le,!ppc64
package notsha256

View File

@ -8,7 +8,8 @@
// bootstrap toolchain.
//
//go:build ppc64 || ppc64le
//go:build !purego && (ppc64 || ppc64le)
// +build !purego
// +build ppc64 ppc64le
// Based on CRYPTOGAMS code with the following comment: