Skip to content

Commit 9b1c7f8

Browse files
ianlancetaylorjproberts
authored andcommitted
cmd/internal/notsha256: add purego tag as needed
This permits building the package with gccgo, when using gccgo as a bootstrap compiler. Fixes golang#53662 Change-Id: Ic7ae9323ec5954e9306a32e1160e9aa1ed3aa202 Reviewed-on: https://go-review.googlesource.com/c/go/+/415935 TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: David Chase <[email protected]>
1 parent 293e890 commit 9b1c7f8

File tree

6 files changed

+15
-4
lines changed

6 files changed

+15
-4
lines changed

src/cmd/internal/notsha256/sha256block_386.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build !purego
6+
// +build !purego
7+
58
// SHA256 block routine. See sha256block.go for Go equivalent.
69
//
710
// The algorithm is detailed in FIPS 180-4:

src/cmd/internal/notsha256/sha256block_amd64.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build !purego
6+
// +build !purego
7+
58
package notsha256
69

710
var useAVX2 = false

src/cmd/internal/notsha256/sha256block_amd64.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build !purego
6+
// +build !purego
7+
58
#include "textflag.h"
69

710
// SHA256 block routine. See sha256block.go for Go equivalent.

src/cmd/internal/notsha256/sha256block_decl.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build 386 || amd64 || ppc64le || ppc64
5+
//go:build !purego && (386 || amd64 || ppc64le || ppc64)
6+
// +build !purego
67
// +build 386 amd64 ppc64le ppc64
78

89
package notsha256

src/cmd/internal/notsha256/sha256block_generic.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build !amd64 && !386 && !ppc64le && !ppc64
6-
// +build !amd64,!386,!ppc64le,!ppc64
5+
//go:build purego || (!amd64 && !386 && !ppc64le && !ppc64)
6+
// +build purego !amd64,!386,!ppc64le,!ppc64
77

88
package notsha256
99

src/cmd/internal/notsha256/sha256block_ppc64x.s

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
// bootstrap toolchain.
99
//
1010

11-
//go:build ppc64 || ppc64le
11+
//go:build !purego && (ppc64 || ppc64le)
12+
// +build !purego
1213
// +build ppc64 ppc64le
1314

1415
// Based on CRYPTOGAMS code with the following comment:

0 commit comments

Comments
 (0)