libg/eglibc: add updated eglibc 2.15

Includes a patch to remove __builtin_expect test:

In eglibc-2.15, the build breaks in configure while testing
for the existance of __builtin_expect. It fails with newer
versions of gcc.

This patch is a modification of an upstream change in glibc
mainline (to be 2.16) to fix the following error:

[CFG  ]    checking for __builtin_expect... no
[ERROR]    configure: error: support for __builtin_expect needed

http://sourceware.org/git/?p=glibc.git;a=commit;h=3857022a761ea7251f8e5c0e45d382ebc3e34cf9

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
[yann.morin.1998@free.fr: coalesce both patches into a single changeset]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit is contained in:
Yann E. MORIN" 2012-03-01 15:23:49 -08:00 committed by Bryan Hundven"
parent ffee93e4d2
commit e54d71321e
2 changed files with 89 additions and 0 deletions

View File

@ -18,6 +18,12 @@ choice
# Don't remove next line
# CT_INSERT_VERSION_BELOW
config LIBC_EGLIBC_V_2_15
bool
prompt "2_15"
depends on EXPERIMENTAL
select LIBC_EGLIBC_2_15_or_later
config LIBC_EGLIBC_V_2_14
bool
prompt "2_14"
@ -83,6 +89,7 @@ config LIBC_VERSION
string
# Don't remove next line
# CT_INSERT_VERSION_STRING_BELOW
default "2_15" if LIBC_EGLIBC_V_2_15
default "2_14" if LIBC_EGLIBC_V_2_14
default "2_13" if LIBC_EGLIBC_V_2_13
default "2_12" if LIBC_EGLIBC_V_2_12
@ -95,6 +102,10 @@ config LIBC_VERSION
default "2_5" if LIBC_EGLIBC_V_2_5
default "trunk" if LIBC_EGLIBC_V_TRUNK
config LIBC_EGLIBC_2_15_or_later
bool
select LIBC_EGLIBC_2_14_or_later
config LIBC_EGLIBC_2_14_or_later
bool
select LIBC_EGLIBC_2_13_or_later

View File

@ -0,0 +1,78 @@
diff --git a/configure b/configure
index e5e0184..85da2bc 100755
--- a/configure
+++ b/configure
@@ -7567,40 +7567,6 @@ _ACEOF
fi
fi
-{ $as_echo "$as_me:$LINENO: checking for __builtin_expect" >&5
-$as_echo_n "checking for __builtin_expect... " >&6; }
-if test "${libc_cv_gcc_builtin_expect+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.c <<EOF
-#line $LINENO "configure"
-int foo (int a)
-{
- a = __builtin_expect (a, 10);
- return a == 10 ? 0 : 1;
-}
-EOF
-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles
- -o conftest conftest.c -lgcc >&5'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- libc_cv_gcc_builtin_expect=yes
-else
- libc_cv_gcc_builtin_expect=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_gcc_builtin_expect" >&5
-$as_echo "$libc_cv_gcc_builtin_expect" >&6; }
-if test "$libc_cv_gcc_builtin_expect" = no; then
- { { $as_echo "$as_me:$LINENO: error: support for __builtin_expect needed" >&5
-$as_echo "$as_me: error: support for __builtin_expect needed" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
{ $as_echo "$as_me:$LINENO: checking for __builtin_memset" >&5
$as_echo_n "checking for __builtin_memset... " >&6; }
if test "${libc_cv_gcc_builtin_memset+set}" = set; then
diff --git a/configure.in b/configure.in
index 4655c8a..596443d 100644
--- a/configure.in
+++ b/configure.in
@@ -2134,28 +2134,6 @@ if test "$libc_cv_c_asmcr0_bug" != 'no'; then
fi
fi
-dnl Check whether compiler understands __builtin_expect.
-AC_CACHE_CHECK(for __builtin_expect, libc_cv_gcc_builtin_expect,
-[cat > conftest.c <<EOF
-#line $LINENO "configure"
-int foo (int a)
-{
- a = __builtin_expect (a, 10);
- return a == 10 ? 0 : 1;
-}
-EOF
-dnl No \ in command here because it ends up inside ''.
-if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles
- -o conftest conftest.c -lgcc >&AS_MESSAGE_LOG_FD]); then
- libc_cv_gcc_builtin_expect=yes
-else
- libc_cv_gcc_builtin_expect=no
-fi
-rm -f conftest*])
-if test "$libc_cv_gcc_builtin_expect" = no; then
- AC_MSG_ERROR([support for __builtin_expect needed])
-fi
-
AC_CACHE_CHECK(for __builtin_memset, libc_cv_gcc_builtin_memset, [dnl
cat > conftest.c <<\EOF
void zero (void *x)