patches/gcc/4.4.5/350-index_macro.patch
author "Bryan Hundven" <bryanhundven@gmail.com>
Thu Mar 01 15:23:49 2012 -0800 (2012-03-01)
changeset 2909 28ac8fbd9e6a
permissions -rw-r--r--
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>
yann@2149
     1
-= BEGIN original header =-
yann@2149
     2
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_304-index_macro.patch
yann@2149
     3
-= END original header =-
yann@2149
     4
yann@2149
     5
diff -durN gcc-4.4.5.orig/libstdc++-v3/include/ext/rope gcc-4.4.5/libstdc++-v3/include/ext/rope
yann@2149
     6
--- gcc-4.4.5.orig/libstdc++-v3/include/ext/rope	2009-04-10 01:23:07.000000000 +0200
yann@2149
     7
+++ gcc-4.4.5/libstdc++-v3/include/ext/rope	2010-10-09 23:12:51.000000000 +0200
yann@2149
     8
@@ -54,6 +54,9 @@
yann@2149
     9
 #include <bits/gthr.h>
yann@2149
    10
 #include <tr1/functional>
yann@2149
    11
 
yann@2149
    12
+/* cope w/ index defined as macro, SuSv3 proposal */
yann@2149
    13
+#undef index
yann@2149
    14
+
yann@2149
    15
 # ifdef __GC
yann@2149
    16
 #   define __GC_CONST const
yann@2149
    17
 # else
yann@2149
    18
diff -durN gcc-4.4.5.orig/libstdc++-v3/include/ext/ropeimpl.h gcc-4.4.5/libstdc++-v3/include/ext/ropeimpl.h
yann@2149
    19
--- gcc-4.4.5.orig/libstdc++-v3/include/ext/ropeimpl.h	2009-04-10 01:23:07.000000000 +0200
yann@2149
    20
+++ gcc-4.4.5/libstdc++-v3/include/ext/ropeimpl.h	2010-10-09 23:12:51.000000000 +0200
yann@2149
    21
@@ -49,6 +49,9 @@
yann@2149
    22
 #include <ext/memory> // For uninitialized_copy_n
yann@2149
    23
 #include <ext/numeric> // For power
yann@2149
    24
 
yann@2149
    25
+/* cope w/ index defined as macro, SuSv3 proposal */
yann@2149
    26
+#undef index
yann@2149
    27
+
yann@2149
    28
 _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
yann@2149
    29
 
yann@2149
    30
   using std::size_t;