Mercurial > dropbear
changeset 1416:33d90d219e03
Compile with -fno-strict-overflow if possible.
Needed for curve25519-donna https://github.com/agl/curve25519-donna/issues/31
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 23 Jun 2017 21:31:25 +0800 |
parents | a54b22f4058d |
children | 4f17d75d027b 92717c0fec39 |
files | configure.ac |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac Thu Jun 15 08:00:07 2017 +0800 +++ b/configure.ac Fri Jun 23 21:31:25 2017 +0800 @@ -9,7 +9,7 @@ AC_INIT AC_CONFIG_SRCDIR(buffer.c) -OLDCFLAGS=$CFLAGS +OLDCFLAGS="$CFLAGS" # Checks for programs. AC_PROG_CC AC_PROG_MAKE_SET @@ -24,6 +24,17 @@ CFLAGS="-Os -W -Wall -Wno-pointer-sign" fi +AC_MSG_CHECKING([if compiler '$CC' supports -fno-strict-overflow]) +OLDCFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -fno-strict-overflow" +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], + [AC_MSG_RESULT(yes)], + [ + AC_MSG_RESULT(no) + CFLAGS=$OLDCFLAGS + ] + ) + # large file support is useful for scp AC_SYS_LARGEFILE