]> andersk Git - openssh.git/commitdiff
- (dtucker) [configure.ac] Enable -fno-builtin-memset when using gcc.
authordtucker <dtucker>
Sun, 15 Jun 2008 16:27:48 +0000 (16:27 +0000)
committerdtucker <dtucker>
Sun, 15 Jun 2008 16:27:48 +0000 (16:27 +0000)
ChangeLog
configure.ac

index 5fed2db50f7caa56bf1103893e06b4d5077a5fd9..f39c62fc114c0fe211b38cb176ae6c52c7f3119d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+20080615
+ - (dtucker) [configure.ac] Enable -fno-builtin-memset when using gcc.
+
 20080614
  - (djm) [openbsd-compat/sigact.c] Avoid NULL derefs in ancient sigaction
    replacement code; patch from ighighi AT gmail.com in bz#1240;
index 27016e0fe3f864bf320683473dc305ae561346d0..2e8d270d8313fe4b7648b59dad99e5a2d656a02d 100644 (file)
@@ -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.
This page took 0.062498 seconds and 5 git commands to generate.