From b672e5530bd036eab6dd2aefbd0ab936517fbae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se> Date: Thu, 8 May 2014 17:18:11 +0200 Subject: [PATCH] When CC_FOR_BUILD is gcc, add -O flag. --- ChangeLog | 5 +++++ aclocal.m4 | 23 ++++++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index a42d259a..127dbd35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-05-08 Niels Möller <nisse@lysator.liu.se> + + * aclocal.m4 (GMP_PROG_CC_FOR_BUILD): If CC_FOR_BUILD is gcc, add + -O option. This makes eccdata twice as fast. + 2014-05-06 Niels Möller <nisse@lysator.liu.se> * nettle.texinfo: Document SHA3 and ChaCha-Poly1305 as diff --git a/aclocal.m4 b/aclocal.m4 index 98b399b6..4e23ef8d 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -513,16 +513,21 @@ elif test -n "$HOST_CC"; then GMP_PROG_CC_FOR_BUILD_WORKS($HOST_CC, [CC_FOR_BUILD=$HOST_CC], [AC_MSG_ERROR([Specified HOST_CC doesn't seem to work])]) -elif test $cross_compiling = no ; then - CC_FOR_BUILD="$CC" else - for i in cc gcc c89 c99; do - GMP_PROG_CC_FOR_BUILD_WORKS($i, - [CC_FOR_BUILD=$i - break]) - done - if test -z "$CC_FOR_BUILD"; then - AC_MSG_ERROR([Cannot find a build system compiler]) + if test $cross_compiling = no ; then + CC_FOR_BUILD="$CC" + else + for i in gcc cc c89 c99; do + GMP_PROG_CC_FOR_BUILD_WORKS($i, + [CC_FOR_BUILD=$i + break]) + done + if test -z "$CC_FOR_BUILD"; then + AC_MSG_ERROR([Cannot find a build system compiler]) + fi + fi + if test "$CC_FOR_BUILD" = gcc ; then + CC_FOR_BUILD="$CC_FOR_BUILD -O" fi fi -- GitLab