summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2013-06-20 19:40:55 -0500
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2013-06-20 19:42:05 -0500
commit85c2e6110c9a01ec817c30f1b7e20549d7229987 (patch)
tree9b044403d906f9aaa6930484ae6d60dc687ecc19 /configure
parentb8c792af85fe3ff65c0cd68e2f291072a60cd953 (diff)
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.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure33
1 files changed, 33 insertions, 0 deletions
diff --git a/configure b/configure
index 09d8336f10..14bff72a3d 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 <<EOF
+void
+__attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
+foo (void) {}
+EOF
+libc_cv_cc_loop_to_function=no
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&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