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: