Fix cross-compiling when 128-bit math compiles but won't link

Apparently, there exist cross-compiling environments for arm7 where
you can compile a 64x64->128 multiply, but not link it.

Fixes bug 11729; bugfix on 0.2.4.8-alpha. Patch from 'conradev'.
This commit is contained in:
Nick Mathewson 2014-05-05 11:44:02 -04:00
parent 5d496963b4
commit 388478561d
2 changed files with 6 additions and 1 deletions

5
changes/bug11729 Normal file
View File

@ -0,0 +1,5 @@
o Minor bugfixes (build):
- When deciding whether to build the 64-bit curve25519 implementation,
detect platforms where we can compile 128-bit arithmetic but cannot
link it. Fixes bug 11729; bugfix on 0.2.4.8-alpha. Patch
from "conradev".

View File

@ -770,7 +770,7 @@ if test x$enable_curve25519 != xno; then
])], ])],
[tor_cv_can_use_curve25519_donna_c64=yes], [tor_cv_can_use_curve25519_donna_c64=yes],
[tor_cv_can_use_curve25519_donna_c64=no], [tor_cv_can_use_curve25519_donna_c64=no],
[AC_COMPILE_IFELSE( [AC_LINK_IFELSE(
[AC_LANG_PROGRAM([dnl [AC_LANG_PROGRAM([dnl
#include <stdint.h> #include <stdint.h>
typedef unsigned uint128_t __attribute__((mode(TI))); typedef unsigned uint128_t __attribute__((mode(TI)));