From 2aa609cf4a9d7d1126360de73b55b6002f9e052a Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Sun, 19 Jan 2020 20:10:41 -0500 Subject: [PATCH] chacha20,poly1305,chacha20poly1305: set consistent build tags appengine was only necessary for the legacy system based on Go 1.9, drop that. Add purego tags instead. Remove redundant architecture tags. Change-Id: Ib1f65a4837511e63e08c1aa43163a79cfe868e0c Reviewed-on: https://go-review.googlesource.com/c/crypto/+/215498 Run-TryBot: Filippo Valsorda TryBot-Result: Gobot Gobot Reviewed-by: Katie Hockman Reviewed-by: Dmitri Shuralyov --- chacha20/chacha_arm64.go | 3 +-- chacha20/chacha_arm64.s | 3 +-- chacha20/chacha_noasm.go | 2 +- chacha20/chacha_ppc64le.go | 2 +- chacha20/chacha_ppc64le.s | 2 +- chacha20/chacha_s390x.go | 2 +- chacha20/chacha_s390x.s | 2 +- chacha20poly1305/chacha20poly1305_amd64.go | 2 +- chacha20poly1305/chacha20poly1305_amd64.s | 2 +- chacha20poly1305/chacha20poly1305_noasm.go | 2 +- poly1305/mac_noasm.go | 2 +- poly1305/sum_amd64.go | 2 +- poly1305/sum_amd64.s | 2 +- poly1305/sum_noasm.go | 2 +- poly1305/sum_ppc64le.go | 2 +- poly1305/sum_ppc64le.s | 2 +- poly1305/sum_s390x.go | 2 +- poly1305/sum_s390x.s | 2 +- poly1305/sum_vmsl_s390x.s | 2 +- 19 files changed, 19 insertions(+), 21 deletions(-) diff --git a/chacha20/chacha_arm64.go b/chacha20/chacha_arm64.go index 87f1e36..b799e44 100644 --- a/chacha20/chacha_arm64.go +++ b/chacha20/chacha_arm64.go @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.11 -// +build !gccgo,!appengine +// +build go1.11,!gccgo,!purego package chacha20 diff --git a/chacha20/chacha_arm64.s b/chacha20/chacha_arm64.s index b3a16ef..8914815 100644 --- a/chacha20/chacha_arm64.s +++ b/chacha20/chacha_arm64.s @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.11 -// +build !gccgo,!appengine +// +build go1.11,!gccgo,!purego #include "textflag.h" diff --git a/chacha20/chacha_noasm.go b/chacha20/chacha_noasm.go index ec609ed..4635307 100644 --- a/chacha20/chacha_noasm.go +++ b/chacha20/chacha_noasm.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !arm64,!s390x,!ppc64le arm64,!go1.11 gccgo appengine +// +build !arm64,!s390x,!ppc64le arm64,!go1.11 gccgo purego package chacha20 diff --git a/chacha20/chacha_ppc64le.go b/chacha20/chacha_ppc64le.go index d0ec61f..b799330 100644 --- a/chacha20/chacha_ppc64le.go +++ b/chacha20/chacha_ppc64le.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !gccgo,!appengine +// +build !gccgo,!purego package chacha20 diff --git a/chacha20/chacha_ppc64le.s b/chacha20/chacha_ppc64le.s index 533014e..23c6021 100644 --- a/chacha20/chacha_ppc64le.s +++ b/chacha20/chacha_ppc64le.s @@ -19,7 +19,7 @@ // The differences in this and the original implementation are // due to the calling conventions and initialization of constants. -// +build !gccgo,!appengine +// +build !gccgo,!purego #include "textflag.h" diff --git a/chacha20/chacha_s390x.go b/chacha20/chacha_s390x.go index cd55f45..a9244bd 100644 --- a/chacha20/chacha_s390x.go +++ b/chacha20/chacha_s390x.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !gccgo,!appengine +// +build !gccgo,!purego package chacha20 diff --git a/chacha20/chacha_s390x.s b/chacha20/chacha_s390x.s index de52a2e..89c658c 100644 --- a/chacha20/chacha_s390x.s +++ b/chacha20/chacha_s390x.s @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !gccgo,!appengine +// +build !gccgo,!purego #include "go_asm.h" #include "textflag.h" diff --git a/chacha20poly1305/chacha20poly1305_amd64.go b/chacha20poly1305/chacha20poly1305_amd64.go index 737e46a..cda7781 100644 --- a/chacha20poly1305/chacha20poly1305_amd64.go +++ b/chacha20poly1305/chacha20poly1305_amd64.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build go1.7,amd64,!gccgo,!appengine +// +build !gccgo,!purego package chacha20poly1305 diff --git a/chacha20poly1305/chacha20poly1305_amd64.s b/chacha20poly1305/chacha20poly1305_amd64.s index 9dd5d7a..3469c87 100644 --- a/chacha20poly1305/chacha20poly1305_amd64.s +++ b/chacha20poly1305/chacha20poly1305_amd64.s @@ -4,7 +4,7 @@ // This file was originally from https://golang.org/cl/24717 by Vlad Krasnov of CloudFlare. -// +build go1.7,amd64,!gccgo,!appengine +// +build !gccgo,!purego #include "textflag.h" // General register allocation diff --git a/chacha20poly1305/chacha20poly1305_noasm.go b/chacha20poly1305/chacha20poly1305_noasm.go index 4c2eb70..9ce4aa9 100644 --- a/chacha20poly1305/chacha20poly1305_noasm.go +++ b/chacha20poly1305/chacha20poly1305_noasm.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !amd64 !go1.7 gccgo appengine +// +build !amd64 gccgo purego package chacha20poly1305 diff --git a/poly1305/mac_noasm.go b/poly1305/mac_noasm.go index a8dd589..b0c2cd0 100644 --- a/poly1305/mac_noasm.go +++ b/poly1305/mac_noasm.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !amd64,!ppc64le gccgo appengine +// +build !amd64,!ppc64le gccgo purego package poly1305 diff --git a/poly1305/sum_amd64.go b/poly1305/sum_amd64.go index df56a65..35b9e38 100644 --- a/poly1305/sum_amd64.go +++ b/poly1305/sum_amd64.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build amd64,!gccgo,!appengine +// +build !gccgo,!purego package poly1305 diff --git a/poly1305/sum_amd64.s b/poly1305/sum_amd64.s index 8c0cefb..8d394a2 100644 --- a/poly1305/sum_amd64.s +++ b/poly1305/sum_amd64.s @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build amd64,!gccgo,!appengine +// +build !gccgo,!purego #include "textflag.h" diff --git a/poly1305/sum_noasm.go b/poly1305/sum_noasm.go index 32a9cef..2e3ae34 100644 --- a/poly1305/sum_noasm.go +++ b/poly1305/sum_noasm.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build s390x,!go1.11 !amd64,!s390x,!ppc64le gccgo appengine nacl +// +build s390x,!go1.11 !amd64,!s390x,!ppc64le gccgo purego package poly1305 diff --git a/poly1305/sum_ppc64le.go b/poly1305/sum_ppc64le.go index 3233616..92597bb 100644 --- a/poly1305/sum_ppc64le.go +++ b/poly1305/sum_ppc64le.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build ppc64le,!gccgo,!appengine +// +build !gccgo,!purego package poly1305 diff --git a/poly1305/sum_ppc64le.s b/poly1305/sum_ppc64le.s index 4e20bf2..4e02813 100644 --- a/poly1305/sum_ppc64le.s +++ b/poly1305/sum_ppc64le.s @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build ppc64le,!gccgo,!appengine +// +build !gccgo,!purego #include "textflag.h" diff --git a/poly1305/sum_s390x.go b/poly1305/sum_s390x.go index a8920ee..5f91ff8 100644 --- a/poly1305/sum_s390x.go +++ b/poly1305/sum_s390x.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build s390x,go1.11,!gccgo,!appengine +// +build go1.11,!gccgo,!purego package poly1305 diff --git a/poly1305/sum_s390x.s b/poly1305/sum_s390x.s index ca5a309..806d169 100644 --- a/poly1305/sum_s390x.s +++ b/poly1305/sum_s390x.s @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build s390x,go1.11,!gccgo,!appengine +// +build go1.11,!gccgo,!purego #include "textflag.h" diff --git a/poly1305/sum_vmsl_s390x.s b/poly1305/sum_vmsl_s390x.s index e60bbc1..b439af9 100644 --- a/poly1305/sum_vmsl_s390x.s +++ b/poly1305/sum_vmsl_s390x.s @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build s390x,go1.11,!gccgo,!appengine +// +build go1.11,!gccgo,!purego #include "textflag.h"