summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2008-06-16 02:27:48 +1000
committerDarren Tucker <dtucker@zip.com.au>2008-06-16 02:27:48 +1000
commit330c93f68a8cbbf416b2e2c9150e0a9b8964a51b (patch)
tree6d97e9e106aea2c7e9e765e992a40366d37c2c40 /configure.ac
parent8b7ab960df02da128c56283ce14b78227ac2d200 (diff)
- (dtucker) [configure.ac] Enable -fno-builtin-memset when using gcc.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 14 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index aea6cb31..eb71a879 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.405 2008/06/13 23:14:46 dtucker Exp $
+# $Id: configure.ac,v 1.406 2008/06/15 16:27:48 dtucker Exp $
#
# Copyright (c) 1999-2004 Damien Miller
#
@@ -15,7 +15,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
-AC_REVISION($Revision: 1.405 $)
+AC_REVISION($Revision: 1.406 $)
AC_CONFIG_SRCDIR([ssh.c])
AC_CONFIG_HEADER(config.h)
@@ -112,6 +112,18 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
*) ;;
esac
+ AC_MSG_CHECKING(if $CC accepts -fno-builtin-memset)
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fno-builtin-memset"
+ AC_LINK_IFELSE( [AC_LANG_SOURCE([[
+#include <string.h>
+int main(void){char b[10]; memset(b, 0, sizeof(b));}
+ ]])],
+ [ AC_MSG_RESULT(yes) ],
+ [ AC_MSG_RESULT(no)
+ CFLAGS="$saved_CFLAGS" ]
+)
+
# -fstack-protector-all doesn't always work for some GCC versions
# and/or platforms, so we test if we can. If it's not supported
# on a give platform gcc will emit a warning so we use -Werror.