From 85c2e6110c9a01ec817c30f1b7e20549d7229987 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 20 Jun 2013 19:40:55 -0500 Subject: Fix loop construction to functions calls Check wheter the compiler has the option -fno-tree-loop-distribute-patterns to inhibit loop transformation to library calls and uses it on memset and memmove default implementation to avoid recursive calls. --- configure | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 09d8336..14bff72 100755 --- a/configure +++ b/configure @@ -598,6 +598,7 @@ have_selinux have_libcap have_libaudit LIBGD +libc_cv_cc_loop_to_function libc_cv_cc_submachine libc_cv_cc_nofma exceptions @@ -6933,6 +6934,38 @@ $as_echo "$libc_cv_cc_submachine" >&6; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \ +__attribute__ ((__optimize__))" >&5 +$as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \ +__attribute__ ((__optimize__))... " >&6; } +if ${libc_cv_cc_loop_to_function+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then + libc_cv_cc_loop_to_function=yes +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_loop_to_function" >&5 +$as_echo "$libc_cv_cc_loop_to_function" >&6; } +if test $libc_cv_cc_loop_to_function = yes; then + $as_echo "#define HAVE_CC_INHIBIT_LOOP_TO_LIBCALL 1" >>confdefs.h + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5 $as_echo_n "checking for libgd... " >&6; } if test "$with_gd" != "no"; then -- cgit v1.1