]> andersk Git - openssh.git/blobdiff - configure.ac
- (dtucker) [configure.ac] Enable -fno-builtin-memset when using gcc.
[openssh.git] / configure.ac
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.037698 seconds and 4 git commands to generate.