diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-07-12 14:48:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-07-12 14:48:48 -0400 |
commit | d8352646900c6316af8e2967742ce6a438b04221 (patch) | |
tree | 1728df7f9ebc64db0c36d66335c407cb82cae68f /src/ext | |
parent | db88d91ebedd407531784cf7fa8df0bd4f1f4164 (diff) | |
download | tor-d8352646900c6316af8e2967742ce6a438b04221.tar.gz tor-d8352646900c6316af8e2967742ce6a438b04221.zip |
Disable -Wstack-protector diagnostics in curve25519-donna-helpers.h
This was causing a false positive on our arm builders.
Diffstat (limited to 'src/ext')
-rw-r--r-- | src/ext/ed25519/donna/curve25519-donna-helpers.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ext/ed25519/donna/curve25519-donna-helpers.h b/src/ext/ed25519/donna/curve25519-donna-helpers.h index e4058ff5ec..ca442fa24f 100644 --- a/src/ext/ed25519/donna/curve25519-donna-helpers.h +++ b/src/ext/ed25519/donna/curve25519-donna-helpers.h @@ -5,6 +5,19 @@ Curve25519 implementation agnostic helpers */ +#ifdef __GNUC__ +#define ED_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) +#endif + +#if __GNUC__ && ED_GCC_VERSION >= 401 +#if ED_GCC_VERSION >= 406 +#pragma GCC diagnostic push +#endif +/* Some versions of GCC (particularly on arm) give us bogus warnings here. + * Suppress the GCC warning so we can build Tor with -Wstack-protector. */ +#pragma GCC diagnostic ignored "-Wstack-protector" +#endif + /* * In: b = 2^5 - 2^0 * Out: b = 2^250 - 2^0 @@ -65,3 +78,7 @@ curve25519_pow_two252m3(bignum25519 two252m3, const bignum25519 z) { /* 2^252 - 2^2 */ curve25519_square_times(b, b, 2); /* 2^252 - 3 */ curve25519_mul_noinline(two252m3, b, z); } + +#if __GNUC__ && ED_GCC_VERSION >= 406 +#pragma GCC diagnostic pop +#endif |