patches/eglibc/2_15/100-Remove-test-for-__builtin_expect.patch
changeset 2909 28ac8fbd9e6a
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/eglibc/2_15/100-Remove-test-for-__builtin_expect.patch	Thu Mar 01 15:23:49 2012 -0800
     1.3 @@ -0,0 +1,78 @@
     1.4 +diff --git a/configure b/configure
     1.5 +index e5e0184..85da2bc 100755
     1.6 +--- a/configure
     1.7 ++++ b/configure
     1.8 +@@ -7567,40 +7567,6 @@ _ACEOF
     1.9 + fi
    1.10 + fi
    1.11 + 
    1.12 +-{ $as_echo "$as_me:$LINENO: checking for __builtin_expect" >&5
    1.13 +-$as_echo_n "checking for __builtin_expect... " >&6; }
    1.14 +-if test "${libc_cv_gcc_builtin_expect+set}" = set; then
    1.15 +-  $as_echo_n "(cached) " >&6
    1.16 +-else
    1.17 +-  cat > conftest.c <<EOF
    1.18 +-#line $LINENO "configure"
    1.19 +-int foo (int a)
    1.20 +-{
    1.21 +-  a = __builtin_expect (a, 10);
    1.22 +-  return a == 10 ? 0 : 1;
    1.23 +-}
    1.24 +-EOF
    1.25 +-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles
    1.26 +-			    -o conftest conftest.c -lgcc >&5'
    1.27 +-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    1.28 +-  (eval $ac_try) 2>&5
    1.29 +-  ac_status=$?
    1.30 +-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    1.31 +-  (exit $ac_status); }; }; then
    1.32 +-  libc_cv_gcc_builtin_expect=yes
    1.33 +-else
    1.34 +-  libc_cv_gcc_builtin_expect=no
    1.35 +-fi
    1.36 +-rm -f conftest*
    1.37 +-fi
    1.38 +-{ $as_echo "$as_me:$LINENO: result: $libc_cv_gcc_builtin_expect" >&5
    1.39 +-$as_echo "$libc_cv_gcc_builtin_expect" >&6; }
    1.40 +-if test "$libc_cv_gcc_builtin_expect" = no; then
    1.41 +-  { { $as_echo "$as_me:$LINENO: error: support for __builtin_expect needed" >&5
    1.42 +-$as_echo "$as_me: error: support for __builtin_expect needed" >&2;}
    1.43 +-   { (exit 1); exit 1; }; }
    1.44 +-fi
    1.45 +-
    1.46 + { $as_echo "$as_me:$LINENO: checking for __builtin_memset" >&5
    1.47 + $as_echo_n "checking for __builtin_memset... " >&6; }
    1.48 + if test "${libc_cv_gcc_builtin_memset+set}" = set; then
    1.49 +diff --git a/configure.in b/configure.in
    1.50 +index 4655c8a..596443d 100644
    1.51 +--- a/configure.in
    1.52 ++++ b/configure.in
    1.53 +@@ -2134,28 +2134,6 @@ if test "$libc_cv_c_asmcr0_bug" != 'no'; then
    1.54 + fi
    1.55 + fi
    1.56 + 
    1.57 +-dnl Check whether compiler understands __builtin_expect.
    1.58 +-AC_CACHE_CHECK(for __builtin_expect, libc_cv_gcc_builtin_expect,
    1.59 +-[cat > conftest.c <<EOF
    1.60 +-#line $LINENO "configure"
    1.61 +-int foo (int a)
    1.62 +-{
    1.63 +-  a = __builtin_expect (a, 10);
    1.64 +-  return a == 10 ? 0 : 1;
    1.65 +-}
    1.66 +-EOF
    1.67 +-dnl No \ in command here because it ends up inside ''.
    1.68 +-if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles
    1.69 +-			    -o conftest conftest.c -lgcc >&AS_MESSAGE_LOG_FD]); then
    1.70 +-  libc_cv_gcc_builtin_expect=yes
    1.71 +-else
    1.72 +-  libc_cv_gcc_builtin_expect=no
    1.73 +-fi
    1.74 +-rm -f conftest*])
    1.75 +-if test "$libc_cv_gcc_builtin_expect" = no; then
    1.76 +-  AC_MSG_ERROR([support for __builtin_expect needed])
    1.77 +-fi
    1.78 +-
    1.79 + AC_CACHE_CHECK(for __builtin_memset, libc_cv_gcc_builtin_memset, [dnl
    1.80 + cat > conftest.c <<\EOF
    1.81 + void zero (void *x)