diff --git a/src/crypto/internal/fips/sha256/_asm/sha256block_amd64_asm.go b/src/crypto/internal/fips/sha256/_asm/sha256block_amd64_asm.go index 24256185bc..3f5d5bdc23 100644 --- a/src/crypto/internal/fips/sha256/_asm/sha256block_amd64_asm.go +++ b/src/crypto/internal/fips/sha256/_asm/sha256block_amd64_asm.go @@ -5,12 +5,14 @@ package main import ( + "os" + . "github.com/mmcloughlin/avo/build" . "github.com/mmcloughlin/avo/operand" . "github.com/mmcloughlin/avo/reg" ) -//go:generate go run . -out ../sha256block_amd64.s -pkg sha256 +//go:generate go run . -out ../sha256block_amd64.s // SHA256 block routine. See sha256block.go for Go equivalent. // @@ -53,7 +55,11 @@ import ( // H7 = h + H7 func main() { - Package("crypto/sha256") + // https://github.com/mmcloughlin/avo/issues/450 + os.Setenv("GOOS", "linux") + os.Setenv("GOARCH", "amd64") + + Package("crypto/internal/fips/sha256") ConstraintExpr("!purego") blockAMD64() blockAVX2() diff --git a/src/crypto/internal/fips/sha256/sha256block_amd64.s b/src/crypto/internal/fips/sha256/sha256block_amd64.s index 7d9ed5acea..ce0ad4f887 100644 --- a/src/crypto/internal/fips/sha256/sha256block_amd64.s +++ b/src/crypto/internal/fips/sha256/sha256block_amd64.s @@ -1,4 +1,4 @@ -// Code generated by command: go run sha256block_amd64_asm.go -out ../sha256block_amd64.s -pkg sha256. DO NOT EDIT. +// Code generated by command: go run sha256block_amd64_asm.go -out ../sha256block_amd64.s. DO NOT EDIT. //go:build !purego diff --git a/src/crypto/internal/fips/sha3/_asm/keccakf_amd64_asm.go b/src/crypto/internal/fips/sha3/_asm/keccakf_amd64_asm.go index 06e2db3a44..bdaafb72c5 100644 --- a/src/crypto/internal/fips/sha3/_asm/keccakf_amd64_asm.go +++ b/src/crypto/internal/fips/sha3/_asm/keccakf_amd64_asm.go @@ -8,13 +8,15 @@ package main import ( + "os" + . "github.com/mmcloughlin/avo/build" . "github.com/mmcloughlin/avo/operand" . "github.com/mmcloughlin/avo/reg" _ "golang.org/x/crypto/sha3" ) -//go:generate go run . -out ../keccakf_amd64.s -pkg sha3 +//go:generate go run . -out ../sha3_amd64.s // Round Constants for use in the ι step. var RoundConstants = [24]uint64{ @@ -100,7 +102,11 @@ const ( ) func main() { - Package("golang.org/x/crypto/sha3") + // https://github.com/mmcloughlin/avo/issues/450 + os.Setenv("GOOS", "linux") + os.Setenv("GOARCH", "amd64") + + Package("crypto/internal/fips/sha3") ConstraintExpr("!purego") keccakF1600() Generate() diff --git a/src/crypto/internal/fips/sha3/sha3_amd64.s b/src/crypto/internal/fips/sha3/sha3_amd64.s index 7f9a315157..3137e2d6cf 100644 --- a/src/crypto/internal/fips/sha3/sha3_amd64.s +++ b/src/crypto/internal/fips/sha3/sha3_amd64.s @@ -1,4 +1,4 @@ -// Code generated by command: go run keccakf_amd64_asm.go -out ../keccakf_amd64.s -pkg sha3. DO NOT EDIT. +// Code generated by command: go run keccakf_amd64_asm.go -out ../sha3_amd64.s. DO NOT EDIT. //go:build !purego diff --git a/src/crypto/internal/fips/sha512/_asm/sha512block_amd64_asm.go b/src/crypto/internal/fips/sha512/_asm/sha512block_amd64_asm.go index c0959714d0..fa540d0f2d 100644 --- a/src/crypto/internal/fips/sha512/_asm/sha512block_amd64_asm.go +++ b/src/crypto/internal/fips/sha512/_asm/sha512block_amd64_asm.go @@ -5,12 +5,14 @@ package main import ( + "os" + . "github.com/mmcloughlin/avo/build" . "github.com/mmcloughlin/avo/operand" . "github.com/mmcloughlin/avo/reg" ) -//go:generate go run . -out ../sha512block_amd64.s -pkg sha512 +//go:generate go run . -out ../sha512block_amd64.s // SHA512 block routine. See sha512block.go for Go equivalent. // @@ -138,7 +140,11 @@ var _K = []uint64{ } func main() { - Package("crypto/sha512") + // https://github.com/mmcloughlin/avo/issues/450 + os.Setenv("GOOS", "linux") + os.Setenv("GOARCH", "amd64") + + Package("crypto/internal/fips/sha512") ConstraintExpr("!purego") blockAMD64() blockAVX2() diff --git a/src/crypto/internal/fips/sha512/sha512block_amd64.s b/src/crypto/internal/fips/sha512/sha512block_amd64.s index ffccdf229f..534563ee14 100644 --- a/src/crypto/internal/fips/sha512/sha512block_amd64.s +++ b/src/crypto/internal/fips/sha512/sha512block_amd64.s @@ -1,4 +1,4 @@ -// Code generated by command: go run sha512block_amd64_asm.go -out ../sha512block_amd64.s -pkg sha512. DO NOT EDIT. +// Code generated by command: go run sha512block_amd64_asm.go -out ../sha512block_amd64.s. DO NOT EDIT. //go:build !purego