summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99403.patch
blob: 093dd1c570b0281cae987035e236a41dc0e79c19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
2010-09-20  Jie Zhang  <jie@codesourcery.com>

	Issue #5256

	libstdc++-v3/

	Backport from mainline:

	2010-05-21  Joseph Myers  <joseph@codesourcery.com>
	* acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Use GNU locale model for
	glibc 2.3 and later, but not uClibc, without an execution test.
	* configure: Regenerate.
	* doc/xml/manual/configure.xml, doc/xml/manual/prerequisites.xml,
	doc/xml/faq.xml: Update.

=== modified file 'libstdc++-v3/acinclude.m4'
Index: gcc-4.5/libstdc++-v3/acinclude.m4
===================================================================
--- gcc-4.5.orig/libstdc++-v3/acinclude.m4
+++ gcc-4.5/libstdc++-v3/acinclude.m4
@@ -1740,41 +1740,11 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
   if test $enable_clocale_flag = gnu; then
     AC_EGREP_CPP([_GLIBCXX_ok], [
     #include <features.h>
-    #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+    #if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined(__UCLIBC__)
       _GLIBCXX_ok
     #endif
     ], enable_clocale_flag=gnu, enable_clocale_flag=generic)
 
-    if test $enable_clocale = auto; then
-      # Test for bugs early in glibc-2.2.x series
-      AC_TRY_RUN([
-      #define _GNU_SOURCE 1
-      #include <locale.h>
-      #include <string.h>
-      #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
-      extern __typeof(newlocale) __newlocale;
-      extern __typeof(duplocale) __duplocale;
-      extern __typeof(strcoll_l) __strcoll_l;
-      #endif
-      int main()
-      {
-	const char __one[] = "Äuglein Augmen";
-        const char __two[] = "Äuglein";
-       	int i;
-        int j;
-        __locale_t        loc;
-        __locale_t        loc_dup;
-        loc = __newlocale(1 << LC_ALL, "de_DE", 0);
-        loc_dup = __duplocale(loc);
-        i = __strcoll_l(__one, __two, loc);
-        j = __strcoll_l(__one, __two, loc_dup);
-        return 0;
-      }
-      ],
-      [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
-      [enable_clocale_flag=generic])
-    fi
-
     # Set it to scream when it hurts.
     ac_save_CFLAGS="$CFLAGS"	
     CFLAGS="-Wimplicit-function-declaration -Werror"
Index: gcc-4.5/libstdc++-v3/configure
===================================================================
--- gcc-4.5.orig/libstdc++-v3/configure
+++ gcc-4.5/libstdc++-v3/configure
@@ -15627,7 +15627,7 @@ fi
 /* end confdefs.h.  */
 
     #include <features.h>
-    #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+    #if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined(__UCLIBC__)
       _GLIBCXX_ok
     #endif
 
@@ -15641,49 +15641,6 @@ fi
 rm -f conftest*
 
 
-    if test $enable_clocale = auto; then
-      # Test for bugs early in glibc-2.2.x series
-      if test "$cross_compiling" = yes; then :
-  enable_clocale_flag=generic
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-      #define _GNU_SOURCE 1
-      #include <locale.h>
-      #include <string.h>
-      #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
-      extern __typeof(newlocale) __newlocale;
-      extern __typeof(duplocale) __duplocale;
-      extern __typeof(strcoll_l) __strcoll_l;
-      #endif
-      int main()
-      {
-	const char __one[] = "Äuglein Augmen";
-        const char __two[] = "Äuglein";
-       	int i;
-        int j;
-        __locale_t        loc;
-        __locale_t        loc_dup;
-        loc = __newlocale(1 << LC_ALL, "de_DE", 0);
-        loc_dup = __duplocale(loc);
-        i = __strcoll_l(__one, __two, loc);
-        j = __strcoll_l(__one, __two, loc_dup);
-        return 0;
-      }
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  enable_clocale_flag=gnu
-else
-  enable_clocale_flag=generic
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-    fi
-
     # Set it to scream when it hurts.
     ac_save_CFLAGS="$CFLAGS"
     CFLAGS="-Wimplicit-function-declaration -Werror"
Index: gcc-4.5/libstdc++-v3/doc/xml/faq.xml
===================================================================
--- gcc-4.5.orig/libstdc++-v3/doc/xml/faq.xml
+++ gcc-4.5/libstdc++-v3/doc/xml/faq.xml
@@ -636,6 +636,8 @@
          C library (glibc) version 2.2.5.  That version of glibc is over a
          year old and contains necessary bugfixes.  Many GNU/Linux distros make
          glibc version 2.3.x available now.
+         libstdc++ 4.6.0 and later require glibc 2.3 or later for this
+         localization and formatting code.
       </para>
       <para>The guideline is simple:  the more recent the C++ library, the
          more recent the C library.  (This is also documented in the main
Index: gcc-4.5/libstdc++-v3/doc/xml/manual/configure.xml
===================================================================
--- gcc-4.5.orig/libstdc++-v3/doc/xml/manual/configure.xml
+++ gcc-4.5/libstdc++-v3/doc/xml/manual/configure.xml
@@ -113,8 +113,7 @@
      <para>If not explicitly specified, the configure proccess tries
       to guess the most suitable package from the choices above. The
       default is 'generic'. On glibc-based systems of sufficient
-      vintage (2.2.5 and newer) and capability (with installed DE and
-      FR locale data), 'gnu' is automatically selected. This option
+      vintage (2.3 and newer), 'gnu' is automatically selected. This option
       can change the library ABI.
      </para>
  </listitem></varlistentry>
Index: gcc-4.5/libstdc++-v3/doc/xml/manual/prerequisites.xml
===================================================================
--- gcc-4.5.orig/libstdc++-v3/doc/xml/manual/prerequisites.xml
+++ gcc-4.5/libstdc++-v3/doc/xml/manual/prerequisites.xml
@@ -52,16 +52,8 @@
 	<para>
 	  If gcc 3.1.0 or later on is being used on linux, an attempt
 	  will be made to use "C" library functionality necessary for
-	  C++ named locale support.  For gcc 3.2.1 and later, this
-	  means that glibc 2.2.5 or later is required and the "C"
-	  library de_DE locale information must be installed.
-	</para>
-
-	<para>
-	  Note however that the sanity checks involving the de_DE
-	  locale are skipped when an explicit --enable-clocale=gnu
-	  configure option is used: only the basic checks are carried
-	  out, defending against misconfigurations.
+	  C++ named locale support.  For gcc 4.6.0 and later, this
+	  means that glibc 2.3 or later is required.
 	</para>
 
 	<para>
OpenPOWER on IntegriCloud