diff options
author | Niels Möller <nisse@lysator.liu.se> | 2014-05-08 17:18:11 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2014-05-08 17:18:11 +0200 |
commit | b672e5530bd036eab6dd2aefbd0ab936517fbae4 (patch) | |
tree | 7a3da24860176325292ce9b62a82309a0287f625 /aclocal.m4 | |
parent | 0eae25f0cb30509f294564ce25409f12591ebf73 (diff) | |
download | nettle-b672e5530bd036eab6dd2aefbd0ab936517fbae4.tar.gz |
When CC_FOR_BUILD is gcc, add -O flag.
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -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 |