aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-07-03 13:34:47 -0700
committerGopher Robot <gobot@golang.org>2022-07-06 16:39:07 +0000
commit177306f6305b35bf6993c2d74baa7fb60cd3f5d4 (patch)
tree4fd0c6fe472698cd50a4f1655e065cf179dacf7a
parentf4755fc7333f524666f6ba3140cee0d180bce8b3 (diff)
downloadgo-177306f6305b35bf6993c2d74baa7fb60cd3f5d4.tar.gz
go-177306f6305b35bf6993c2d74baa7fb60cd3f5d4.zip
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>
-rw-r--r--src/cmd/internal/notsha256/sha256block_386.s3
-rw-r--r--src/cmd/internal/notsha256/sha256block_amd64.go3
-rw-r--r--src/cmd/internal/notsha256/sha256block_amd64.s3
-rw-r--r--src/cmd/internal/notsha256/sha256block_decl.go3
-rw-r--r--src/cmd/internal/notsha256/sha256block_generic.go4
-rw-r--r--src/cmd/internal/notsha256/sha256block_ppc64x.s3
6 files changed, 15 insertions, 4 deletions
diff --git a/src/cmd/internal/notsha256/sha256block_386.s b/src/cmd/internal/notsha256/sha256block_386.s
index 086a0ab25c..f2ba7d7a9b 100644
--- a/src/cmd/internal/notsha256/sha256block_386.s
+++ b/src/cmd/internal/notsha256/sha256block_386.s
@@ -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:
diff --git a/src/cmd/internal/notsha256/sha256block_amd64.go b/src/cmd/internal/notsha256/sha256block_amd64.go
index 676c4f70d9..27b84a86b1 100644
--- a/src/cmd/internal/notsha256/sha256block_amd64.go
+++ b/src/cmd/internal/notsha256/sha256block_amd64.go
@@ -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
diff --git a/src/cmd/internal/notsha256/sha256block_amd64.s b/src/cmd/internal/notsha256/sha256block_amd64.s
index b2ae7c5fc9..36ea74451d 100644
--- a/src/cmd/internal/notsha256/sha256block_amd64.s
+++ b/src/cmd/internal/notsha256/sha256block_amd64.s
@@ -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.
diff --git a/src/cmd/internal/notsha256/sha256block_decl.go b/src/cmd/internal/notsha256/sha256block_decl.go
index 5a822ee479..631f1a4a1b 100644
--- a/src/cmd/internal/notsha256/sha256block_decl.go
+++ b/src/cmd/internal/notsha256/sha256block_decl.go
@@ -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
diff --git a/src/cmd/internal/notsha256/sha256block_generic.go b/src/cmd/internal/notsha256/sha256block_generic.go
index 20ae841383..2664722bc2 100644
--- a/src/cmd/internal/notsha256/sha256block_generic.go
+++ b/src/cmd/internal/notsha256/sha256block_generic.go
@@ -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
diff --git a/src/cmd/internal/notsha256/sha256block_ppc64x.s b/src/cmd/internal/notsha256/sha256block_ppc64x.s
index 6e0f1d6133..e907d3b71b 100644
--- a/src/cmd/internal/notsha256/sha256block_ppc64x.s
+++ b/src/cmd/internal/notsha256/sha256block_ppc64x.s
@@ -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: