From 5f31782cfb2b6373211f8f9fbf31283fa234b570 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 12 Oct 2016 21:56:05 +0000 Subject: [PATCH] poly1305, chacha20poly1305: fix build for Go 1.6 Fixes golang/go#17424 Change-Id: I49d6e475c173da6a31542931d555ab87cc45a1c6 Reviewed-on: https://go-review.googlesource.com/30971 Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot Reviewed-by: Adam Langley --- chacha20poly1305/chacha20poly1305_amd64.go | 2 +- chacha20poly1305/chacha20poly1305_amd64.s | 2 ++ chacha20poly1305/chacha20poly1305_noasm.go | 2 +- poly1305/sum_amd64.go | 2 +- poly1305/sum_amd64.s | 2 +- poly1305/sum_ref.go | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/chacha20poly1305/chacha20poly1305_amd64.go b/chacha20poly1305/chacha20poly1305_amd64.go index ae73973..f0d3485 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 amd64 +// +build amd64,go1.7 package chacha20poly1305 diff --git a/chacha20poly1305/chacha20poly1305_amd64.s b/chacha20poly1305/chacha20poly1305_amd64.s index 7469667..ca9974f 100644 --- a/chacha20poly1305/chacha20poly1305_amd64.s +++ b/chacha20poly1305/chacha20poly1305_amd64.s @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build go1.7 + #include "textflag.h" // General register allocation #define oup DI diff --git a/chacha20poly1305/chacha20poly1305_noasm.go b/chacha20poly1305/chacha20poly1305_noasm.go index 495843a..1d4dcd3 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 +// +build !amd64 !go1.7 package chacha20poly1305 diff --git a/poly1305/sum_amd64.go b/poly1305/sum_amd64.go index 4dd72fe..1501f13 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 amd64,!gccgo,!appengine,go1.7 package poly1305 diff --git a/poly1305/sum_amd64.s b/poly1305/sum_amd64.s index bc75c61..56e8311 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 amd64,!gccgo,!appengine,go1.7 #include "textflag.h" diff --git a/poly1305/sum_ref.go b/poly1305/sum_ref.go index 0b24fc7..5d25a56 100644 --- a/poly1305/sum_ref.go +++ b/poly1305/sum_ref.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,!arm gccgo appengine +// +build !amd64,!arm gccgo appengine !go1.7 package poly1305