瀏覽代碼

poly1305: fix NaCl build.

The ARM assembly doesn't work for NaCl on ARM because it doesn't meet
the required rules. This change disables it on ARM and also fixes the
issue that the build constraints in sum_arm.s would be ignored because
they came after the #include.

Change-Id: I6cb3815ec62ac4686a6e72f405af104293586bb6
Reviewed-on: https://go-review.googlesource.com/31264
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Adam Langley 9 年之前
父節點
當前提交
cdcb58c6ca
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 2
      poly1305/sum_arm.s
  2. 1 1
      poly1305/sum_ref.go

+ 2 - 2
poly1305/sum_arm.s

@@ -2,13 +2,13 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build arm,!gccgo,!appengine,!nacl
+
 #include "textflag.h"
 
 // This code was translated into a form compatible with 5a from the public
 // domain source by Andrew Moon: github.com/floodyberry/poly1305-opt/blob/master/app/extensions/poly1305.
 
-// +build arm,!gccgo,!appengine,!nacl
-
 DATA poly1305_init_constants_armv6<>+0x00(SB)/4, $0x3ffffff
 DATA poly1305_init_constants_armv6<>+0x04(SB)/4, $0x3ffff03
 DATA poly1305_init_constants_armv6<>+0x08(SB)/4, $0x3ffc0ff

+ 1 - 1
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 !go1.7
+// +build !amd64,!arm gccgo appengine nacl !go1.7
 
 package poly1305