summaryrefslogtreecommitdiff
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 aea6cb312..eb71a879a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.405 2008/06/13 23:14:46 dtucker Exp $ 1# $Id: configure.ac,v 1.406 2008/06/15 16:27:48 dtucker Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -15,7 +15,7 @@
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 16
17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) 17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
18AC_REVISION($Revision: 1.405 $) 18AC_REVISION($Revision: 1.406 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20 20
21AC_CONFIG_HEADER(config.h) 21AC_CONFIG_HEADER(config.h)
@@ -112,6 +112,18 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
112 *) ;; 112 *) ;;
113 esac 113 esac
114 114
115 AC_MSG_CHECKING(if $CC accepts -fno-builtin-memset)
116 saved_CFLAGS="$CFLAGS"
117 CFLAGS="$CFLAGS -fno-builtin-memset"
118 AC_LINK_IFELSE( [AC_LANG_SOURCE([[
119#include <string.h>
120int main(void){char b[10]; memset(b, 0, sizeof(b));}
121 ]])],
122 [ AC_MSG_RESULT(yes) ],
123 [ AC_MSG_RESULT(no)
124 CFLAGS="$saved_CFLAGS" ]
125)
126
115 # -fstack-protector-all doesn't always work for some GCC versions 127 # -fstack-protector-all doesn't always work for some GCC versions
116 # and/or platforms, so we test if we can. If it's not supported 128 # and/or platforms, so we test if we can. If it's not supported
117 # on a give platform gcc will emit a warning so we use -Werror. 129 # on a give platform gcc will emit a warning so we use -Werror.