diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-03-31 10:32:57 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-03-31 10:32:57 +0100 |
commit | e9522df693e645c55794f3b8bf83a2b006ae1683 (patch) | |
tree | aec9c1477cc255ee3105244fc9976a09906c546b | |
parent | cc0bd4bed23a697be5d35aee8d4ae4340e7a0226 (diff) | |
download | poky-e9522df693e645c55794f3b8bf83a2b006ae1683.tar.gz |
gcc: Drop 4.1.2 as its unused
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
32 files changed, 0 insertions, 4535 deletions
diff --git a/meta/packages/gcc/gcc-4.1.2.inc b/meta/packages/gcc/gcc-4.1.2.inc deleted file mode 100644 index f590778e47..0000000000 --- a/meta/packages/gcc/gcc-4.1.2.inc +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | require gcc-common.inc | ||
2 | |||
3 | DEPENDS =+ "mpfr gmp" | ||
4 | |||
5 | SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.2/gcc-4.1.2.tar.bz2 \ | ||
6 | file://100-uclibc-conf.patch;patch=1 \ | ||
7 | file://110-arm-eabi.patch;patch=1 \ | ||
8 | file://200-uclibc-locale.patch;patch=1 \ | ||
9 | file://300-libstdc++-pic.patch;patch=1 \ | ||
10 | file://301-missing-execinfo_h.patch;patch=1 \ | ||
11 | file://302-c99-snprintf.patch;patch=1 \ | ||
12 | file://303-c99-complex-ugly-hack.patch;patch=1 \ | ||
13 | file://304-index_macro.patch;patch=1 \ | ||
14 | file://602-sdk-libstdc++-includes.patch;patch=1 \ | ||
15 | file://740-sh-pr24836.patch;patch=1 \ | ||
16 | file://800-arm-bigendian.patch;patch=1 \ | ||
17 | file://arm-nolibfloat.patch;patch=1 \ | ||
18 | file://arm-softfloat.patch;patch=1 \ | ||
19 | file://gcc41-configure.in.patch;patch=1 \ | ||
20 | file://arm-thumb.patch;patch=1 \ | ||
21 | file://arm-thumb-cache.patch;patch=1 \ | ||
22 | file://ldflags.patch;patch=1 \ | ||
23 | file://zecke-xgcc-cpp.patch;patch=1 \ | ||
24 | file://unbreak-armv4t.patch;patch=1 \ | ||
25 | file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \ | ||
26 | file://cache-amnesia.patch;patch=1 \ | ||
27 | file://gfortran.patch;patch=1 \ | ||
28 | file://gcc-4.0.2-e300c2c3.patch;patch=1 \ | ||
29 | file://pr34130.patch;patch=1 \ | ||
30 | " | ||
31 | |||
32 | SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " | ||
33 | |||
34 | SRC_URI_avr32 = "http://www.angstrom-distribution.org/unstable/sources/gcc-4.1.2-atmel.1.1.0.tar.gz \ | ||
35 | # file://100-uclibc-conf.patch;patch=1 \ | ||
36 | # file://200-uclibc-locale.patch;patch=1 \ | ||
37 | # file://300-libstdc++-pic.patch;patch=1 \ | ||
38 | file://301-missing-execinfo_h.patch;patch=1 \ | ||
39 | file://302-c99-snprintf.patch;patch=1 \ | ||
40 | file://303-c99-complex-ugly-hack.patch;patch=1 \ | ||
41 | file://304-index_macro.patch;patch=1 \ | ||
42 | file://602-sdk-libstdc++-includes.patch;patch=1 \ | ||
43 | file://gcc41-configure.in.patch;patch=1 \ | ||
44 | file://ldflags.patch;patch=1 \ | ||
45 | file://zecke-xgcc-cpp.patch;patch=1 \ | ||
46 | file://cache-amnesia.patch;patch=1 \ | ||
47 | " | ||
48 | |||
49 | do_compile_prepend_avr32() { | ||
50 | ln -sf ${S}/libstdc++-v3/config/os/uclibc/ ${S}/libstdc++-v3/config/os/uclibc-linux | ||
51 | } | ||
52 | |||
53 | |||
54 | # Language Overrides | ||
55 | FORTRAN = "" | ||
56 | JAVA = "" | ||
57 | |||
58 | EXTRA_OECONF_BASE = "--disable-libssp --disable-libmudflap" | ||
59 | |||
60 | ARM_INSTRUCTION_SET = "arm" | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/100-uclibc-conf.patch b/meta/packages/gcc/gcc-4.1.2/100-uclibc-conf.patch deleted file mode 100644 index 49d576c7dd..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/100-uclibc-conf.patch +++ /dev/null | |||
@@ -1,544 +0,0 @@ | |||
1 | --- gcc-4.1.0/gcc/config/t-linux-uclibc | ||
2 | +++ gcc-4.1.0/gcc/config/t-linux-uclibc | ||
3 | @@ -0,0 +1,5 @@ | ||
4 | +# Remove glibc specific files added in t-linux | ||
5 | +SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES)) | ||
6 | + | ||
7 | +# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc | ||
8 | +LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH)) | ||
9 | --- gcc-4.1.0/gcc/config.gcc | ||
10 | +++ gcc-4.1.0/gcc/config.gcc | ||
11 | @@ -1887,7 +1887,7 @@ s390x-ibm-tpf*) | ||
12 | ;; | ||
13 | sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \ | ||
14 | sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \ | ||
15 | - sh-*-linux* | sh[346lbe]*-*-linux* | \ | ||
16 | + sh*-*-linux* | sh[346lbe]*-*-linux* | \ | ||
17 | sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \ | ||
18 | sh64-*-netbsd* | sh64l*-*-netbsd*) | ||
19 | tmake_file="${tmake_file} sh/t-sh sh/t-elf" | ||
20 | @@ -2341,6 +2341,12 @@ m32c-*-elf*) | ||
21 | ;; | ||
22 | esac | ||
23 | |||
24 | +# Rather than hook into each target, just do it after all the linux | ||
25 | +# targets have been processed | ||
26 | +case ${target} in | ||
27 | +*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc" | ||
28 | +esac | ||
29 | + | ||
30 | case ${target} in | ||
31 | i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1) | ||
32 | tmake_file="${tmake_file} i386/t-gmm_malloc" | ||
33 | --- gcc-4.1.0/boehm-gc/configure | ||
34 | +++ gcc-4.1.0/boehm-gc/configure | ||
35 | @@ -4320,6 +4320,11 @@ linux-gnu*) | ||
36 | lt_cv_deplibs_check_method=pass_all | ||
37 | ;; | ||
38 | |||
39 | +linux-uclibc*) | ||
40 | + lt_cv_deplibs_check_method=pass_all | ||
41 | + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` | ||
42 | + ;; | ||
43 | + | ||
44 | netbsd* | knetbsd*-gnu) | ||
45 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | ||
46 | lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' | ||
47 | --- gcc-4.1.0/configure | ||
48 | +++ gcc-4.1.0/configure | ||
49 | @@ -1133,7 +1133,7 @@ no) | ||
50 | ;; | ||
51 | "") | ||
52 | case "${target}" in | ||
53 | - *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu) | ||
54 | + *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*) | ||
55 | # Enable libmudflap by default in GNU and friends. | ||
56 | ;; | ||
57 | *-*-freebsd*) | ||
58 | --- gcc-4.1.0/configure.in | ||
59 | +++ gcc-4.1.0/configure.in | ||
60 | @@ -341,7 +341,7 @@ no) | ||
61 | ;; | ||
62 | "") | ||
63 | case "${target}" in | ||
64 | - *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu) | ||
65 | + *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*) | ||
66 | # Enable libmudflap by default in GNU and friends. | ||
67 | ;; | ||
68 | *-*-freebsd*) | ||
69 | --- gcc-4.1.0/contrib/regression/objs-gcc.sh | ||
70 | +++ gcc-4.1.0/contrib/regression/objs-gcc.sh | ||
71 | @@ -105,6 +105,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H | ||
72 | then | ||
73 | make all-gdb all-dejagnu all-ld || exit 1 | ||
74 | make install-gdb install-dejagnu install-ld || exit 1 | ||
75 | +elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] | ||
76 | + then | ||
77 | + make all-gdb all-dejagnu all-ld || exit 1 | ||
78 | + make install-gdb install-dejagnu install-ld || exit 1 | ||
79 | elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then | ||
80 | make bootstrap || exit 1 | ||
81 | make install || exit 1 | ||
82 | --- gcc-4.1.0/gcc/config/alpha/linux-elf.h | ||
83 | +++ gcc-4.1.0/gcc/config/alpha/linux-elf.h | ||
84 | @@ -27,7 +27,11 @@ Boston, MA 02110-1301, USA. */ | ||
85 | #define SUBTARGET_EXTRA_SPECS \ | ||
86 | { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, | ||
87 | |||
88 | +#if defined USE_UCLIBC | ||
89 | +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
90 | +#else | ||
91 | #define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
92 | +#endif | ||
93 | |||
94 | #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ | ||
95 | %{O*:-O3} %{!O*:-O1} \ | ||
96 | --- gcc-4.1.0/gcc/config/arm/linux-elf.h | ||
97 | +++ gcc-4.1.0/gcc/config/arm/linux-elf.h | ||
98 | @@ -51,7 +51,11 @@ | ||
99 | |||
100 | #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" | ||
101 | |||
102 | +#ifdef USE_UCLIBC | ||
103 | +#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0" | ||
104 | +#else | ||
105 | #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2" | ||
106 | +#endif | ||
107 | |||
108 | #define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \ | ||
109 | %{b} \ | ||
110 | --- gcc-4.1.0/gcc/config/cris/linux.h | ||
111 | +++ gcc-4.1.0/gcc/config/cris/linux.h | ||
112 | @@ -73,6 +73,25 @@ Boston, MA 02110-1301, USA. */ | ||
113 | #undef CRIS_DEFAULT_CPU_VERSION | ||
114 | #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG | ||
115 | |||
116 | +#ifdef USE_UCLIBC | ||
117 | + | ||
118 | +#undef CRIS_SUBTARGET_VERSION | ||
119 | +#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc" | ||
120 | + | ||
121 | +#undef CRIS_LINK_SUBTARGET_SPEC | ||
122 | +#define CRIS_LINK_SUBTARGET_SPEC \ | ||
123 | + "-mcrislinux\ | ||
124 | + -rpath-link include/asm/../..%s\ | ||
125 | + %{shared} %{static}\ | ||
126 | + %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\ | ||
127 | + %{!shared: \ | ||
128 | + %{!static: \ | ||
129 | + %{rdynamic:-export-dynamic} \ | ||
130 | + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \ | ||
131 | + %{!r:%{O2|O3: --gc-sections}}" | ||
132 | + | ||
133 | +#else /* USE_UCLIBC */ | ||
134 | + | ||
135 | #undef CRIS_SUBTARGET_VERSION | ||
136 | #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" | ||
137 | |||
138 | @@ -87,6 +106,8 @@ Boston, MA 02110-1301, USA. */ | ||
139 | %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\ | ||
140 | %{!r:%{O2|O3: --gc-sections}}" | ||
141 | |||
142 | +#endif /* USE_UCLIBC */ | ||
143 | + | ||
144 | |||
145 | /* Node: Run-time Target */ | ||
146 | |||
147 | --- gcc-4.1.0/gcc/config/i386/linux.h | ||
148 | +++ gcc-4.1.0/gcc/config/i386/linux.h | ||
149 | @@ -107,6 +107,11 @@ Boston, MA 02110-1301, USA. */ | ||
150 | #define LINK_EMULATION "elf_i386" | ||
151 | #define DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
152 | |||
153 | +#if defined USE_UCLIBC | ||
154 | +#undef DYNAMIC_LINKER | ||
155 | +#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
156 | +#endif | ||
157 | + | ||
158 | #undef SUBTARGET_EXTRA_SPECS | ||
159 | #define SUBTARGET_EXTRA_SPECS \ | ||
160 | { "link_emulation", LINK_EMULATION },\ | ||
161 | --- gcc-4.1.0/gcc/config/i386/linux64.h | ||
162 | +++ gcc-4.1.0/gcc/config/i386/linux64.h | ||
163 | @@ -54,14 +54,21 @@ Boston, MA 02110-1301, USA. */ | ||
164 | When the -shared link option is used a final link is not being | ||
165 | done. */ | ||
166 | |||
167 | +#ifdef USE_UCLIBC | ||
168 | +#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
169 | +#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0" | ||
170 | +#else | ||
171 | +#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
172 | +#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2" | ||
173 | +#endif | ||
174 | #undef LINK_SPEC | ||
175 | #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \ | ||
176 | %{shared:-shared} \ | ||
177 | %{!shared: \ | ||
178 | %{!static: \ | ||
179 | %{rdynamic:-export-dynamic} \ | ||
180 | - %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ | ||
181 | - %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \ | ||
182 | + %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \ | ||
183 | + %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \ | ||
184 | %{static:-static}}" | ||
185 | |||
186 | /* Similar to standard Linux, but adding -ffast-math support. */ | ||
187 | --- gcc-4.1.0/gcc/config/ia64/linux.h | ||
188 | +++ gcc-4.1.0/gcc/config/ia64/linux.h | ||
189 | @@ -37,13 +37,18 @@ do { \ | ||
190 | /* Define this for shared library support because it isn't in the main | ||
191 | linux.h file. */ | ||
192 | |||
193 | +#ifdef USE_UCLIBC | ||
194 | +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
195 | +#else | ||
196 | +#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2" | ||
197 | +#endif | ||
198 | #undef LINK_SPEC | ||
199 | #define LINK_SPEC "\ | ||
200 | %{shared:-shared} \ | ||
201 | %{!shared: \ | ||
202 | %{!static: \ | ||
203 | %{rdynamic:-export-dynamic} \ | ||
204 | - %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \ | ||
205 | + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ | ||
206 | %{static:-static}}" | ||
207 | |||
208 | |||
209 | --- gcc-4.1.0/gcc/config/m68k/linux.h | ||
210 | +++ gcc-4.1.0/gcc/config/m68k/linux.h | ||
211 | @@ -123,12 +123,17 @@ Boston, MA 02110-1301, USA. */ | ||
212 | |||
213 | /* If ELF is the default format, we should not use /lib/elf. */ | ||
214 | |||
215 | +#ifdef USE_UCLIBC | ||
216 | +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
217 | +#else | ||
218 | +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" | ||
219 | +#endif | ||
220 | #undef LINK_SPEC | ||
221 | #define LINK_SPEC "-m m68kelf %{shared} \ | ||
222 | %{!shared: \ | ||
223 | %{!static: \ | ||
224 | %{rdynamic:-export-dynamic} \ | ||
225 | - %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \ | ||
226 | + %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ | ||
227 | %{static}}" | ||
228 | |||
229 | /* For compatibility with linux/a.out */ | ||
230 | --- gcc-4.1.0/gcc/config/mips/linux.h | ||
231 | +++ gcc-4.1.0/gcc/config/mips/linux.h | ||
232 | @@ -105,6 +105,11 @@ Boston, MA 02110-1301, USA. */ | ||
233 | |||
234 | /* Borrowed from sparc/linux.h */ | ||
235 | #undef LINK_SPEC | ||
236 | +#ifdef USE_UCLIBC | ||
237 | +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
238 | +#else | ||
239 | +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" | ||
240 | +#endif | ||
241 | #define LINK_SPEC \ | ||
242 | "%(endian_spec) \ | ||
243 | %{shared:-shared} \ | ||
244 | @@ -112,7 +117,7 @@ Boston, MA 02110-1301, USA. */ | ||
245 | %{!ibcs: \ | ||
246 | %{!static: \ | ||
247 | %{rdynamic:-export-dynamic} \ | ||
248 | - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ | ||
249 | + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ | ||
250 | %{static:-static}}}" | ||
251 | |||
252 | #undef SUBTARGET_ASM_SPEC | ||
253 | --- gcc-4.1.0/gcc/config/pa/pa-linux.h | ||
254 | +++ gcc-4.1.0/gcc/config/pa/pa-linux.h | ||
255 | @@ -49,13 +49,18 @@ Boston, MA 02110-1301, USA. */ | ||
256 | /* Define this for shared library support because it isn't in the main | ||
257 | linux.h file. */ | ||
258 | |||
259 | +#ifdef USE_UCLIBC | ||
260 | +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
261 | +#else | ||
262 | +#define ELF_DYNAMIC_LINKER "/lib/ld.so.1" | ||
263 | +#endif | ||
264 | #undef LINK_SPEC | ||
265 | #define LINK_SPEC "\ | ||
266 | %{shared:-shared} \ | ||
267 | %{!shared: \ | ||
268 | %{!static: \ | ||
269 | %{rdynamic:-export-dynamic} \ | ||
270 | - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ | ||
271 | + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ | ||
272 | %{static:-static}}" | ||
273 | |||
274 | /* glibc's profiling functions don't need gcc to allocate counters. */ | ||
275 | --- gcc-4.1.0/gcc/config/rs6000/linux.h | ||
276 | +++ gcc-4.1.0/gcc/config/rs6000/linux.h | ||
277 | @@ -72,7 +72,11 @@ | ||
278 | #define LINK_START_DEFAULT_SPEC "%(link_start_linux)" | ||
279 | |||
280 | #undef LINK_OS_DEFAULT_SPEC | ||
281 | +#ifdef USE_UCLIBC | ||
282 | +#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)" | ||
283 | +#else | ||
284 | #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" | ||
285 | +#endif | ||
286 | |||
287 | #define LINK_GCC_C_SEQUENCE_SPEC \ | ||
288 | "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" | ||
289 | --- gcc-4.1.0/gcc/config/rs6000/sysv4.h | ||
290 | +++ gcc-4.1.0/gcc/config/rs6000/sysv4.h | ||
291 | @@ -866,6 +866,7 @@ extern int fixuplabelno; | ||
292 | mcall-linux : %(link_os_linux) ; \ | ||
293 | mcall-gnu : %(link_os_gnu) ; \ | ||
294 | mcall-netbsd : %(link_os_netbsd) ; \ | ||
295 | + mcall-linux-uclibc : %(link_os_linux_uclibc); \ | ||
296 | mcall-openbsd: %(link_os_openbsd) ; \ | ||
297 | : %(link_os_default) }" | ||
298 | |||
299 | @@ -1043,6 +1044,10 @@ extern int fixuplabelno; | ||
300 | %{rdynamic:-export-dynamic} \ | ||
301 | %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}" | ||
302 | |||
303 | +#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \ | ||
304 | + %{rdynamic:-export-dynamic} \ | ||
305 | + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}" | ||
306 | + | ||
307 | #if defined(HAVE_LD_EH_FRAME_HDR) | ||
308 | # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " | ||
309 | #endif | ||
310 | @@ -1209,6 +1214,7 @@ ncrtn.o%s" | ||
311 | { "link_os_sim", LINK_OS_SIM_SPEC }, \ | ||
312 | { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \ | ||
313 | { "link_os_linux", LINK_OS_LINUX_SPEC }, \ | ||
314 | + { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \ | ||
315 | { "link_os_gnu", LINK_OS_GNU_SPEC }, \ | ||
316 | { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \ | ||
317 | { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ | ||
318 | --- gcc-4.1.0/gcc/config/s390/linux.h | ||
319 | +++ gcc-4.1.0/gcc/config/s390/linux.h | ||
320 | @@ -77,6 +77,13 @@ Software Foundation, 51 Franklin Street, | ||
321 | #define MULTILIB_DEFAULTS { "m31" } | ||
322 | #endif | ||
323 | |||
324 | +#ifdef USE_UCLIBC | ||
325 | +#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
326 | +#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0" | ||
327 | +#else | ||
328 | +#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1" | ||
329 | +#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1" | ||
330 | +#endif | ||
331 | #undef LINK_SPEC | ||
332 | #define LINK_SPEC \ | ||
333 | "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ | ||
334 | @@ -86,8 +93,8 @@ Software Foundation, 51 Franklin Street, | ||
335 | %{!static: \ | ||
336 | %{rdynamic:-export-dynamic} \ | ||
337 | %{!dynamic-linker: \ | ||
338 | - %{m31:-dynamic-linker /lib/ld.so.1} \ | ||
339 | - %{m64:-dynamic-linker /lib/ld64.so.1}}}}" | ||
340 | + %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \ | ||
341 | + %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}" | ||
342 | |||
343 | |||
344 | #define TARGET_ASM_FILE_END file_end_indicate_exec_stack | ||
345 | --- gcc-4.1.0/gcc/config/sh/linux.h | ||
346 | +++ gcc-4.1.0/gcc/config/sh/linux.h | ||
347 | @@ -56,12 +56,21 @@ Boston, MA 02110-1301, USA. */ | ||
348 | #undef SUBTARGET_LINK_EMUL_SUFFIX | ||
349 | #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" | ||
350 | #undef SUBTARGET_LINK_SPEC | ||
351 | +#ifdef USE_UCLIBC | ||
352 | +#define SUBTARGET_LINK_SPEC \ | ||
353 | + "%{shared:-shared} \ | ||
354 | + %{!static: \ | ||
355 | + %{rdynamic:-export-dynamic} \ | ||
356 | + %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \ | ||
357 | + %{static:-static}" | ||
358 | +#else | ||
359 | #define SUBTARGET_LINK_SPEC \ | ||
360 | "%{shared:-shared} \ | ||
361 | %{!static: \ | ||
362 | %{rdynamic:-export-dynamic} \ | ||
363 | %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ | ||
364 | %{static:-static}" | ||
365 | +#endif | ||
366 | |||
367 | /* Output assembler code to STREAM to call the profiler. */ | ||
368 | |||
369 | --- gcc-4.1.0/gcc/config/sparc/linux.h | ||
370 | +++ gcc-4.1.0/gcc/config/sparc/linux.h | ||
371 | @@ -125,6 +125,11 @@ Boston, MA 02110-1301, USA. */ | ||
372 | |||
373 | /* If ELF is the default format, we should not use /lib/elf. */ | ||
374 | |||
375 | +#ifdef USE_UCLIBC | ||
376 | +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
377 | +#else | ||
378 | +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
379 | +#endif | ||
380 | #undef LINK_SPEC | ||
381 | #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ | ||
382 | %{!mno-relax:%{!r:-relax}} \ | ||
383 | @@ -132,7 +137,7 @@ Boston, MA 02110-1301, USA. */ | ||
384 | %{!ibcs: \ | ||
385 | %{!static: \ | ||
386 | %{rdynamic:-export-dynamic} \ | ||
387 | - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ | ||
388 | + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ | ||
389 | %{static:-static}}}" | ||
390 | |||
391 | /* The sun bundled assembler doesn't accept -Yd, (and neither does gas). | ||
392 | --- gcc-4.1.0/gcc/config/sparc/linux64.h | ||
393 | +++ gcc-4.1.0/gcc/config/sparc/linux64.h | ||
394 | @@ -162,12 +162,17 @@ Boston, MA 02110-1301, USA. */ | ||
395 | { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ | ||
396 | { "link_arch", LINK_ARCH_SPEC }, | ||
397 | |||
398 | +#ifdef USE_UCLIBC | ||
399 | +#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
400 | +#else | ||
401 | +#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
402 | +#endif | ||
403 | #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ | ||
404 | %{!shared: \ | ||
405 | %{!ibcs: \ | ||
406 | %{!static: \ | ||
407 | %{rdynamic:-export-dynamic} \ | ||
408 | - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ | ||
409 | + %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \ | ||
410 | %{static:-static}}} \ | ||
411 | " | ||
412 | |||
413 | --- gcc-4.1.0/libffi/configure | ||
414 | +++ gcc-4.1.0/libffi/configure | ||
415 | @@ -3457,6 +3457,11 @@ linux-gnu*) | ||
416 | lt_cv_deplibs_check_method=pass_all | ||
417 | ;; | ||
418 | |||
419 | +linux-uclibc*) | ||
420 | + lt_cv_deplibs_check_method=pass_all | ||
421 | + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` | ||
422 | + ;; | ||
423 | + | ||
424 | netbsd* | knetbsd*-gnu) | ||
425 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | ||
426 | lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' | ||
427 | --- gcc-4.1.0/libgfortran/configure | ||
428 | +++ gcc-4.1.0/libgfortran/configure | ||
429 | @@ -3699,6 +3699,11 @@ linux-gnu*) | ||
430 | lt_cv_deplibs_check_method=pass_all | ||
431 | ;; | ||
432 | |||
433 | +linux-uclibc*) | ||
434 | + lt_cv_deplibs_check_method=pass_all | ||
435 | + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` | ||
436 | + ;; | ||
437 | + | ||
438 | netbsd* | knetbsd*-gnu) | ||
439 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | ||
440 | lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' | ||
441 | --- gcc-4.1.0/libjava/configure | ||
442 | +++ gcc-4.1.0/libjava/configure | ||
443 | @@ -5137,6 +5137,11 @@ linux-gnu*) | ||
444 | lt_cv_deplibs_check_method=pass_all | ||
445 | ;; | ||
446 | |||
447 | +linux-uclibc*) | ||
448 | + lt_cv_deplibs_check_method=pass_all | ||
449 | + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` | ||
450 | + ;; | ||
451 | + | ||
452 | netbsd* | knetbsd*-gnu) | ||
453 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | ||
454 | lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' | ||
455 | --- gcc-4.1.0/libmudflap/configure | ||
456 | +++ gcc-4.1.0/libmudflap/configure | ||
457 | @@ -5382,6 +5382,11 @@ linux-gnu*) | ||
458 | lt_cv_deplibs_check_method=pass_all | ||
459 | ;; | ||
460 | |||
461 | +linux-uclibc*) | ||
462 | + lt_cv_deplibs_check_method=pass_all | ||
463 | + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` | ||
464 | + ;; | ||
465 | + | ||
466 | netbsd* | knetbsd*-gnu) | ||
467 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | ||
468 | lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' | ||
469 | --- gcc-4.1.0/libobjc/configure | ||
470 | +++ gcc-4.1.0/libobjc/configure | ||
471 | @@ -3312,6 +3312,11 @@ linux-gnu*) | ||
472 | lt_cv_deplibs_check_method=pass_all | ||
473 | ;; | ||
474 | |||
475 | +linux-uclibc*) | ||
476 | + lt_cv_deplibs_check_method=pass_all | ||
477 | + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` | ||
478 | + ;; | ||
479 | + | ||
480 | netbsd* | knetbsd*-gnu) | ||
481 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | ||
482 | lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' | ||
483 | --- gcc-4.1.0/libtool.m4 | ||
484 | +++ gcc-4.1.0/libtool.m4 | ||
485 | @@ -743,6 +743,11 @@ linux-gnu*) | ||
486 | lt_cv_deplibs_check_method=pass_all | ||
487 | ;; | ||
488 | |||
489 | +linux-uclibc*) | ||
490 | + lt_cv_deplibs_check_method=pass_all | ||
491 | + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` | ||
492 | + ;; | ||
493 | + | ||
494 | netbsd* | knetbsd*-gnu) | ||
495 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | ||
496 | [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] | ||
497 | --- gcc-4.1.0/ltconfig | ||
498 | +++ gcc-4.1.0/ltconfig | ||
499 | @@ -603,6 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- | ||
500 | |||
501 | # Transform linux* to *-*-linux-gnu*, to support old configure scripts. | ||
502 | case $host_os in | ||
503 | +linux-uclibc*) ;; | ||
504 | linux-gnu*) ;; | ||
505 | linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` | ||
506 | esac | ||
507 | @@ -1274,6 +1275,23 @@ linux-gnu*) | ||
508 | dynamic_linker='GNU/Linux ld.so' | ||
509 | ;; | ||
510 | |||
511 | +linux-uclibc*) | ||
512 | + version_type=linux | ||
513 | + need_lib_prefix=no | ||
514 | + need_version=no | ||
515 | + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | ||
516 | + soname_spec='${libname}${release}.so$major' | ||
517 | + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | ||
518 | + shlibpath_var=LD_LIBRARY_PATH | ||
519 | + shlibpath_overrides_runpath=no | ||
520 | + # This implies no fast_install, which is unacceptable. | ||
521 | + # Some rework will be needed to allow for fast_install | ||
522 | + # before this can be enabled. | ||
523 | + hardcode_into_libs=yes | ||
524 | + # Assume using the uClibc dynamic linker. | ||
525 | + dynamic_linker="uClibc ld.so" | ||
526 | + ;; | ||
527 | + | ||
528 | netbsd*) | ||
529 | need_lib_prefix=no | ||
530 | need_version=no | ||
531 | --- gcc-4.1.0/zlib/configure | ||
532 | +++ gcc-4.1.0/zlib/configure | ||
533 | @@ -3426,6 +3426,11 @@ linux-gnu*) | ||
534 | lt_cv_deplibs_check_method=pass_all | ||
535 | ;; | ||
536 | |||
537 | +linux-uclibc*) | ||
538 | + lt_cv_deplibs_check_method=pass_all | ||
539 | + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` | ||
540 | + ;; | ||
541 | + | ||
542 | netbsd* | knetbsd*-gnu) | ||
543 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | ||
544 | lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/110-arm-eabi.patch b/meta/packages/gcc/gcc-4.1.2/110-arm-eabi.patch deleted file mode 100644 index acebe5308f..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/110-arm-eabi.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | --- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300 | ||
2 | +++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300 | ||
3 | @@ -674,7 +674,7 @@ | ||
4 | tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" | ||
5 | tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm" | ||
6 | case ${target} in | ||
7 | - arm*-*-linux-gnueabi) | ||
8 | + arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) | ||
9 | tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h" | ||
10 | tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi" | ||
11 | # The BPABI long long divmod functions return a 128-bit value in | ||
12 | |||
13 | diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h | ||
14 | --- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300 | ||
15 | +++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400 | ||
16 | @@ -53,7 +53,11 @@ | ||
17 | /* Use ld-linux.so.3 so that it will be possible to run "classic" | ||
18 | GNU/Linux binaries on an EABI system. */ | ||
19 | #undef LINUX_TARGET_INTERPRETER | ||
20 | +#ifdef USE_UCLIBC | ||
21 | +#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0" | ||
22 | +#else | ||
23 | #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3" | ||
24 | +#endif | ||
25 | |||
26 | /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to | ||
27 | use the GNU/Linux version, not the generic BPABI version. */ | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/200-uclibc-locale.patch b/meta/packages/gcc/gcc-4.1.2/200-uclibc-locale.patch deleted file mode 100644 index e5d712e723..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/200-uclibc-locale.patch +++ /dev/null | |||
@@ -1,3239 +0,0 @@ | |||
1 | --- gcc-4.1.0-dist/libstdc++-v3/acinclude.m4 | ||
2 | +++ gcc-4.1.0/libstdc++-v3/acinclude.m4 | ||
3 | @@ -1071,7 +1071,7 @@ | ||
4 | AC_MSG_CHECKING([for C locale to use]) | ||
5 | GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@], | ||
6 | [use MODEL for target locale package], | ||
7 | - [permit generic|gnu|ieee_1003.1-2001|yes|no|auto]) | ||
8 | + [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto]) | ||
9 | |||
10 | # If they didn't use this option switch, or if they specified --enable | ||
11 | # with no specific model, we'll have to look for one. If they | ||
12 | @@ -1087,6 +1087,9 @@ | ||
13 | # Default to "generic". | ||
14 | if test $enable_clocale_flag = auto; then | ||
15 | case ${target_os} in | ||
16 | + *-uclibc*) | ||
17 | + enable_clocale_flag=uclibc | ||
18 | + ;; | ||
19 | linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) | ||
20 | AC_EGREP_CPP([_GLIBCXX_ok], [ | ||
21 | #include <features.h> | ||
22 | @@ -1230,6 +1233,40 @@ | ||
23 | CTIME_CC=config/locale/generic/time_members.cc | ||
24 | CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h | ||
25 | ;; | ||
26 | + uclibc) | ||
27 | + AC_MSG_RESULT(uclibc) | ||
28 | + | ||
29 | + # Declare intention to use gettext, and add support for specific | ||
30 | + # languages. | ||
31 | + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT | ||
32 | + ALL_LINGUAS="de fr" | ||
33 | + | ||
34 | + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. | ||
35 | + AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) | ||
36 | + if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then | ||
37 | + USE_NLS=yes | ||
38 | + fi | ||
39 | + # Export the build objects. | ||
40 | + for ling in $ALL_LINGUAS; do \ | ||
41 | + glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ | ||
42 | + glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ | ||
43 | + done | ||
44 | + AC_SUBST(glibcxx_MOFILES) | ||
45 | + AC_SUBST(glibcxx_POFILES) | ||
46 | + | ||
47 | + CLOCALE_H=config/locale/uclibc/c_locale.h | ||
48 | + CLOCALE_CC=config/locale/uclibc/c_locale.cc | ||
49 | + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc | ||
50 | + CCOLLATE_CC=config/locale/uclibc/collate_members.cc | ||
51 | + CCTYPE_CC=config/locale/uclibc/ctype_members.cc | ||
52 | + CMESSAGES_H=config/locale/uclibc/messages_members.h | ||
53 | + CMESSAGES_CC=config/locale/uclibc/messages_members.cc | ||
54 | + CMONEY_CC=config/locale/uclibc/monetary_members.cc | ||
55 | + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc | ||
56 | + CTIME_H=config/locale/uclibc/time_members.h | ||
57 | + CTIME_CC=config/locale/uclibc/time_members.cc | ||
58 | + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h | ||
59 | + ;; | ||
60 | esac | ||
61 | |||
62 | # This is where the testsuite looks for locale catalogs, using the | ||
63 | --- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
64 | +++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h | ||
65 | @@ -0,0 +1,63 @@ | ||
66 | +// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- | ||
67 | + | ||
68 | +// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. | ||
69 | +// | ||
70 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
71 | +// software; you can redistribute it and/or modify it under the | ||
72 | +// terms of the GNU General Public License as published by the | ||
73 | +// Free Software Foundation; either version 2, or (at your option) | ||
74 | +// any later version. | ||
75 | + | ||
76 | +// This library is distributed in the hope that it will be useful, | ||
77 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
78 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
79 | +// GNU General Public License for more details. | ||
80 | + | ||
81 | +// You should have received a copy of the GNU General Public License along | ||
82 | +// with this library; see the file COPYING. If not, write to the Free | ||
83 | +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
84 | +// USA. | ||
85 | + | ||
86 | +// As a special exception, you may use this file as part of a free software | ||
87 | +// library without restriction. Specifically, if other files instantiate | ||
88 | +// templates or use macros or inline functions from this file, or you compile | ||
89 | +// this file and link it with other files to produce an executable, this | ||
90 | +// file does not by itself cause the resulting executable to be covered by | ||
91 | +// the GNU General Public License. This exception does not however | ||
92 | +// invalidate any other reasons why the executable file might be covered by | ||
93 | +// the GNU General Public License. | ||
94 | + | ||
95 | +// Written by Jakub Jelinek <jakub@redhat.com> | ||
96 | + | ||
97 | +#include <bits/c++config.h> | ||
98 | +#include <clocale> | ||
99 | + | ||
100 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
101 | +#warning clean this up | ||
102 | +#endif | ||
103 | + | ||
104 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
105 | + | ||
106 | +extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l; | ||
107 | +extern "C" __typeof(strcoll_l) __strcoll_l; | ||
108 | +extern "C" __typeof(strftime_l) __strftime_l; | ||
109 | +extern "C" __typeof(strtod_l) __strtod_l; | ||
110 | +extern "C" __typeof(strtof_l) __strtof_l; | ||
111 | +extern "C" __typeof(strtold_l) __strtold_l; | ||
112 | +extern "C" __typeof(strxfrm_l) __strxfrm_l; | ||
113 | +extern "C" __typeof(newlocale) __newlocale; | ||
114 | +extern "C" __typeof(freelocale) __freelocale; | ||
115 | +extern "C" __typeof(duplocale) __duplocale; | ||
116 | +extern "C" __typeof(uselocale) __uselocale; | ||
117 | + | ||
118 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
119 | +extern "C" __typeof(iswctype_l) __iswctype_l; | ||
120 | +extern "C" __typeof(towlower_l) __towlower_l; | ||
121 | +extern "C" __typeof(towupper_l) __towupper_l; | ||
122 | +extern "C" __typeof(wcscoll_l) __wcscoll_l; | ||
123 | +extern "C" __typeof(wcsftime_l) __wcsftime_l; | ||
124 | +extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; | ||
125 | +extern "C" __typeof(wctype_l) __wctype_l; | ||
126 | +#endif | ||
127 | + | ||
128 | +#endif // GLIBC 2.3 and later | ||
129 | --- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
130 | +++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc | ||
131 | @@ -0,0 +1,152 @@ | ||
132 | +// Wrapper for underlying C-language localization -*- C++ -*- | ||
133 | + | ||
134 | +// Copyright (C) 2001, 2002, 2003, 2004, 2005 | ||
135 | +// Free Software Foundation, Inc. | ||
136 | +// | ||
137 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
138 | +// software; you can redistribute it and/or modify it under the | ||
139 | +// terms of the GNU General Public License as published by the | ||
140 | +// Free Software Foundation; either version 2, or (at your option) | ||
141 | +// any later version. | ||
142 | + | ||
143 | +// This library is distributed in the hope that it will be useful, | ||
144 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
145 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
146 | +// GNU General Public License for more details. | ||
147 | + | ||
148 | +// You should have received a copy of the GNU General Public License along | ||
149 | +// with this library; see the file COPYING. If not, write to the Free | ||
150 | +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
151 | +// USA. | ||
152 | + | ||
153 | +// As a special exception, you may use this file as part of a free software | ||
154 | +// library without restriction. Specifically, if other files instantiate | ||
155 | +// templates or use macros or inline functions from this file, or you compile | ||
156 | +// this file and link it with other files to produce an executable, this | ||
157 | +// file does not by itself cause the resulting executable to be covered by | ||
158 | +// the GNU General Public License. This exception does not however | ||
159 | +// invalidate any other reasons why the executable file might be covered by | ||
160 | +// the GNU General Public License. | ||
161 | + | ||
162 | +// | ||
163 | +// ISO C++ 14882: 22.8 Standard locale categories. | ||
164 | +// | ||
165 | + | ||
166 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
167 | + | ||
168 | +#include <cerrno> // For errno | ||
169 | +#include <locale> | ||
170 | +#include <stdexcept> | ||
171 | +#include <langinfo.h> | ||
172 | +#include <bits/c++locale_internal.h> | ||
173 | + | ||
174 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
175 | +#define __strtol_l(S, E, B, L) strtol((S), (E), (B)) | ||
176 | +#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B)) | ||
177 | +#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B)) | ||
178 | +#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B)) | ||
179 | +#define __strtof_l(S, E, L) strtof((S), (E)) | ||
180 | +#define __strtod_l(S, E, L) strtod((S), (E)) | ||
181 | +#define __strtold_l(S, E, L) strtold((S), (E)) | ||
182 | +#warning should dummy __newlocale check for C|POSIX ? | ||
183 | +#define __newlocale(a, b, c) NULL | ||
184 | +#define __freelocale(a) ((void)0) | ||
185 | +#define __duplocale(a) __c_locale() | ||
186 | +#endif | ||
187 | + | ||
188 | +namespace std | ||
189 | +{ | ||
190 | + template<> | ||
191 | + void | ||
192 | + __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, | ||
193 | + const __c_locale& __cloc) | ||
194 | + { | ||
195 | + char* __sanity; | ||
196 | + errno = 0; | ||
197 | + float __f = __strtof_l(__s, &__sanity, __cloc); | ||
198 | + if (__sanity != __s && errno != ERANGE) | ||
199 | + __v = __f; | ||
200 | + else | ||
201 | + __err |= ios_base::failbit; | ||
202 | + } | ||
203 | + | ||
204 | + template<> | ||
205 | + void | ||
206 | + __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, | ||
207 | + const __c_locale& __cloc) | ||
208 | + { | ||
209 | + char* __sanity; | ||
210 | + errno = 0; | ||
211 | + double __d = __strtod_l(__s, &__sanity, __cloc); | ||
212 | + if (__sanity != __s && errno != ERANGE) | ||
213 | + __v = __d; | ||
214 | + else | ||
215 | + __err |= ios_base::failbit; | ||
216 | + } | ||
217 | + | ||
218 | + template<> | ||
219 | + void | ||
220 | + __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err, | ||
221 | + const __c_locale& __cloc) | ||
222 | + { | ||
223 | + char* __sanity; | ||
224 | + errno = 0; | ||
225 | + long double __ld = __strtold_l(__s, &__sanity, __cloc); | ||
226 | + if (__sanity != __s && errno != ERANGE) | ||
227 | + __v = __ld; | ||
228 | + else | ||
229 | + __err |= ios_base::failbit; | ||
230 | + } | ||
231 | + | ||
232 | + void | ||
233 | + locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, | ||
234 | + __c_locale __old) | ||
235 | + { | ||
236 | + __cloc = __newlocale(1 << LC_ALL, __s, __old); | ||
237 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
238 | + if (!__cloc) | ||
239 | + { | ||
240 | + // This named locale is not supported by the underlying OS. | ||
241 | + __throw_runtime_error(__N("locale::facet::_S_create_c_locale " | ||
242 | + "name not valid")); | ||
243 | + } | ||
244 | +#endif | ||
245 | + } | ||
246 | + | ||
247 | + void | ||
248 | + locale::facet::_S_destroy_c_locale(__c_locale& __cloc) | ||
249 | + { | ||
250 | + if (__cloc && _S_get_c_locale() != __cloc) | ||
251 | + __freelocale(__cloc); | ||
252 | + } | ||
253 | + | ||
254 | + __c_locale | ||
255 | + locale::facet::_S_clone_c_locale(__c_locale& __cloc) | ||
256 | + { return __duplocale(__cloc); } | ||
257 | +} // namespace std | ||
258 | + | ||
259 | +namespace __gnu_cxx | ||
260 | +{ | ||
261 | + const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] = | ||
262 | + { | ||
263 | + "LC_CTYPE", | ||
264 | + "LC_NUMERIC", | ||
265 | + "LC_TIME", | ||
266 | + "LC_COLLATE", | ||
267 | + "LC_MONETARY", | ||
268 | + "LC_MESSAGES", | ||
269 | +#if _GLIBCXX_NUM_CATEGORIES != 0 | ||
270 | + "LC_PAPER", | ||
271 | + "LC_NAME", | ||
272 | + "LC_ADDRESS", | ||
273 | + "LC_TELEPHONE", | ||
274 | + "LC_MEASUREMENT", | ||
275 | + "LC_IDENTIFICATION" | ||
276 | +#endif | ||
277 | + }; | ||
278 | +} | ||
279 | + | ||
280 | +namespace std | ||
281 | +{ | ||
282 | + const char* const* const locale::_S_categories = __gnu_cxx::category_names; | ||
283 | +} // namespace std | ||
284 | --- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
285 | +++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h | ||
286 | @@ -0,0 +1,117 @@ | ||
287 | +// Wrapper for underlying C-language localization -*- C++ -*- | ||
288 | + | ||
289 | +// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | ||
290 | +// | ||
291 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
292 | +// software; you can redistribute it and/or modify it under the | ||
293 | +// terms of the GNU General Public License as published by the | ||
294 | +// Free Software Foundation; either version 2, or (at your option) | ||
295 | +// any later version. | ||
296 | + | ||
297 | +// This library is distributed in the hope that it will be useful, | ||
298 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
299 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
300 | +// GNU General Public License for more details. | ||
301 | + | ||
302 | +// You should have received a copy of the GNU General Public License along | ||
303 | +// with this library; see the file COPYING. If not, write to the Free | ||
304 | +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
305 | +// USA. | ||
306 | + | ||
307 | +// As a special exception, you may use this file as part of a free software | ||
308 | +// library without restriction. Specifically, if other files instantiate | ||
309 | +// templates or use macros or inline functions from this file, or you compile | ||
310 | +// this file and link it with other files to produce an executable, this | ||
311 | +// file does not by itself cause the resulting executable to be covered by | ||
312 | +// the GNU General Public License. This exception does not however | ||
313 | +// invalidate any other reasons why the executable file might be covered by | ||
314 | +// the GNU General Public License. | ||
315 | + | ||
316 | +// | ||
317 | +// ISO C++ 14882: 22.8 Standard locale categories. | ||
318 | +// | ||
319 | + | ||
320 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
321 | + | ||
322 | +#ifndef _C_LOCALE_H | ||
323 | +#define _C_LOCALE_H 1 | ||
324 | + | ||
325 | +#pragma GCC system_header | ||
326 | + | ||
327 | +#include <cstring> // get std::strlen | ||
328 | +#include <cstdio> // get std::snprintf or std::sprintf | ||
329 | +#include <clocale> | ||
330 | +#include <langinfo.h> // For codecvt | ||
331 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
332 | +#warning fix this | ||
333 | +#endif | ||
334 | +#ifdef __UCLIBC_HAS_LOCALE__ | ||
335 | +#include <iconv.h> // For codecvt using iconv, iconv_t | ||
336 | +#endif | ||
337 | +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
338 | +#include <libintl.h> // For messages | ||
339 | +#endif | ||
340 | + | ||
341 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
342 | +#warning what is _GLIBCXX_C_LOCALE_GNU for | ||
343 | +#endif | ||
344 | +#define _GLIBCXX_C_LOCALE_GNU 1 | ||
345 | + | ||
346 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
347 | +#warning fix categories | ||
348 | +#endif | ||
349 | +// #define _GLIBCXX_NUM_CATEGORIES 6 | ||
350 | +#define _GLIBCXX_NUM_CATEGORIES 0 | ||
351 | + | ||
352 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
353 | +namespace __gnu_cxx | ||
354 | +{ | ||
355 | + extern "C" __typeof(uselocale) __uselocale; | ||
356 | +} | ||
357 | +#endif | ||
358 | + | ||
359 | +namespace std | ||
360 | +{ | ||
361 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
362 | + typedef __locale_t __c_locale; | ||
363 | +#else | ||
364 | + typedef int* __c_locale; | ||
365 | +#endif | ||
366 | + | ||
367 | + // Convert numeric value of type _Tv to string and return length of | ||
368 | + // string. If snprintf is available use it, otherwise fall back to | ||
369 | + // the unsafe sprintf which, in general, can be dangerous and should | ||
370 | + // be avoided. | ||
371 | + template<typename _Tv> | ||
372 | + int | ||
373 | + __convert_from_v(char* __out, | ||
374 | + const int __size __attribute__ ((__unused__)), | ||
375 | + const char* __fmt, | ||
376 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
377 | + _Tv __v, const __c_locale& __cloc, int __prec) | ||
378 | + { | ||
379 | + __c_locale __old = __gnu_cxx::__uselocale(__cloc); | ||
380 | +#else | ||
381 | + _Tv __v, const __c_locale&, int __prec) | ||
382 | + { | ||
383 | +# ifdef __UCLIBC_HAS_LOCALE__ | ||
384 | + char* __old = std::setlocale(LC_ALL, NULL); | ||
385 | + char* __sav = new char[std::strlen(__old) + 1]; | ||
386 | + std::strcpy(__sav, __old); | ||
387 | + std::setlocale(LC_ALL, "C"); | ||
388 | +# endif | ||
389 | +#endif | ||
390 | + | ||
391 | + const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v); | ||
392 | + | ||
393 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
394 | + __gnu_cxx::__uselocale(__old); | ||
395 | +#elif defined __UCLIBC_HAS_LOCALE__ | ||
396 | + std::setlocale(LC_ALL, __sav); | ||
397 | + delete [] __sav; | ||
398 | +#endif | ||
399 | + return __ret; | ||
400 | + } | ||
401 | +} | ||
402 | + | ||
403 | +#endif | ||
404 | --- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc | ||
405 | +++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc | ||
406 | @@ -0,0 +1,306 @@ | ||
407 | +// std::codecvt implementation details, GNU version -*- C++ -*- | ||
408 | + | ||
409 | +// Copyright (C) 2002, 2003 Free Software Foundation, Inc. | ||
410 | +// | ||
411 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
412 | +// software; you can redistribute it and/or modify it under the | ||
413 | +// terms of the GNU General Public License as published by the | ||
414 | +// Free Software Foundation; either version 2, or (at your option) | ||
415 | +// any later version. | ||
416 | + | ||
417 | +// This library is distributed in the hope that it will be useful, | ||
418 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
419 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
420 | +// GNU General Public License for more details. | ||
421 | + | ||
422 | +// You should have received a copy of the GNU General Public License along | ||
423 | +// with this library; see the file COPYING. If not, write to the Free | ||
424 | +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
425 | +// USA. | ||
426 | + | ||
427 | +// As a special exception, you may use this file as part of a free software | ||
428 | +// library without restriction. Specifically, if other files instantiate | ||
429 | +// templates or use macros or inline functions from this file, or you compile | ||
430 | +// this file and link it with other files to produce an executable, this | ||
431 | +// file does not by itself cause the resulting executable to be covered by | ||
432 | +// the GNU General Public License. This exception does not however | ||
433 | +// invalidate any other reasons why the executable file might be covered by | ||
434 | +// the GNU General Public License. | ||
435 | + | ||
436 | +// | ||
437 | +// ISO C++ 14882: 22.2.1.5 - Template class codecvt | ||
438 | +// | ||
439 | + | ||
440 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
441 | + | ||
442 | +#include <locale> | ||
443 | +#include <bits/c++locale_internal.h> | ||
444 | + | ||
445 | +namespace std | ||
446 | +{ | ||
447 | + // Specializations. | ||
448 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
449 | + codecvt_base::result | ||
450 | + codecvt<wchar_t, char, mbstate_t>:: | ||
451 | + do_out(state_type& __state, const intern_type* __from, | ||
452 | + const intern_type* __from_end, const intern_type*& __from_next, | ||
453 | + extern_type* __to, extern_type* __to_end, | ||
454 | + extern_type*& __to_next) const | ||
455 | + { | ||
456 | + result __ret = ok; | ||
457 | + state_type __tmp_state(__state); | ||
458 | + | ||
459 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
460 | + __c_locale __old = __uselocale(_M_c_locale_codecvt); | ||
461 | +#endif | ||
462 | + | ||
463 | + // wcsnrtombs is *very* fast but stops if encounters NUL characters: | ||
464 | + // in case we fall back to wcrtomb and then continue, in a loop. | ||
465 | + // NB: wcsnrtombs is a GNU extension | ||
466 | + for (__from_next = __from, __to_next = __to; | ||
467 | + __from_next < __from_end && __to_next < __to_end | ||
468 | + && __ret == ok;) | ||
469 | + { | ||
470 | + const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0', | ||
471 | + __from_end - __from_next); | ||
472 | + if (!__from_chunk_end) | ||
473 | + __from_chunk_end = __from_end; | ||
474 | + | ||
475 | + __from = __from_next; | ||
476 | + const size_t __conv = wcsnrtombs(__to_next, &__from_next, | ||
477 | + __from_chunk_end - __from_next, | ||
478 | + __to_end - __to_next, &__state); | ||
479 | + if (__conv == static_cast<size_t>(-1)) | ||
480 | + { | ||
481 | + // In case of error, in order to stop at the exact place we | ||
482 | + // have to start again from the beginning with a series of | ||
483 | + // wcrtomb. | ||
484 | + for (; __from < __from_next; ++__from) | ||
485 | + __to_next += wcrtomb(__to_next, *__from, &__tmp_state); | ||
486 | + __state = __tmp_state; | ||
487 | + __ret = error; | ||
488 | + } | ||
489 | + else if (__from_next && __from_next < __from_chunk_end) | ||
490 | + { | ||
491 | + __to_next += __conv; | ||
492 | + __ret = partial; | ||
493 | + } | ||
494 | + else | ||
495 | + { | ||
496 | + __from_next = __from_chunk_end; | ||
497 | + __to_next += __conv; | ||
498 | + } | ||
499 | + | ||
500 | + if (__from_next < __from_end && __ret == ok) | ||
501 | + { | ||
502 | + extern_type __buf[MB_LEN_MAX]; | ||
503 | + __tmp_state = __state; | ||
504 | + const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state); | ||
505 | + if (__conv > static_cast<size_t>(__to_end - __to_next)) | ||
506 | + __ret = partial; | ||
507 | + else | ||
508 | + { | ||
509 | + memcpy(__to_next, __buf, __conv); | ||
510 | + __state = __tmp_state; | ||
511 | + __to_next += __conv; | ||
512 | + ++__from_next; | ||
513 | + } | ||
514 | + } | ||
515 | + } | ||
516 | + | ||
517 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
518 | + __uselocale(__old); | ||
519 | +#endif | ||
520 | + | ||
521 | + return __ret; | ||
522 | + } | ||
523 | + | ||
524 | + codecvt_base::result | ||
525 | + codecvt<wchar_t, char, mbstate_t>:: | ||
526 | + do_in(state_type& __state, const extern_type* __from, | ||
527 | + const extern_type* __from_end, const extern_type*& __from_next, | ||
528 | + intern_type* __to, intern_type* __to_end, | ||
529 | + intern_type*& __to_next) const | ||
530 | + { | ||
531 | + result __ret = ok; | ||
532 | + state_type __tmp_state(__state); | ||
533 | + | ||
534 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
535 | + __c_locale __old = __uselocale(_M_c_locale_codecvt); | ||
536 | +#endif | ||
537 | + | ||
538 | + // mbsnrtowcs is *very* fast but stops if encounters NUL characters: | ||
539 | + // in case we store a L'\0' and then continue, in a loop. | ||
540 | + // NB: mbsnrtowcs is a GNU extension | ||
541 | + for (__from_next = __from, __to_next = __to; | ||
542 | + __from_next < __from_end && __to_next < __to_end | ||
543 | + && __ret == ok;) | ||
544 | + { | ||
545 | + const extern_type* __from_chunk_end; | ||
546 | + __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0', | ||
547 | + __from_end | ||
548 | + - __from_next)); | ||
549 | + if (!__from_chunk_end) | ||
550 | + __from_chunk_end = __from_end; | ||
551 | + | ||
552 | + __from = __from_next; | ||
553 | + size_t __conv = mbsnrtowcs(__to_next, &__from_next, | ||
554 | + __from_chunk_end - __from_next, | ||
555 | + __to_end - __to_next, &__state); | ||
556 | + if (__conv == static_cast<size_t>(-1)) | ||
557 | + { | ||
558 | + // In case of error, in order to stop at the exact place we | ||
559 | + // have to start again from the beginning with a series of | ||
560 | + // mbrtowc. | ||
561 | + for (;; ++__to_next, __from += __conv) | ||
562 | + { | ||
563 | + __conv = mbrtowc(__to_next, __from, __from_end - __from, | ||
564 | + &__tmp_state); | ||
565 | + if (__conv == static_cast<size_t>(-1) | ||
566 | + || __conv == static_cast<size_t>(-2)) | ||
567 | + break; | ||
568 | + } | ||
569 | + __from_next = __from; | ||
570 | + __state = __tmp_state; | ||
571 | + __ret = error; | ||
572 | + } | ||
573 | + else if (__from_next && __from_next < __from_chunk_end) | ||
574 | + { | ||
575 | + // It is unclear what to return in this case (see DR 382). | ||
576 | + __to_next += __conv; | ||
577 | + __ret = partial; | ||
578 | + } | ||
579 | + else | ||
580 | + { | ||
581 | + __from_next = __from_chunk_end; | ||
582 | + __to_next += __conv; | ||
583 | + } | ||
584 | + | ||
585 | + if (__from_next < __from_end && __ret == ok) | ||
586 | + { | ||
587 | + if (__to_next < __to_end) | ||
588 | + { | ||
589 | + // XXX Probably wrong for stateful encodings | ||
590 | + __tmp_state = __state; | ||
591 | + ++__from_next; | ||
592 | + *__to_next++ = L'\0'; | ||
593 | + } | ||
594 | + else | ||
595 | + __ret = partial; | ||
596 | + } | ||
597 | + } | ||
598 | + | ||
599 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
600 | + __uselocale(__old); | ||
601 | +#endif | ||
602 | + | ||
603 | + return __ret; | ||
604 | + } | ||
605 | + | ||
606 | + int | ||
607 | + codecvt<wchar_t, char, mbstate_t>:: | ||
608 | + do_encoding() const throw() | ||
609 | + { | ||
610 | + // XXX This implementation assumes that the encoding is | ||
611 | + // stateless and is either single-byte or variable-width. | ||
612 | + int __ret = 0; | ||
613 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
614 | + __c_locale __old = __uselocale(_M_c_locale_codecvt); | ||
615 | +#endif | ||
616 | + if (MB_CUR_MAX == 1) | ||
617 | + __ret = 1; | ||
618 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
619 | + __uselocale(__old); | ||
620 | +#endif | ||
621 | + return __ret; | ||
622 | + } | ||
623 | + | ||
624 | + int | ||
625 | + codecvt<wchar_t, char, mbstate_t>:: | ||
626 | + do_max_length() const throw() | ||
627 | + { | ||
628 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
629 | + __c_locale __old = __uselocale(_M_c_locale_codecvt); | ||
630 | +#endif | ||
631 | + // XXX Probably wrong for stateful encodings. | ||
632 | + int __ret = MB_CUR_MAX; | ||
633 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
634 | + __uselocale(__old); | ||
635 | +#endif | ||
636 | + return __ret; | ||
637 | + } | ||
638 | + | ||
639 | + int | ||
640 | + codecvt<wchar_t, char, mbstate_t>:: | ||
641 | + do_length(state_type& __state, const extern_type* __from, | ||
642 | + const extern_type* __end, size_t __max) const | ||
643 | + { | ||
644 | + int __ret = 0; | ||
645 | + state_type __tmp_state(__state); | ||
646 | + | ||
647 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
648 | + __c_locale __old = __uselocale(_M_c_locale_codecvt); | ||
649 | +#endif | ||
650 | + | ||
651 | + // mbsnrtowcs is *very* fast but stops if encounters NUL characters: | ||
652 | + // in case we advance past it and then continue, in a loop. | ||
653 | + // NB: mbsnrtowcs is a GNU extension | ||
654 | + | ||
655 | + // A dummy internal buffer is needed in order for mbsnrtocws to consider | ||
656 | + // its fourth parameter (it wouldn't with NULL as first parameter). | ||
657 | + wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t) | ||
658 | + * __max)); | ||
659 | + while (__from < __end && __max) | ||
660 | + { | ||
661 | + const extern_type* __from_chunk_end; | ||
662 | + __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0', | ||
663 | + __end | ||
664 | + - __from)); | ||
665 | + if (!__from_chunk_end) | ||
666 | + __from_chunk_end = __end; | ||
667 | + | ||
668 | + const extern_type* __tmp_from = __from; | ||
669 | + size_t __conv = mbsnrtowcs(__to, &__from, | ||
670 | + __from_chunk_end - __from, | ||
671 | + __max, &__state); | ||
672 | + if (__conv == static_cast<size_t>(-1)) | ||
673 | + { | ||
674 | + // In case of error, in order to stop at the exact place we | ||
675 | + // have to start again from the beginning with a series of | ||
676 | + // mbrtowc. | ||
677 | + for (__from = __tmp_from;; __from += __conv) | ||
678 | + { | ||
679 | + __conv = mbrtowc(NULL, __from, __end - __from, | ||
680 | + &__tmp_state); | ||
681 | + if (__conv == static_cast<size_t>(-1) | ||
682 | + || __conv == static_cast<size_t>(-2)) | ||
683 | + break; | ||
684 | + } | ||
685 | + __state = __tmp_state; | ||
686 | + __ret += __from - __tmp_from; | ||
687 | + break; | ||
688 | + } | ||
689 | + if (!__from) | ||
690 | + __from = __from_chunk_end; | ||
691 | + | ||
692 | + __ret += __from - __tmp_from; | ||
693 | + __max -= __conv; | ||
694 | + | ||
695 | + if (__from < __end && __max) | ||
696 | + { | ||
697 | + // XXX Probably wrong for stateful encodings | ||
698 | + __tmp_state = __state; | ||
699 | + ++__from; | ||
700 | + ++__ret; | ||
701 | + --__max; | ||
702 | + } | ||
703 | + } | ||
704 | + | ||
705 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
706 | + __uselocale(__old); | ||
707 | +#endif | ||
708 | + | ||
709 | + return __ret; | ||
710 | + } | ||
711 | +#endif | ||
712 | +} | ||
713 | --- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
714 | +++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc | ||
715 | @@ -0,0 +1,80 @@ | ||
716 | +// std::collate implementation details, GNU version -*- C++ -*- | ||
717 | + | ||
718 | +// Copyright (C) 2001, 2002 Free Software Foundation, Inc. | ||
719 | +// | ||
720 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
721 | +// software; you can redistribute it and/or modify it under the | ||
722 | +// terms of the GNU General Public License as published by the | ||
723 | +// Free Software Foundation; either version 2, or (at your option) | ||
724 | +// any later version. | ||
725 | + | ||
726 | +// This library is distributed in the hope that it will be useful, | ||
727 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
728 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
729 | +// GNU General Public License for more details. | ||
730 | + | ||
731 | +// You should have received a copy of the GNU General Public License along | ||
732 | +// with this library; see the file COPYING. If not, write to the Free | ||
733 | +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
734 | +// USA. | ||
735 | + | ||
736 | +// As a special exception, you may use this file as part of a free software | ||
737 | +// library without restriction. Specifically, if other files instantiate | ||
738 | +// templates or use macros or inline functions from this file, or you compile | ||
739 | +// this file and link it with other files to produce an executable, this | ||
740 | +// file does not by itself cause the resulting executable to be covered by | ||
741 | +// the GNU General Public License. This exception does not however | ||
742 | +// invalidate any other reasons why the executable file might be covered by | ||
743 | +// the GNU General Public License. | ||
744 | + | ||
745 | +// | ||
746 | +// ISO C++ 14882: 22.2.4.1.2 collate virtual functions | ||
747 | +// | ||
748 | + | ||
749 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
750 | + | ||
751 | +#include <locale> | ||
752 | +#include <bits/c++locale_internal.h> | ||
753 | + | ||
754 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
755 | +#define __strcoll_l(S1, S2, L) strcoll((S1), (S2)) | ||
756 | +#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N)) | ||
757 | +#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2)) | ||
758 | +#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N)) | ||
759 | +#endif | ||
760 | + | ||
761 | +namespace std | ||
762 | +{ | ||
763 | + // These are basically extensions to char_traits, and perhaps should | ||
764 | + // be put there instead of here. | ||
765 | + template<> | ||
766 | + int | ||
767 | + collate<char>::_M_compare(const char* __one, const char* __two) const | ||
768 | + { | ||
769 | + int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate); | ||
770 | + return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); | ||
771 | + } | ||
772 | + | ||
773 | + template<> | ||
774 | + size_t | ||
775 | + collate<char>::_M_transform(char* __to, const char* __from, | ||
776 | + size_t __n) const | ||
777 | + { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); } | ||
778 | + | ||
779 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
780 | + template<> | ||
781 | + int | ||
782 | + collate<wchar_t>::_M_compare(const wchar_t* __one, | ||
783 | + const wchar_t* __two) const | ||
784 | + { | ||
785 | + int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate); | ||
786 | + return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0); | ||
787 | + } | ||
788 | + | ||
789 | + template<> | ||
790 | + size_t | ||
791 | + collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from, | ||
792 | + size_t __n) const | ||
793 | + { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); } | ||
794 | +#endif | ||
795 | +} | ||
796 | --- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
797 | +++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc | ||
798 | @@ -0,0 +1,314 @@ | ||
799 | +// std::ctype implementation details, GNU version -*- C++ -*- | ||
800 | + | ||
801 | +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||
802 | +// | ||
803 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
804 | +// software; you can redistribute it and/or modify it under the | ||
805 | +// terms of the GNU General Public License as published by the | ||
806 | +// Free Software Foundation; either version 2, or (at your option) | ||
807 | +// any later version. | ||
808 | + | ||
809 | +// This library is distributed in the hope that it will be useful, | ||
810 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
811 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
812 | +// GNU General Public License for more details. | ||
813 | + | ||
814 | +// You should have received a copy of the GNU General Public License along | ||
815 | +// with this library; see the file COPYING. If not, write to the Free | ||
816 | +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
817 | +// USA. | ||
818 | + | ||
819 | +// As a special exception, you may use this file as part of a free software | ||
820 | +// library without restriction. Specifically, if other files instantiate | ||
821 | +// templates or use macros or inline functions from this file, or you compile | ||
822 | +// this file and link it with other files to produce an executable, this | ||
823 | +// file does not by itself cause the resulting executable to be covered by | ||
824 | +// the GNU General Public License. This exception does not however | ||
825 | +// invalidate any other reasons why the executable file might be covered by | ||
826 | +// the GNU General Public License. | ||
827 | + | ||
828 | +// | ||
829 | +// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions. | ||
830 | +// | ||
831 | + | ||
832 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
833 | + | ||
834 | +#define _LIBC | ||
835 | +#include <locale> | ||
836 | +#undef _LIBC | ||
837 | +#include <bits/c++locale_internal.h> | ||
838 | + | ||
839 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
840 | +#define __wctype_l(S, L) wctype((S)) | ||
841 | +#define __towupper_l(C, L) towupper((C)) | ||
842 | +#define __towlower_l(C, L) towlower((C)) | ||
843 | +#define __iswctype_l(C, M, L) iswctype((C), (M)) | ||
844 | +#endif | ||
845 | + | ||
846 | +namespace std | ||
847 | +{ | ||
848 | + // NB: The other ctype<char> specializations are in src/locale.cc and | ||
849 | + // various /config/os/* files. | ||
850 | + template<> | ||
851 | + ctype_byname<char>::ctype_byname(const char* __s, size_t __refs) | ||
852 | + : ctype<char>(0, false, __refs) | ||
853 | + { | ||
854 | + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | ||
855 | + { | ||
856 | + this->_S_destroy_c_locale(this->_M_c_locale_ctype); | ||
857 | + this->_S_create_c_locale(this->_M_c_locale_ctype, __s); | ||
858 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
859 | + this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper; | ||
860 | + this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower; | ||
861 | + this->_M_table = this->_M_c_locale_ctype->__ctype_b; | ||
862 | +#endif | ||
863 | + } | ||
864 | + } | ||
865 | + | ||
866 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
867 | + ctype<wchar_t>::__wmask_type | ||
868 | + ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const | ||
869 | + { | ||
870 | + __wmask_type __ret; | ||
871 | + switch (__m) | ||
872 | + { | ||
873 | + case space: | ||
874 | + __ret = __wctype_l("space", _M_c_locale_ctype); | ||
875 | + break; | ||
876 | + case print: | ||
877 | + __ret = __wctype_l("print", _M_c_locale_ctype); | ||
878 | + break; | ||
879 | + case cntrl: | ||
880 | + __ret = __wctype_l("cntrl", _M_c_locale_ctype); | ||
881 | + break; | ||
882 | + case upper: | ||
883 | + __ret = __wctype_l("upper", _M_c_locale_ctype); | ||
884 | + break; | ||
885 | + case lower: | ||
886 | + __ret = __wctype_l("lower", _M_c_locale_ctype); | ||
887 | + break; | ||
888 | + case alpha: | ||
889 | + __ret = __wctype_l("alpha", _M_c_locale_ctype); | ||
890 | + break; | ||
891 | + case digit: | ||
892 | + __ret = __wctype_l("digit", _M_c_locale_ctype); | ||
893 | + break; | ||
894 | + case punct: | ||
895 | + __ret = __wctype_l("punct", _M_c_locale_ctype); | ||
896 | + break; | ||
897 | + case xdigit: | ||
898 | + __ret = __wctype_l("xdigit", _M_c_locale_ctype); | ||
899 | + break; | ||
900 | + case alnum: | ||
901 | + __ret = __wctype_l("alnum", _M_c_locale_ctype); | ||
902 | + break; | ||
903 | + case graph: | ||
904 | + __ret = __wctype_l("graph", _M_c_locale_ctype); | ||
905 | + break; | ||
906 | + default: | ||
907 | + __ret = __wmask_type(); | ||
908 | + } | ||
909 | + return __ret; | ||
910 | + } | ||
911 | + | ||
912 | + wchar_t | ||
913 | + ctype<wchar_t>::do_toupper(wchar_t __c) const | ||
914 | + { return __towupper_l(__c, _M_c_locale_ctype); } | ||
915 | + | ||
916 | + const wchar_t* | ||
917 | + ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const | ||
918 | + { | ||
919 | + while (__lo < __hi) | ||
920 | + { | ||
921 | + *__lo = __towupper_l(*__lo, _M_c_locale_ctype); | ||
922 | + ++__lo; | ||
923 | + } | ||
924 | + return __hi; | ||
925 | + } | ||
926 | + | ||
927 | + wchar_t | ||
928 | + ctype<wchar_t>::do_tolower(wchar_t __c) const | ||
929 | + { return __towlower_l(__c, _M_c_locale_ctype); } | ||
930 | + | ||
931 | + const wchar_t* | ||
932 | + ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const | ||
933 | + { | ||
934 | + while (__lo < __hi) | ||
935 | + { | ||
936 | + *__lo = __towlower_l(*__lo, _M_c_locale_ctype); | ||
937 | + ++__lo; | ||
938 | + } | ||
939 | + return __hi; | ||
940 | + } | ||
941 | + | ||
942 | + bool | ||
943 | + ctype<wchar_t>:: | ||
944 | + do_is(mask __m, wchar_t __c) const | ||
945 | + { | ||
946 | + // The case of __m == ctype_base::space is particularly important, | ||
947 | + // due to its use in many istream functions. Therefore we deal with | ||
948 | + // it first, exploiting the knowledge that on GNU systems _M_bit[5] | ||
949 | + // is the mask corresponding to ctype_base::space. NB: an encoding | ||
950 | + // change would not affect correctness! | ||
951 | + bool __ret = false; | ||
952 | + if (__m == _M_bit[5]) | ||
953 | + __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype); | ||
954 | + else | ||
955 | + { | ||
956 | + // Highest bitmask in ctype_base == 10, but extra in "C" | ||
957 | + // library for blank. | ||
958 | + const size_t __bitmasksize = 11; | ||
959 | + for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) | ||
960 | + if (__m & _M_bit[__bitcur]) | ||
961 | + { | ||
962 | + if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype)) | ||
963 | + { | ||
964 | + __ret = true; | ||
965 | + break; | ||
966 | + } | ||
967 | + else if (__m == _M_bit[__bitcur]) | ||
968 | + break; | ||
969 | + } | ||
970 | + } | ||
971 | + return __ret; | ||
972 | + } | ||
973 | + | ||
974 | + const wchar_t* | ||
975 | + ctype<wchar_t>:: | ||
976 | + do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const | ||
977 | + { | ||
978 | + for (; __lo < __hi; ++__vec, ++__lo) | ||
979 | + { | ||
980 | + // Highest bitmask in ctype_base == 10, but extra in "C" | ||
981 | + // library for blank. | ||
982 | + const size_t __bitmasksize = 11; | ||
983 | + mask __m = 0; | ||
984 | + for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur) | ||
985 | + if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype)) | ||
986 | + __m |= _M_bit[__bitcur]; | ||
987 | + *__vec = __m; | ||
988 | + } | ||
989 | + return __hi; | ||
990 | + } | ||
991 | + | ||
992 | + const wchar_t* | ||
993 | + ctype<wchar_t>:: | ||
994 | + do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const | ||
995 | + { | ||
996 | + while (__lo < __hi && !this->do_is(__m, *__lo)) | ||
997 | + ++__lo; | ||
998 | + return __lo; | ||
999 | + } | ||
1000 | + | ||
1001 | + const wchar_t* | ||
1002 | + ctype<wchar_t>:: | ||
1003 | + do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const | ||
1004 | + { | ||
1005 | + while (__lo < __hi && this->do_is(__m, *__lo) != 0) | ||
1006 | + ++__lo; | ||
1007 | + return __lo; | ||
1008 | + } | ||
1009 | + | ||
1010 | + wchar_t | ||
1011 | + ctype<wchar_t>:: | ||
1012 | + do_widen(char __c) const | ||
1013 | + { return _M_widen[static_cast<unsigned char>(__c)]; } | ||
1014 | + | ||
1015 | + const char* | ||
1016 | + ctype<wchar_t>:: | ||
1017 | + do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const | ||
1018 | + { | ||
1019 | + while (__lo < __hi) | ||
1020 | + { | ||
1021 | + *__dest = _M_widen[static_cast<unsigned char>(*__lo)]; | ||
1022 | + ++__lo; | ||
1023 | + ++__dest; | ||
1024 | + } | ||
1025 | + return __hi; | ||
1026 | + } | ||
1027 | + | ||
1028 | + char | ||
1029 | + ctype<wchar_t>:: | ||
1030 | + do_narrow(wchar_t __wc, char __dfault) const | ||
1031 | + { | ||
1032 | + if (__wc >= 0 && __wc < 128 && _M_narrow_ok) | ||
1033 | + return _M_narrow[__wc]; | ||
1034 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1035 | + __c_locale __old = __uselocale(_M_c_locale_ctype); | ||
1036 | +#endif | ||
1037 | + const int __c = wctob(__wc); | ||
1038 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1039 | + __uselocale(__old); | ||
1040 | +#endif | ||
1041 | + return (__c == EOF ? __dfault : static_cast<char>(__c)); | ||
1042 | + } | ||
1043 | + | ||
1044 | + const wchar_t* | ||
1045 | + ctype<wchar_t>:: | ||
1046 | + do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, | ||
1047 | + char* __dest) const | ||
1048 | + { | ||
1049 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1050 | + __c_locale __old = __uselocale(_M_c_locale_ctype); | ||
1051 | +#endif | ||
1052 | + if (_M_narrow_ok) | ||
1053 | + while (__lo < __hi) | ||
1054 | + { | ||
1055 | + if (*__lo >= 0 && *__lo < 128) | ||
1056 | + *__dest = _M_narrow[*__lo]; | ||
1057 | + else | ||
1058 | + { | ||
1059 | + const int __c = wctob(*__lo); | ||
1060 | + *__dest = (__c == EOF ? __dfault : static_cast<char>(__c)); | ||
1061 | + } | ||
1062 | + ++__lo; | ||
1063 | + ++__dest; | ||
1064 | + } | ||
1065 | + else | ||
1066 | + while (__lo < __hi) | ||
1067 | + { | ||
1068 | + const int __c = wctob(*__lo); | ||
1069 | + *__dest = (__c == EOF ? __dfault : static_cast<char>(__c)); | ||
1070 | + ++__lo; | ||
1071 | + ++__dest; | ||
1072 | + } | ||
1073 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1074 | + __uselocale(__old); | ||
1075 | +#endif | ||
1076 | + return __hi; | ||
1077 | + } | ||
1078 | + | ||
1079 | + void | ||
1080 | + ctype<wchar_t>::_M_initialize_ctype() | ||
1081 | + { | ||
1082 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1083 | + __c_locale __old = __uselocale(_M_c_locale_ctype); | ||
1084 | +#endif | ||
1085 | + wint_t __i; | ||
1086 | + for (__i = 0; __i < 128; ++__i) | ||
1087 | + { | ||
1088 | + const int __c = wctob(__i); | ||
1089 | + if (__c == EOF) | ||
1090 | + break; | ||
1091 | + else | ||
1092 | + _M_narrow[__i] = static_cast<char>(__c); | ||
1093 | + } | ||
1094 | + if (__i == 128) | ||
1095 | + _M_narrow_ok = true; | ||
1096 | + else | ||
1097 | + _M_narrow_ok = false; | ||
1098 | + for (size_t __j = 0; | ||
1099 | + __j < sizeof(_M_widen) / sizeof(wint_t); ++__j) | ||
1100 | + _M_widen[__j] = btowc(__j); | ||
1101 | + | ||
1102 | + for (size_t __k = 0; __k <= 11; ++__k) | ||
1103 | + { | ||
1104 | + _M_bit[__k] = static_cast<mask>(_ISbit(__k)); | ||
1105 | + _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]); | ||
1106 | + } | ||
1107 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1108 | + __uselocale(__old); | ||
1109 | +#endif | ||
1110 | + } | ||
1111 | +#endif // _GLIBCXX_USE_WCHAR_T | ||
1112 | +} | ||
1113 | --- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
1114 | +++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc | ||
1115 | @@ -0,0 +1,100 @@ | ||
1116 | +// std::messages implementation details, GNU version -*- C++ -*- | ||
1117 | + | ||
1118 | +// Copyright (C) 2001, 2002 Free Software Foundation, Inc. | ||
1119 | +// | ||
1120 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
1121 | +// software; you can redistribute it and/or modify it under the | ||
1122 | +// terms of the GNU General Public License as published by the | ||
1123 | +// Free Software Foundation; either version 2, or (at your option) | ||
1124 | +// any later version. | ||
1125 | + | ||
1126 | +// This library is distributed in the hope that it will be useful, | ||
1127 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1128 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1129 | +// GNU General Public License for more details. | ||
1130 | + | ||
1131 | +// You should have received a copy of the GNU General Public License along | ||
1132 | +// with this library; see the file COPYING. If not, write to the Free | ||
1133 | +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
1134 | +// USA. | ||
1135 | + | ||
1136 | +// As a special exception, you may use this file as part of a free software | ||
1137 | +// library without restriction. Specifically, if other files instantiate | ||
1138 | +// templates or use macros or inline functions from this file, or you compile | ||
1139 | +// this file and link it with other files to produce an executable, this | ||
1140 | +// file does not by itself cause the resulting executable to be covered by | ||
1141 | +// the GNU General Public License. This exception does not however | ||
1142 | +// invalidate any other reasons why the executable file might be covered by | ||
1143 | +// the GNU General Public License. | ||
1144 | + | ||
1145 | +// | ||
1146 | +// ISO C++ 14882: 22.2.7.1.2 messages virtual functions | ||
1147 | +// | ||
1148 | + | ||
1149 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
1150 | + | ||
1151 | +#include <locale> | ||
1152 | +#include <bits/c++locale_internal.h> | ||
1153 | + | ||
1154 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
1155 | +#warning fix gettext stuff | ||
1156 | +#endif | ||
1157 | +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
1158 | +extern "C" char *__dcgettext(const char *domainname, | ||
1159 | + const char *msgid, int category); | ||
1160 | +#undef gettext | ||
1161 | +#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES) | ||
1162 | +#else | ||
1163 | +#undef gettext | ||
1164 | +#define gettext(msgid) (msgid) | ||
1165 | +#endif | ||
1166 | + | ||
1167 | +namespace std | ||
1168 | +{ | ||
1169 | + // Specializations. | ||
1170 | + template<> | ||
1171 | + string | ||
1172 | + messages<char>::do_get(catalog, int, int, const string& __dfault) const | ||
1173 | + { | ||
1174 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1175 | + __c_locale __old = __uselocale(_M_c_locale_messages); | ||
1176 | + const char* __msg = const_cast<const char*>(gettext(__dfault.c_str())); | ||
1177 | + __uselocale(__old); | ||
1178 | + return string(__msg); | ||
1179 | +#elif defined __UCLIBC_HAS_LOCALE__ | ||
1180 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
1181 | + setlocale(LC_ALL, _M_name_messages); | ||
1182 | + const char* __msg = gettext(__dfault.c_str()); | ||
1183 | + setlocale(LC_ALL, __old); | ||
1184 | + free(__old); | ||
1185 | + return string(__msg); | ||
1186 | +#else | ||
1187 | + const char* __msg = gettext(__dfault.c_str()); | ||
1188 | + return string(__msg); | ||
1189 | +#endif | ||
1190 | + } | ||
1191 | + | ||
1192 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
1193 | + template<> | ||
1194 | + wstring | ||
1195 | + messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const | ||
1196 | + { | ||
1197 | +# ifdef __UCLIBC_HAS_XLOCALE__ | ||
1198 | + __c_locale __old = __uselocale(_M_c_locale_messages); | ||
1199 | + char* __msg = gettext(_M_convert_to_char(__dfault)); | ||
1200 | + __uselocale(__old); | ||
1201 | + return _M_convert_from_char(__msg); | ||
1202 | +# elif defined __UCLIBC_HAS_LOCALE__ | ||
1203 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
1204 | + setlocale(LC_ALL, _M_name_messages); | ||
1205 | + char* __msg = gettext(_M_convert_to_char(__dfault)); | ||
1206 | + setlocale(LC_ALL, __old); | ||
1207 | + free(__old); | ||
1208 | + return _M_convert_from_char(__msg); | ||
1209 | +# else | ||
1210 | + char* __msg = gettext(_M_convert_to_char(__dfault)); | ||
1211 | + return _M_convert_from_char(__msg); | ||
1212 | +# endif | ||
1213 | + } | ||
1214 | +#endif | ||
1215 | +} | ||
1216 | --- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
1217 | +++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h | ||
1218 | @@ -0,0 +1,121 @@ | ||
1219 | +// std::messages implementation details, GNU version -*- C++ -*- | ||
1220 | + | ||
1221 | +// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | ||
1222 | +// | ||
1223 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
1224 | +// software; you can redistribute it and/or modify it under the | ||
1225 | +// terms of the GNU General Public License as published by the | ||
1226 | +// Free Software Foundation; either version 2, or (at your option) | ||
1227 | +// any later version. | ||
1228 | + | ||
1229 | +// This library is distributed in the hope that it will be useful, | ||
1230 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1231 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1232 | +// GNU General Public License for more details. | ||
1233 | + | ||
1234 | +// You should have received a copy of the GNU General Public License along | ||
1235 | +// with this library; see the file COPYING. If not, write to the Free | ||
1236 | +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
1237 | +// USA. | ||
1238 | + | ||
1239 | +// As a special exception, you may use this file as part of a free software | ||
1240 | +// library without restriction. Specifically, if other files instantiate | ||
1241 | +// templates or use macros or inline functions from this file, or you compile | ||
1242 | +// this file and link it with other files to produce an executable, this | ||
1243 | +// file does not by itself cause the resulting executable to be covered by | ||
1244 | +// the GNU General Public License. This exception does not however | ||
1245 | +// invalidate any other reasons why the executable file might be covered by | ||
1246 | +// the GNU General Public License. | ||
1247 | + | ||
1248 | +// | ||
1249 | +// ISO C++ 14882: 22.2.7.1.2 messages functions | ||
1250 | +// | ||
1251 | + | ||
1252 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
1253 | + | ||
1254 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
1255 | +#warning fix prototypes for *textdomain funcs | ||
1256 | +#endif | ||
1257 | +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ | ||
1258 | +extern "C" char *__textdomain(const char *domainname); | ||
1259 | +extern "C" char *__bindtextdomain(const char *domainname, | ||
1260 | + const char *dirname); | ||
1261 | +#else | ||
1262 | +#undef __textdomain | ||
1263 | +#undef __bindtextdomain | ||
1264 | +#define __textdomain(D) ((void)0) | ||
1265 | +#define __bindtextdomain(D,P) ((void)0) | ||
1266 | +#endif | ||
1267 | + | ||
1268 | + // Non-virtual member functions. | ||
1269 | + template<typename _CharT> | ||
1270 | + messages<_CharT>::messages(size_t __refs) | ||
1271 | + : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), | ||
1272 | + _M_name_messages(_S_get_c_name()) | ||
1273 | + { } | ||
1274 | + | ||
1275 | + template<typename _CharT> | ||
1276 | + messages<_CharT>::messages(__c_locale __cloc, const char* __s, | ||
1277 | + size_t __refs) | ||
1278 | + : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL) | ||
1279 | + { | ||
1280 | + const size_t __len = std::strlen(__s) + 1; | ||
1281 | + char* __tmp = new char[__len]; | ||
1282 | + std::memcpy(__tmp, __s, __len); | ||
1283 | + _M_name_messages = __tmp; | ||
1284 | + | ||
1285 | + // Last to avoid leaking memory if new throws. | ||
1286 | + _M_c_locale_messages = _S_clone_c_locale(__cloc); | ||
1287 | + } | ||
1288 | + | ||
1289 | + template<typename _CharT> | ||
1290 | + typename messages<_CharT>::catalog | ||
1291 | + messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc, | ||
1292 | + const char* __dir) const | ||
1293 | + { | ||
1294 | + __bindtextdomain(__s.c_str(), __dir); | ||
1295 | + return this->do_open(__s, __loc); | ||
1296 | + } | ||
1297 | + | ||
1298 | + // Virtual member functions. | ||
1299 | + template<typename _CharT> | ||
1300 | + messages<_CharT>::~messages() | ||
1301 | + { | ||
1302 | + if (_M_name_messages != _S_get_c_name()) | ||
1303 | + delete [] _M_name_messages; | ||
1304 | + _S_destroy_c_locale(_M_c_locale_messages); | ||
1305 | + } | ||
1306 | + | ||
1307 | + template<typename _CharT> | ||
1308 | + typename messages<_CharT>::catalog | ||
1309 | + messages<_CharT>::do_open(const basic_string<char>& __s, | ||
1310 | + const locale&) const | ||
1311 | + { | ||
1312 | + // No error checking is done, assume the catalog exists and can | ||
1313 | + // be used. | ||
1314 | + __textdomain(__s.c_str()); | ||
1315 | + return 0; | ||
1316 | + } | ||
1317 | + | ||
1318 | + template<typename _CharT> | ||
1319 | + void | ||
1320 | + messages<_CharT>::do_close(catalog) const | ||
1321 | + { } | ||
1322 | + | ||
1323 | + // messages_byname | ||
1324 | + template<typename _CharT> | ||
1325 | + messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) | ||
1326 | + : messages<_CharT>(__refs) | ||
1327 | + { | ||
1328 | + if (this->_M_name_messages != locale::facet::_S_get_c_name()) | ||
1329 | + delete [] this->_M_name_messages; | ||
1330 | + char* __tmp = new char[std::strlen(__s) + 1]; | ||
1331 | + std::strcpy(__tmp, __s); | ||
1332 | + this->_M_name_messages = __tmp; | ||
1333 | + | ||
1334 | + if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) | ||
1335 | + { | ||
1336 | + this->_S_destroy_c_locale(this->_M_c_locale_messages); | ||
1337 | + this->_S_create_c_locale(this->_M_c_locale_messages, __s); | ||
1338 | + } | ||
1339 | + } | ||
1340 | --- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
1341 | +++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc | ||
1342 | @@ -0,0 +1,692 @@ | ||
1343 | +// std::moneypunct implementation details, GNU version -*- C++ -*- | ||
1344 | + | ||
1345 | +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||
1346 | +// | ||
1347 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
1348 | +// software; you can redistribute it and/or modify it under the | ||
1349 | +// terms of the GNU General Public License as published by the | ||
1350 | +// Free Software Foundation; either version 2, or (at your option) | ||
1351 | +// any later version. | ||
1352 | + | ||
1353 | +// This library is distributed in the hope that it will be useful, | ||
1354 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1355 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1356 | +// GNU General Public License for more details. | ||
1357 | + | ||
1358 | +// You should have received a copy of the GNU General Public License along | ||
1359 | +// with this library; see the file COPYING. If not, write to the Free | ||
1360 | +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
1361 | +// USA. | ||
1362 | + | ||
1363 | +// As a special exception, you may use this file as part of a free software | ||
1364 | +// library without restriction. Specifically, if other files instantiate | ||
1365 | +// templates or use macros or inline functions from this file, or you compile | ||
1366 | +// this file and link it with other files to produce an executable, this | ||
1367 | +// file does not by itself cause the resulting executable to be covered by | ||
1368 | +// the GNU General Public License. This exception does not however | ||
1369 | +// invalidate any other reasons why the executable file might be covered by | ||
1370 | +// the GNU General Public License. | ||
1371 | + | ||
1372 | +// | ||
1373 | +// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions | ||
1374 | +// | ||
1375 | + | ||
1376 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
1377 | + | ||
1378 | +#define _LIBC | ||
1379 | +#include <locale> | ||
1380 | +#undef _LIBC | ||
1381 | +#include <bits/c++locale_internal.h> | ||
1382 | + | ||
1383 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
1384 | +#warning optimize this for uclibc | ||
1385 | +#warning tailor for stub locale support | ||
1386 | +#endif | ||
1387 | + | ||
1388 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
1389 | +#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
1390 | +#endif | ||
1391 | + | ||
1392 | +namespace std | ||
1393 | +{ | ||
1394 | + // Construct and return valid pattern consisting of some combination of: | ||
1395 | + // space none symbol sign value | ||
1396 | + money_base::pattern | ||
1397 | + money_base::_S_construct_pattern(char __precedes, char __space, char __posn) | ||
1398 | + { | ||
1399 | + pattern __ret; | ||
1400 | + | ||
1401 | + // This insanely complicated routine attempts to construct a valid | ||
1402 | + // pattern for use with monyepunct. A couple of invariants: | ||
1403 | + | ||
1404 | + // if (__precedes) symbol -> value | ||
1405 | + // else value -> symbol | ||
1406 | + | ||
1407 | + // if (__space) space | ||
1408 | + // else none | ||
1409 | + | ||
1410 | + // none == never first | ||
1411 | + // space never first or last | ||
1412 | + | ||
1413 | + // Any elegant implementations of this are welcome. | ||
1414 | + switch (__posn) | ||
1415 | + { | ||
1416 | + case 0: | ||
1417 | + case 1: | ||
1418 | + // 1 The sign precedes the value and symbol. | ||
1419 | + __ret.field[0] = sign; | ||
1420 | + if (__space) | ||
1421 | + { | ||
1422 | + // Pattern starts with sign. | ||
1423 | + if (__precedes) | ||
1424 | + { | ||
1425 | + __ret.field[1] = symbol; | ||
1426 | + __ret.field[3] = value; | ||
1427 | + } | ||
1428 | + else | ||
1429 | + { | ||
1430 | + __ret.field[1] = value; | ||
1431 | + __ret.field[3] = symbol; | ||
1432 | + } | ||
1433 | + __ret.field[2] = space; | ||
1434 | + } | ||
1435 | + else | ||
1436 | + { | ||
1437 | + // Pattern starts with sign and ends with none. | ||
1438 | + if (__precedes) | ||
1439 | + { | ||
1440 | + __ret.field[1] = symbol; | ||
1441 | + __ret.field[2] = value; | ||
1442 | + } | ||
1443 | + else | ||
1444 | + { | ||
1445 | + __ret.field[1] = value; | ||
1446 | + __ret.field[2] = symbol; | ||
1447 | + } | ||
1448 | + __ret.field[3] = none; | ||
1449 | + } | ||
1450 | + break; | ||
1451 | + case 2: | ||
1452 | + // 2 The sign follows the value and symbol. | ||
1453 | + if (__space) | ||
1454 | + { | ||
1455 | + // Pattern either ends with sign. | ||
1456 | + if (__precedes) | ||
1457 | + { | ||
1458 | + __ret.field[0] = symbol; | ||
1459 | + __ret.field[2] = value; | ||
1460 | + } | ||
1461 | + else | ||
1462 | + { | ||
1463 | + __ret.field[0] = value; | ||
1464 | + __ret.field[2] = symbol; | ||
1465 | + } | ||
1466 | + __ret.field[1] = space; | ||
1467 | + __ret.field[3] = sign; | ||
1468 | + } | ||
1469 | + else | ||
1470 | + { | ||
1471 | + // Pattern ends with sign then none. | ||
1472 | + if (__precedes) | ||
1473 | + { | ||
1474 | + __ret.field[0] = symbol; | ||
1475 | + __ret.field[1] = value; | ||
1476 | + } | ||
1477 | + else | ||
1478 | + { | ||
1479 | + __ret.field[0] = value; | ||
1480 | + __ret.field[1] = symbol; | ||
1481 | + } | ||
1482 | + __ret.field[2] = sign; | ||
1483 | + __ret.field[3] = none; | ||
1484 | + } | ||
1485 | + break; | ||
1486 | + case 3: | ||
1487 | + // 3 The sign immediately precedes the symbol. | ||
1488 | + if (__precedes) | ||
1489 | + { | ||
1490 | + __ret.field[0] = sign; | ||
1491 | + __ret.field[1] = symbol; | ||
1492 | + if (__space) | ||
1493 | + { | ||
1494 | + __ret.field[2] = space; | ||
1495 | + __ret.field[3] = value; | ||
1496 | + } | ||
1497 | + else | ||
1498 | + { | ||
1499 | + __ret.field[2] = value; | ||
1500 | + __ret.field[3] = none; | ||
1501 | + } | ||
1502 | + } | ||
1503 | + else | ||
1504 | + { | ||
1505 | + __ret.field[0] = value; | ||
1506 | + if (__space) | ||
1507 | + { | ||
1508 | + __ret.field[1] = space; | ||
1509 | + __ret.field[2] = sign; | ||
1510 | + __ret.field[3] = symbol; | ||
1511 | + } | ||
1512 | + else | ||
1513 | + { | ||
1514 | + __ret.field[1] = sign; | ||
1515 | + __ret.field[2] = symbol; | ||
1516 | + __ret.field[3] = none; | ||
1517 | + } | ||
1518 | + } | ||
1519 | + break; | ||
1520 | + case 4: | ||
1521 | + // 4 The sign immediately follows the symbol. | ||
1522 | + if (__precedes) | ||
1523 | + { | ||
1524 | + __ret.field[0] = symbol; | ||
1525 | + __ret.field[1] = sign; | ||
1526 | + if (__space) | ||
1527 | + { | ||
1528 | + __ret.field[2] = space; | ||
1529 | + __ret.field[3] = value; | ||
1530 | + } | ||
1531 | + else | ||
1532 | + { | ||
1533 | + __ret.field[2] = value; | ||
1534 | + __ret.field[3] = none; | ||
1535 | + } | ||
1536 | + } | ||
1537 | + else | ||
1538 | + { | ||
1539 | + __ret.field[0] = value; | ||
1540 | + if (__space) | ||
1541 | + { | ||
1542 | + __ret.field[1] = space; | ||
1543 | + __ret.field[2] = symbol; | ||
1544 | + __ret.field[3] = sign; | ||
1545 | + } | ||
1546 | + else | ||
1547 | + { | ||
1548 | + __ret.field[1] = symbol; | ||
1549 | + __ret.field[2] = sign; | ||
1550 | + __ret.field[3] = none; | ||
1551 | + } | ||
1552 | + } | ||
1553 | + break; | ||
1554 | + default: | ||
1555 | + __ret = pattern(); | ||
1556 | + } | ||
1557 | + return __ret; | ||
1558 | + } | ||
1559 | + | ||
1560 | + template<> | ||
1561 | + void | ||
1562 | + moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc, | ||
1563 | + const char*) | ||
1564 | + { | ||
1565 | + if (!_M_data) | ||
1566 | + _M_data = new __moneypunct_cache<char, true>; | ||
1567 | + | ||
1568 | + if (!__cloc) | ||
1569 | + { | ||
1570 | + // "C" locale | ||
1571 | + _M_data->_M_decimal_point = '.'; | ||
1572 | + _M_data->_M_thousands_sep = ','; | ||
1573 | + _M_data->_M_grouping = ""; | ||
1574 | + _M_data->_M_grouping_size = 0; | ||
1575 | + _M_data->_M_curr_symbol = ""; | ||
1576 | + _M_data->_M_curr_symbol_size = 0; | ||
1577 | + _M_data->_M_positive_sign = ""; | ||
1578 | + _M_data->_M_positive_sign_size = 0; | ||
1579 | + _M_data->_M_negative_sign = ""; | ||
1580 | + _M_data->_M_negative_sign_size = 0; | ||
1581 | + _M_data->_M_frac_digits = 0; | ||
1582 | + _M_data->_M_pos_format = money_base::_S_default_pattern; | ||
1583 | + _M_data->_M_neg_format = money_base::_S_default_pattern; | ||
1584 | + | ||
1585 | + for (size_t __i = 0; __i < money_base::_S_end; ++__i) | ||
1586 | + _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; | ||
1587 | + } | ||
1588 | + else | ||
1589 | + { | ||
1590 | + // Named locale. | ||
1591 | + _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, | ||
1592 | + __cloc)); | ||
1593 | + _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, | ||
1594 | + __cloc)); | ||
1595 | + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); | ||
1596 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
1597 | + _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); | ||
1598 | + _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); | ||
1599 | + | ||
1600 | + char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); | ||
1601 | + if (!__nposn) | ||
1602 | + _M_data->_M_negative_sign = "()"; | ||
1603 | + else | ||
1604 | + _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, | ||
1605 | + __cloc); | ||
1606 | + _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); | ||
1607 | + | ||
1608 | + // _Intl == true | ||
1609 | + _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); | ||
1610 | + _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); | ||
1611 | + _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, | ||
1612 | + __cloc)); | ||
1613 | + char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); | ||
1614 | + char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); | ||
1615 | + char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); | ||
1616 | + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, | ||
1617 | + __pposn); | ||
1618 | + char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); | ||
1619 | + char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); | ||
1620 | + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, | ||
1621 | + __nposn); | ||
1622 | + } | ||
1623 | + } | ||
1624 | + | ||
1625 | + template<> | ||
1626 | + void | ||
1627 | + moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc, | ||
1628 | + const char*) | ||
1629 | + { | ||
1630 | + if (!_M_data) | ||
1631 | + _M_data = new __moneypunct_cache<char, false>; | ||
1632 | + | ||
1633 | + if (!__cloc) | ||
1634 | + { | ||
1635 | + // "C" locale | ||
1636 | + _M_data->_M_decimal_point = '.'; | ||
1637 | + _M_data->_M_thousands_sep = ','; | ||
1638 | + _M_data->_M_grouping = ""; | ||
1639 | + _M_data->_M_grouping_size = 0; | ||
1640 | + _M_data->_M_curr_symbol = ""; | ||
1641 | + _M_data->_M_curr_symbol_size = 0; | ||
1642 | + _M_data->_M_positive_sign = ""; | ||
1643 | + _M_data->_M_positive_sign_size = 0; | ||
1644 | + _M_data->_M_negative_sign = ""; | ||
1645 | + _M_data->_M_negative_sign_size = 0; | ||
1646 | + _M_data->_M_frac_digits = 0; | ||
1647 | + _M_data->_M_pos_format = money_base::_S_default_pattern; | ||
1648 | + _M_data->_M_neg_format = money_base::_S_default_pattern; | ||
1649 | + | ||
1650 | + for (size_t __i = 0; __i < money_base::_S_end; ++__i) | ||
1651 | + _M_data->_M_atoms[__i] = money_base::_S_atoms[__i]; | ||
1652 | + } | ||
1653 | + else | ||
1654 | + { | ||
1655 | + // Named locale. | ||
1656 | + _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, | ||
1657 | + __cloc)); | ||
1658 | + _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, | ||
1659 | + __cloc)); | ||
1660 | + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); | ||
1661 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
1662 | + _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); | ||
1663 | + _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign); | ||
1664 | + | ||
1665 | + char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); | ||
1666 | + if (!__nposn) | ||
1667 | + _M_data->_M_negative_sign = "()"; | ||
1668 | + else | ||
1669 | + _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, | ||
1670 | + __cloc); | ||
1671 | + _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign); | ||
1672 | + | ||
1673 | + // _Intl == false | ||
1674 | + _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); | ||
1675 | + _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol); | ||
1676 | + _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); | ||
1677 | + char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); | ||
1678 | + char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); | ||
1679 | + char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); | ||
1680 | + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, | ||
1681 | + __pposn); | ||
1682 | + char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); | ||
1683 | + char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); | ||
1684 | + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, | ||
1685 | + __nposn); | ||
1686 | + } | ||
1687 | + } | ||
1688 | + | ||
1689 | + template<> | ||
1690 | + moneypunct<char, true>::~moneypunct() | ||
1691 | + { delete _M_data; } | ||
1692 | + | ||
1693 | + template<> | ||
1694 | + moneypunct<char, false>::~moneypunct() | ||
1695 | + { delete _M_data; } | ||
1696 | + | ||
1697 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
1698 | + template<> | ||
1699 | + void | ||
1700 | + moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc, | ||
1701 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1702 | + const char*) | ||
1703 | +#else | ||
1704 | + const char* __name) | ||
1705 | +#endif | ||
1706 | + { | ||
1707 | + if (!_M_data) | ||
1708 | + _M_data = new __moneypunct_cache<wchar_t, true>; | ||
1709 | + | ||
1710 | + if (!__cloc) | ||
1711 | + { | ||
1712 | + // "C" locale | ||
1713 | + _M_data->_M_decimal_point = L'.'; | ||
1714 | + _M_data->_M_thousands_sep = L','; | ||
1715 | + _M_data->_M_grouping = ""; | ||
1716 | + _M_data->_M_grouping_size = 0; | ||
1717 | + _M_data->_M_curr_symbol = L""; | ||
1718 | + _M_data->_M_curr_symbol_size = 0; | ||
1719 | + _M_data->_M_positive_sign = L""; | ||
1720 | + _M_data->_M_positive_sign_size = 0; | ||
1721 | + _M_data->_M_negative_sign = L""; | ||
1722 | + _M_data->_M_negative_sign_size = 0; | ||
1723 | + _M_data->_M_frac_digits = 0; | ||
1724 | + _M_data->_M_pos_format = money_base::_S_default_pattern; | ||
1725 | + _M_data->_M_neg_format = money_base::_S_default_pattern; | ||
1726 | + | ||
1727 | + // Use ctype::widen code without the facet... | ||
1728 | + for (size_t __i = 0; __i < money_base::_S_end; ++__i) | ||
1729 | + _M_data->_M_atoms[__i] = | ||
1730 | + static_cast<wchar_t>(money_base::_S_atoms[__i]); | ||
1731 | + } | ||
1732 | + else | ||
1733 | + { | ||
1734 | + // Named locale. | ||
1735 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1736 | + __c_locale __old = __uselocale(__cloc); | ||
1737 | +#else | ||
1738 | + // Switch to named locale so that mbsrtowcs will work. | ||
1739 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
1740 | + setlocale(LC_ALL, __name); | ||
1741 | +#endif | ||
1742 | + | ||
1743 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
1744 | +#warning fix this... should be monetary | ||
1745 | +#endif | ||
1746 | +#ifdef __UCLIBC__ | ||
1747 | +# ifdef __UCLIBC_HAS_XLOCALE__ | ||
1748 | + _M_data->_M_decimal_point = __cloc->decimal_point_wc; | ||
1749 | + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; | ||
1750 | +# elif defined __UCLIBC_HAS_LOCALE__ | ||
1751 | + _M_data->_M_decimal_point = __global_locale->decimal_point_wc; | ||
1752 | + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; | ||
1753 | +# endif | ||
1754 | +#else | ||
1755 | + union { char *__s; wchar_t __w; } __u; | ||
1756 | + __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); | ||
1757 | + _M_data->_M_decimal_point = __u.__w; | ||
1758 | + | ||
1759 | + __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); | ||
1760 | + _M_data->_M_thousands_sep = __u.__w; | ||
1761 | +#endif | ||
1762 | + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); | ||
1763 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
1764 | + | ||
1765 | + const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); | ||
1766 | + const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); | ||
1767 | + const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc); | ||
1768 | + | ||
1769 | + wchar_t* __wcs_ps = 0; | ||
1770 | + wchar_t* __wcs_ns = 0; | ||
1771 | + const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc)); | ||
1772 | + try | ||
1773 | + { | ||
1774 | + mbstate_t __state; | ||
1775 | + size_t __len = strlen(__cpossign); | ||
1776 | + if (__len) | ||
1777 | + { | ||
1778 | + ++__len; | ||
1779 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
1780 | + __wcs_ps = new wchar_t[__len]; | ||
1781 | + mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); | ||
1782 | + _M_data->_M_positive_sign = __wcs_ps; | ||
1783 | + } | ||
1784 | + else | ||
1785 | + _M_data->_M_positive_sign = L""; | ||
1786 | + _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); | ||
1787 | + | ||
1788 | + __len = strlen(__cnegsign); | ||
1789 | + if (!__nposn) | ||
1790 | + _M_data->_M_negative_sign = L"()"; | ||
1791 | + else if (__len) | ||
1792 | + { | ||
1793 | + ++__len; | ||
1794 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
1795 | + __wcs_ns = new wchar_t[__len]; | ||
1796 | + mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); | ||
1797 | + _M_data->_M_negative_sign = __wcs_ns; | ||
1798 | + } | ||
1799 | + else | ||
1800 | + _M_data->_M_negative_sign = L""; | ||
1801 | + _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); | ||
1802 | + | ||
1803 | + // _Intl == true. | ||
1804 | + __len = strlen(__ccurr); | ||
1805 | + if (__len) | ||
1806 | + { | ||
1807 | + ++__len; | ||
1808 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
1809 | + wchar_t* __wcs = new wchar_t[__len]; | ||
1810 | + mbsrtowcs(__wcs, &__ccurr, __len, &__state); | ||
1811 | + _M_data->_M_curr_symbol = __wcs; | ||
1812 | + } | ||
1813 | + else | ||
1814 | + _M_data->_M_curr_symbol = L""; | ||
1815 | + _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); | ||
1816 | + } | ||
1817 | + catch (...) | ||
1818 | + { | ||
1819 | + delete _M_data; | ||
1820 | + _M_data = 0; | ||
1821 | + delete __wcs_ps; | ||
1822 | + delete __wcs_ns; | ||
1823 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1824 | + __uselocale(__old); | ||
1825 | +#else | ||
1826 | + setlocale(LC_ALL, __old); | ||
1827 | + free(__old); | ||
1828 | +#endif | ||
1829 | + __throw_exception_again; | ||
1830 | + } | ||
1831 | + | ||
1832 | + _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, | ||
1833 | + __cloc)); | ||
1834 | + char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc)); | ||
1835 | + char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc)); | ||
1836 | + char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc)); | ||
1837 | + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, | ||
1838 | + __pposn); | ||
1839 | + char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc)); | ||
1840 | + char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc)); | ||
1841 | + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, | ||
1842 | + __nposn); | ||
1843 | + | ||
1844 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1845 | + __uselocale(__old); | ||
1846 | +#else | ||
1847 | + setlocale(LC_ALL, __old); | ||
1848 | + free(__old); | ||
1849 | +#endif | ||
1850 | + } | ||
1851 | + } | ||
1852 | + | ||
1853 | + template<> | ||
1854 | + void | ||
1855 | + moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc, | ||
1856 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1857 | + const char*) | ||
1858 | +#else | ||
1859 | + const char* __name) | ||
1860 | +#endif | ||
1861 | + { | ||
1862 | + if (!_M_data) | ||
1863 | + _M_data = new __moneypunct_cache<wchar_t, false>; | ||
1864 | + | ||
1865 | + if (!__cloc) | ||
1866 | + { | ||
1867 | + // "C" locale | ||
1868 | + _M_data->_M_decimal_point = L'.'; | ||
1869 | + _M_data->_M_thousands_sep = L','; | ||
1870 | + _M_data->_M_grouping = ""; | ||
1871 | + _M_data->_M_grouping_size = 0; | ||
1872 | + _M_data->_M_curr_symbol = L""; | ||
1873 | + _M_data->_M_curr_symbol_size = 0; | ||
1874 | + _M_data->_M_positive_sign = L""; | ||
1875 | + _M_data->_M_positive_sign_size = 0; | ||
1876 | + _M_data->_M_negative_sign = L""; | ||
1877 | + _M_data->_M_negative_sign_size = 0; | ||
1878 | + _M_data->_M_frac_digits = 0; | ||
1879 | + _M_data->_M_pos_format = money_base::_S_default_pattern; | ||
1880 | + _M_data->_M_neg_format = money_base::_S_default_pattern; | ||
1881 | + | ||
1882 | + // Use ctype::widen code without the facet... | ||
1883 | + for (size_t __i = 0; __i < money_base::_S_end; ++__i) | ||
1884 | + _M_data->_M_atoms[__i] = | ||
1885 | + static_cast<wchar_t>(money_base::_S_atoms[__i]); | ||
1886 | + } | ||
1887 | + else | ||
1888 | + { | ||
1889 | + // Named locale. | ||
1890 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1891 | + __c_locale __old = __uselocale(__cloc); | ||
1892 | +#else | ||
1893 | + // Switch to named locale so that mbsrtowcs will work. | ||
1894 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
1895 | + setlocale(LC_ALL, __name); | ||
1896 | +#endif | ||
1897 | + | ||
1898 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
1899 | +#warning fix this... should be monetary | ||
1900 | +#endif | ||
1901 | +#ifdef __UCLIBC__ | ||
1902 | +# ifdef __UCLIBC_HAS_XLOCALE__ | ||
1903 | + _M_data->_M_decimal_point = __cloc->decimal_point_wc; | ||
1904 | + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; | ||
1905 | +# elif defined __UCLIBC_HAS_LOCALE__ | ||
1906 | + _M_data->_M_decimal_point = __global_locale->decimal_point_wc; | ||
1907 | + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; | ||
1908 | +# endif | ||
1909 | +#else | ||
1910 | + union { char *__s; wchar_t __w; } __u; | ||
1911 | + __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc); | ||
1912 | + _M_data->_M_decimal_point = __u.__w; | ||
1913 | + | ||
1914 | + __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc); | ||
1915 | + _M_data->_M_thousands_sep = __u.__w; | ||
1916 | +#endif | ||
1917 | + _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc); | ||
1918 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
1919 | + | ||
1920 | + const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc); | ||
1921 | + const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc); | ||
1922 | + const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc); | ||
1923 | + | ||
1924 | + wchar_t* __wcs_ps = 0; | ||
1925 | + wchar_t* __wcs_ns = 0; | ||
1926 | + const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc)); | ||
1927 | + try | ||
1928 | + { | ||
1929 | + mbstate_t __state; | ||
1930 | + size_t __len; | ||
1931 | + __len = strlen(__cpossign); | ||
1932 | + if (__len) | ||
1933 | + { | ||
1934 | + ++__len; | ||
1935 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
1936 | + __wcs_ps = new wchar_t[__len]; | ||
1937 | + mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state); | ||
1938 | + _M_data->_M_positive_sign = __wcs_ps; | ||
1939 | + } | ||
1940 | + else | ||
1941 | + _M_data->_M_positive_sign = L""; | ||
1942 | + _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign); | ||
1943 | + | ||
1944 | + __len = strlen(__cnegsign); | ||
1945 | + if (!__nposn) | ||
1946 | + _M_data->_M_negative_sign = L"()"; | ||
1947 | + else if (__len) | ||
1948 | + { | ||
1949 | + ++__len; | ||
1950 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
1951 | + __wcs_ns = new wchar_t[__len]; | ||
1952 | + mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state); | ||
1953 | + _M_data->_M_negative_sign = __wcs_ns; | ||
1954 | + } | ||
1955 | + else | ||
1956 | + _M_data->_M_negative_sign = L""; | ||
1957 | + _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign); | ||
1958 | + | ||
1959 | + // _Intl == true. | ||
1960 | + __len = strlen(__ccurr); | ||
1961 | + if (__len) | ||
1962 | + { | ||
1963 | + ++__len; | ||
1964 | + memset(&__state, 0, sizeof(mbstate_t)); | ||
1965 | + wchar_t* __wcs = new wchar_t[__len]; | ||
1966 | + mbsrtowcs(__wcs, &__ccurr, __len, &__state); | ||
1967 | + _M_data->_M_curr_symbol = __wcs; | ||
1968 | + } | ||
1969 | + else | ||
1970 | + _M_data->_M_curr_symbol = L""; | ||
1971 | + _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol); | ||
1972 | + } | ||
1973 | + catch (...) | ||
1974 | + { | ||
1975 | + delete _M_data; | ||
1976 | + _M_data = 0; | ||
1977 | + delete __wcs_ps; | ||
1978 | + delete __wcs_ns; | ||
1979 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
1980 | + __uselocale(__old); | ||
1981 | +#else | ||
1982 | + setlocale(LC_ALL, __old); | ||
1983 | + free(__old); | ||
1984 | +#endif | ||
1985 | + __throw_exception_again; | ||
1986 | + } | ||
1987 | + | ||
1988 | + _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc)); | ||
1989 | + char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc)); | ||
1990 | + char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc)); | ||
1991 | + char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc)); | ||
1992 | + _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace, | ||
1993 | + __pposn); | ||
1994 | + char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc)); | ||
1995 | + char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc)); | ||
1996 | + _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace, | ||
1997 | + __nposn); | ||
1998 | + | ||
1999 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
2000 | + __uselocale(__old); | ||
2001 | +#else | ||
2002 | + setlocale(LC_ALL, __old); | ||
2003 | + free(__old); | ||
2004 | +#endif | ||
2005 | + } | ||
2006 | + } | ||
2007 | + | ||
2008 | + template<> | ||
2009 | + moneypunct<wchar_t, true>::~moneypunct() | ||
2010 | + { | ||
2011 | + if (_M_data->_M_positive_sign_size) | ||
2012 | + delete [] _M_data->_M_positive_sign; | ||
2013 | + if (_M_data->_M_negative_sign_size | ||
2014 | + && wcscmp(_M_data->_M_negative_sign, L"()") != 0) | ||
2015 | + delete [] _M_data->_M_negative_sign; | ||
2016 | + if (_M_data->_M_curr_symbol_size) | ||
2017 | + delete [] _M_data->_M_curr_symbol; | ||
2018 | + delete _M_data; | ||
2019 | + } | ||
2020 | + | ||
2021 | + template<> | ||
2022 | + moneypunct<wchar_t, false>::~moneypunct() | ||
2023 | + { | ||
2024 | + if (_M_data->_M_positive_sign_size) | ||
2025 | + delete [] _M_data->_M_positive_sign; | ||
2026 | + if (_M_data->_M_negative_sign_size | ||
2027 | + && wcscmp(_M_data->_M_negative_sign, L"()") != 0) | ||
2028 | + delete [] _M_data->_M_negative_sign; | ||
2029 | + if (_M_data->_M_curr_symbol_size) | ||
2030 | + delete [] _M_data->_M_curr_symbol; | ||
2031 | + delete _M_data; | ||
2032 | + } | ||
2033 | +#endif | ||
2034 | +} | ||
2035 | --- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
2036 | +++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc | ||
2037 | @@ -0,0 +1,173 @@ | ||
2038 | +// std::numpunct implementation details, GNU version -*- C++ -*- | ||
2039 | + | ||
2040 | +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||
2041 | +// | ||
2042 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
2043 | +// software; you can redistribute it and/or modify it under the | ||
2044 | +// terms of the GNU General Public License as published by the | ||
2045 | +// Free Software Foundation; either version 2, or (at your option) | ||
2046 | +// any later version. | ||
2047 | + | ||
2048 | +// This library is distributed in the hope that it will be useful, | ||
2049 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2050 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2051 | +// GNU General Public License for more details. | ||
2052 | + | ||
2053 | +// You should have received a copy of the GNU General Public License along | ||
2054 | +// with this library; see the file COPYING. If not, write to the Free | ||
2055 | +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
2056 | +// USA. | ||
2057 | + | ||
2058 | +// As a special exception, you may use this file as part of a free software | ||
2059 | +// library without restriction. Specifically, if other files instantiate | ||
2060 | +// templates or use macros or inline functions from this file, or you compile | ||
2061 | +// this file and link it with other files to produce an executable, this | ||
2062 | +// file does not by itself cause the resulting executable to be covered by | ||
2063 | +// the GNU General Public License. This exception does not however | ||
2064 | +// invalidate any other reasons why the executable file might be covered by | ||
2065 | +// the GNU General Public License. | ||
2066 | + | ||
2067 | +// | ||
2068 | +// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions | ||
2069 | +// | ||
2070 | + | ||
2071 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
2072 | + | ||
2073 | +#define _LIBC | ||
2074 | +#include <locale> | ||
2075 | +#undef _LIBC | ||
2076 | +#include <bits/c++locale_internal.h> | ||
2077 | + | ||
2078 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
2079 | +#warning tailor for stub locale support | ||
2080 | +#endif | ||
2081 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
2082 | +#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
2083 | +#endif | ||
2084 | + | ||
2085 | +namespace std | ||
2086 | +{ | ||
2087 | + template<> | ||
2088 | + void | ||
2089 | + numpunct<char>::_M_initialize_numpunct(__c_locale __cloc) | ||
2090 | + { | ||
2091 | + if (!_M_data) | ||
2092 | + _M_data = new __numpunct_cache<char>; | ||
2093 | + | ||
2094 | + if (!__cloc) | ||
2095 | + { | ||
2096 | + // "C" locale | ||
2097 | + _M_data->_M_grouping = ""; | ||
2098 | + _M_data->_M_grouping_size = 0; | ||
2099 | + _M_data->_M_use_grouping = false; | ||
2100 | + | ||
2101 | + _M_data->_M_decimal_point = '.'; | ||
2102 | + _M_data->_M_thousands_sep = ','; | ||
2103 | + | ||
2104 | + for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) | ||
2105 | + _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i]; | ||
2106 | + | ||
2107 | + for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) | ||
2108 | + _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j]; | ||
2109 | + } | ||
2110 | + else | ||
2111 | + { | ||
2112 | + // Named locale. | ||
2113 | + _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT, | ||
2114 | + __cloc)); | ||
2115 | + _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP, | ||
2116 | + __cloc)); | ||
2117 | + | ||
2118 | + // Check for NULL, which implies no grouping. | ||
2119 | + if (_M_data->_M_thousands_sep == '\0') | ||
2120 | + _M_data->_M_grouping = ""; | ||
2121 | + else | ||
2122 | + _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); | ||
2123 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
2124 | + } | ||
2125 | + | ||
2126 | + // NB: There is no way to extact this info from posix locales. | ||
2127 | + // _M_truename = __nl_langinfo_l(YESSTR, __cloc); | ||
2128 | + _M_data->_M_truename = "true"; | ||
2129 | + _M_data->_M_truename_size = 4; | ||
2130 | + // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); | ||
2131 | + _M_data->_M_falsename = "false"; | ||
2132 | + _M_data->_M_falsename_size = 5; | ||
2133 | + } | ||
2134 | + | ||
2135 | + template<> | ||
2136 | + numpunct<char>::~numpunct() | ||
2137 | + { delete _M_data; } | ||
2138 | + | ||
2139 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
2140 | + template<> | ||
2141 | + void | ||
2142 | + numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc) | ||
2143 | + { | ||
2144 | + if (!_M_data) | ||
2145 | + _M_data = new __numpunct_cache<wchar_t>; | ||
2146 | + | ||
2147 | + if (!__cloc) | ||
2148 | + { | ||
2149 | + // "C" locale | ||
2150 | + _M_data->_M_grouping = ""; | ||
2151 | + _M_data->_M_grouping_size = 0; | ||
2152 | + _M_data->_M_use_grouping = false; | ||
2153 | + | ||
2154 | + _M_data->_M_decimal_point = L'.'; | ||
2155 | + _M_data->_M_thousands_sep = L','; | ||
2156 | + | ||
2157 | + // Use ctype::widen code without the facet... | ||
2158 | + for (size_t __i = 0; __i < __num_base::_S_oend; ++__i) | ||
2159 | + _M_data->_M_atoms_out[__i] = | ||
2160 | + static_cast<wchar_t>(__num_base::_S_atoms_out[__i]); | ||
2161 | + | ||
2162 | + for (size_t __j = 0; __j < __num_base::_S_iend; ++__j) | ||
2163 | + _M_data->_M_atoms_in[__j] = | ||
2164 | + static_cast<wchar_t>(__num_base::_S_atoms_in[__j]); | ||
2165 | + } | ||
2166 | + else | ||
2167 | + { | ||
2168 | + // Named locale. | ||
2169 | + // NB: In the GNU model wchar_t is always 32 bit wide. | ||
2170 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
2171 | +#warning fix this | ||
2172 | +#endif | ||
2173 | +#ifdef __UCLIBC__ | ||
2174 | +# ifdef __UCLIBC_HAS_XLOCALE__ | ||
2175 | + _M_data->_M_decimal_point = __cloc->decimal_point_wc; | ||
2176 | + _M_data->_M_thousands_sep = __cloc->thousands_sep_wc; | ||
2177 | +# elif defined __UCLIBC_HAS_LOCALE__ | ||
2178 | + _M_data->_M_decimal_point = __global_locale->decimal_point_wc; | ||
2179 | + _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc; | ||
2180 | +# endif | ||
2181 | +#else | ||
2182 | + union { char *__s; wchar_t __w; } __u; | ||
2183 | + __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc); | ||
2184 | + _M_data->_M_decimal_point = __u.__w; | ||
2185 | + | ||
2186 | + __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc); | ||
2187 | + _M_data->_M_thousands_sep = __u.__w; | ||
2188 | +#endif | ||
2189 | + | ||
2190 | + if (_M_data->_M_thousands_sep == L'\0') | ||
2191 | + _M_data->_M_grouping = ""; | ||
2192 | + else | ||
2193 | + _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc); | ||
2194 | + _M_data->_M_grouping_size = strlen(_M_data->_M_grouping); | ||
2195 | + } | ||
2196 | + | ||
2197 | + // NB: There is no way to extact this info from posix locales. | ||
2198 | + // _M_truename = __nl_langinfo_l(YESSTR, __cloc); | ||
2199 | + _M_data->_M_truename = L"true"; | ||
2200 | + _M_data->_M_truename_size = 4; | ||
2201 | + // _M_falsename = __nl_langinfo_l(NOSTR, __cloc); | ||
2202 | + _M_data->_M_falsename = L"false"; | ||
2203 | + _M_data->_M_falsename_size = 5; | ||
2204 | + } | ||
2205 | + | ||
2206 | + template<> | ||
2207 | + numpunct<wchar_t>::~numpunct() | ||
2208 | + { delete _M_data; } | ||
2209 | + #endif | ||
2210 | +} | ||
2211 | --- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
2212 | +++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc | ||
2213 | @@ -0,0 +1,406 @@ | ||
2214 | +// std::time_get, std::time_put implementation, GNU version -*- C++ -*- | ||
2215 | + | ||
2216 | +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | ||
2217 | +// | ||
2218 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
2219 | +// software; you can redistribute it and/or modify it under the | ||
2220 | +// terms of the GNU General Public License as published by the | ||
2221 | +// Free Software Foundation; either version 2, or (at your option) | ||
2222 | +// any later version. | ||
2223 | + | ||
2224 | +// This library is distributed in the hope that it will be useful, | ||
2225 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2226 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2227 | +// GNU General Public License for more details. | ||
2228 | + | ||
2229 | +// You should have received a copy of the GNU General Public License along | ||
2230 | +// with this library; see the file COPYING. If not, write to the Free | ||
2231 | +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
2232 | +// USA. | ||
2233 | + | ||
2234 | +// As a special exception, you may use this file as part of a free software | ||
2235 | +// library without restriction. Specifically, if other files instantiate | ||
2236 | +// templates or use macros or inline functions from this file, or you compile | ||
2237 | +// this file and link it with other files to produce an executable, this | ||
2238 | +// file does not by itself cause the resulting executable to be covered by | ||
2239 | +// the GNU General Public License. This exception does not however | ||
2240 | +// invalidate any other reasons why the executable file might be covered by | ||
2241 | +// the GNU General Public License. | ||
2242 | + | ||
2243 | +// | ||
2244 | +// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions | ||
2245 | +// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions | ||
2246 | +// | ||
2247 | + | ||
2248 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
2249 | + | ||
2250 | +#include <locale> | ||
2251 | +#include <bits/c++locale_internal.h> | ||
2252 | + | ||
2253 | +#ifdef __UCLIBC_MJN3_ONLY__ | ||
2254 | +#warning tailor for stub locale support | ||
2255 | +#endif | ||
2256 | +#ifndef __UCLIBC_HAS_XLOCALE__ | ||
2257 | +#define __nl_langinfo_l(N, L) nl_langinfo((N)) | ||
2258 | +#endif | ||
2259 | + | ||
2260 | +namespace std | ||
2261 | +{ | ||
2262 | + template<> | ||
2263 | + void | ||
2264 | + __timepunct<char>:: | ||
2265 | + _M_put(char* __s, size_t __maxlen, const char* __format, | ||
2266 | + const tm* __tm) const | ||
2267 | + { | ||
2268 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
2269 | + const size_t __len = __strftime_l(__s, __maxlen, __format, __tm, | ||
2270 | + _M_c_locale_timepunct); | ||
2271 | +#else | ||
2272 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
2273 | + setlocale(LC_ALL, _M_name_timepunct); | ||
2274 | + const size_t __len = strftime(__s, __maxlen, __format, __tm); | ||
2275 | + setlocale(LC_ALL, __old); | ||
2276 | + free(__old); | ||
2277 | +#endif | ||
2278 | + // Make sure __s is null terminated. | ||
2279 | + if (__len == 0) | ||
2280 | + __s[0] = '\0'; | ||
2281 | + } | ||
2282 | + | ||
2283 | + template<> | ||
2284 | + void | ||
2285 | + __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc) | ||
2286 | + { | ||
2287 | + if (!_M_data) | ||
2288 | + _M_data = new __timepunct_cache<char>; | ||
2289 | + | ||
2290 | + if (!__cloc) | ||
2291 | + { | ||
2292 | + // "C" locale | ||
2293 | + _M_c_locale_timepunct = _S_get_c_locale(); | ||
2294 | + | ||
2295 | + _M_data->_M_date_format = "%m/%d/%y"; | ||
2296 | + _M_data->_M_date_era_format = "%m/%d/%y"; | ||
2297 | + _M_data->_M_time_format = "%H:%M:%S"; | ||
2298 | + _M_data->_M_time_era_format = "%H:%M:%S"; | ||
2299 | + _M_data->_M_date_time_format = ""; | ||
2300 | + _M_data->_M_date_time_era_format = ""; | ||
2301 | + _M_data->_M_am = "AM"; | ||
2302 | + _M_data->_M_pm = "PM"; | ||
2303 | + _M_data->_M_am_pm_format = ""; | ||
2304 | + | ||
2305 | + // Day names, starting with "C"'s Sunday. | ||
2306 | + _M_data->_M_day1 = "Sunday"; | ||
2307 | + _M_data->_M_day2 = "Monday"; | ||
2308 | + _M_data->_M_day3 = "Tuesday"; | ||
2309 | + _M_data->_M_day4 = "Wednesday"; | ||
2310 | + _M_data->_M_day5 = "Thursday"; | ||
2311 | + _M_data->_M_day6 = "Friday"; | ||
2312 | + _M_data->_M_day7 = "Saturday"; | ||
2313 | + | ||
2314 | + // Abbreviated day names, starting with "C"'s Sun. | ||
2315 | + _M_data->_M_aday1 = "Sun"; | ||
2316 | + _M_data->_M_aday2 = "Mon"; | ||
2317 | + _M_data->_M_aday3 = "Tue"; | ||
2318 | + _M_data->_M_aday4 = "Wed"; | ||
2319 | + _M_data->_M_aday5 = "Thu"; | ||
2320 | + _M_data->_M_aday6 = "Fri"; | ||
2321 | + _M_data->_M_aday7 = "Sat"; | ||
2322 | + | ||
2323 | + // Month names, starting with "C"'s January. | ||
2324 | + _M_data->_M_month01 = "January"; | ||
2325 | + _M_data->_M_month02 = "February"; | ||
2326 | + _M_data->_M_month03 = "March"; | ||
2327 | + _M_data->_M_month04 = "April"; | ||
2328 | + _M_data->_M_month05 = "May"; | ||
2329 | + _M_data->_M_month06 = "June"; | ||
2330 | + _M_data->_M_month07 = "July"; | ||
2331 | + _M_data->_M_month08 = "August"; | ||
2332 | + _M_data->_M_month09 = "September"; | ||
2333 | + _M_data->_M_month10 = "October"; | ||
2334 | + _M_data->_M_month11 = "November"; | ||
2335 | + _M_data->_M_month12 = "December"; | ||
2336 | + | ||
2337 | + // Abbreviated month names, starting with "C"'s Jan. | ||
2338 | + _M_data->_M_amonth01 = "Jan"; | ||
2339 | + _M_data->_M_amonth02 = "Feb"; | ||
2340 | + _M_data->_M_amonth03 = "Mar"; | ||
2341 | + _M_data->_M_amonth04 = "Apr"; | ||
2342 | + _M_data->_M_amonth05 = "May"; | ||
2343 | + _M_data->_M_amonth06 = "Jun"; | ||
2344 | + _M_data->_M_amonth07 = "Jul"; | ||
2345 | + _M_data->_M_amonth08 = "Aug"; | ||
2346 | + _M_data->_M_amonth09 = "Sep"; | ||
2347 | + _M_data->_M_amonth10 = "Oct"; | ||
2348 | + _M_data->_M_amonth11 = "Nov"; | ||
2349 | + _M_data->_M_amonth12 = "Dec"; | ||
2350 | + } | ||
2351 | + else | ||
2352 | + { | ||
2353 | + _M_c_locale_timepunct = _S_clone_c_locale(__cloc); | ||
2354 | + | ||
2355 | + _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc); | ||
2356 | + _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc); | ||
2357 | + _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc); | ||
2358 | + _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc); | ||
2359 | + _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc); | ||
2360 | + _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, | ||
2361 | + __cloc); | ||
2362 | + _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc); | ||
2363 | + _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc); | ||
2364 | + _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc); | ||
2365 | + | ||
2366 | + // Day names, starting with "C"'s Sunday. | ||
2367 | + _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc); | ||
2368 | + _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc); | ||
2369 | + _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc); | ||
2370 | + _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc); | ||
2371 | + _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc); | ||
2372 | + _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc); | ||
2373 | + _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc); | ||
2374 | + | ||
2375 | + // Abbreviated day names, starting with "C"'s Sun. | ||
2376 | + _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc); | ||
2377 | + _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc); | ||
2378 | + _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc); | ||
2379 | + _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc); | ||
2380 | + _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc); | ||
2381 | + _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc); | ||
2382 | + _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc); | ||
2383 | + | ||
2384 | + // Month names, starting with "C"'s January. | ||
2385 | + _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc); | ||
2386 | + _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc); | ||
2387 | + _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc); | ||
2388 | + _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc); | ||
2389 | + _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc); | ||
2390 | + _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc); | ||
2391 | + _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc); | ||
2392 | + _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc); | ||
2393 | + _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc); | ||
2394 | + _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc); | ||
2395 | + _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc); | ||
2396 | + _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc); | ||
2397 | + | ||
2398 | + // Abbreviated month names, starting with "C"'s Jan. | ||
2399 | + _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc); | ||
2400 | + _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc); | ||
2401 | + _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc); | ||
2402 | + _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc); | ||
2403 | + _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc); | ||
2404 | + _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc); | ||
2405 | + _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc); | ||
2406 | + _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc); | ||
2407 | + _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc); | ||
2408 | + _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc); | ||
2409 | + _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc); | ||
2410 | + _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc); | ||
2411 | + } | ||
2412 | + } | ||
2413 | + | ||
2414 | +#ifdef _GLIBCXX_USE_WCHAR_T | ||
2415 | + template<> | ||
2416 | + void | ||
2417 | + __timepunct<wchar_t>:: | ||
2418 | + _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, | ||
2419 | + const tm* __tm) const | ||
2420 | + { | ||
2421 | +#ifdef __UCLIBC_HAS_XLOCALE__ | ||
2422 | + __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct); | ||
2423 | + const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm, | ||
2424 | + _M_c_locale_timepunct); | ||
2425 | +#else | ||
2426 | + char* __old = strdup(setlocale(LC_ALL, NULL)); | ||
2427 | + setlocale(LC_ALL, _M_name_timepunct); | ||
2428 | + const size_t __len = wcsftime(__s, __maxlen, __format, __tm); | ||
2429 | + setlocale(LC_ALL, __old); | ||
2430 | + free(__old); | ||
2431 | +#endif | ||
2432 | + // Make sure __s is null terminated. | ||
2433 | + if (__len == 0) | ||
2434 | + __s[0] = L'\0'; | ||
2435 | + } | ||
2436 | + | ||
2437 | + template<> | ||
2438 | + void | ||
2439 | + __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc) | ||
2440 | + { | ||
2441 | + if (!_M_data) | ||
2442 | + _M_data = new __timepunct_cache<wchar_t>; | ||
2443 | + | ||
2444 | +#warning wide time stuff | ||
2445 | +// if (!__cloc) | ||
2446 | + { | ||
2447 | + // "C" locale | ||
2448 | + _M_c_locale_timepunct = _S_get_c_locale(); | ||
2449 | + | ||
2450 | + _M_data->_M_date_format = L"%m/%d/%y"; | ||
2451 | + _M_data->_M_date_era_format = L"%m/%d/%y"; | ||
2452 | + _M_data->_M_time_format = L"%H:%M:%S"; | ||
2453 | + _M_data->_M_time_era_format = L"%H:%M:%S"; | ||
2454 | + _M_data->_M_date_time_format = L""; | ||
2455 | + _M_data->_M_date_time_era_format = L""; | ||
2456 | + _M_data->_M_am = L"AM"; | ||
2457 | + _M_data->_M_pm = L"PM"; | ||
2458 | + _M_data->_M_am_pm_format = L""; | ||
2459 | + | ||
2460 | + // Day names, starting with "C"'s Sunday. | ||
2461 | + _M_data->_M_day1 = L"Sunday"; | ||
2462 | + _M_data->_M_day2 = L"Monday"; | ||
2463 | + _M_data->_M_day3 = L"Tuesday"; | ||
2464 | + _M_data->_M_day4 = L"Wednesday"; | ||
2465 | + _M_data->_M_day5 = L"Thursday"; | ||
2466 | + _M_data->_M_day6 = L"Friday"; | ||
2467 | + _M_data->_M_day7 = L"Saturday"; | ||
2468 | + | ||
2469 | + // Abbreviated day names, starting with "C"'s Sun. | ||
2470 | + _M_data->_M_aday1 = L"Sun"; | ||
2471 | + _M_data->_M_aday2 = L"Mon"; | ||
2472 | + _M_data->_M_aday3 = L"Tue"; | ||
2473 | + _M_data->_M_aday4 = L"Wed"; | ||
2474 | + _M_data->_M_aday5 = L"Thu"; | ||
2475 | + _M_data->_M_aday6 = L"Fri"; | ||
2476 | + _M_data->_M_aday7 = L"Sat"; | ||
2477 | + | ||
2478 | + // Month names, starting with "C"'s January. | ||
2479 | + _M_data->_M_month01 = L"January"; | ||
2480 | + _M_data->_M_month02 = L"February"; | ||
2481 | + _M_data->_M_month03 = L"March"; | ||
2482 | + _M_data->_M_month04 = L"April"; | ||
2483 | + _M_data->_M_month05 = L"May"; | ||
2484 | + _M_data->_M_month06 = L"June"; | ||
2485 | + _M_data->_M_month07 = L"July"; | ||
2486 | + _M_data->_M_month08 = L"August"; | ||
2487 | + _M_data->_M_month09 = L"September"; | ||
2488 | + _M_data->_M_month10 = L"October"; | ||
2489 | + _M_data->_M_month11 = L"November"; | ||
2490 | + _M_data->_M_month12 = L"December"; | ||
2491 | + | ||
2492 | + // Abbreviated month names, starting with "C"'s Jan. | ||
2493 | + _M_data->_M_amonth01 = L"Jan"; | ||
2494 | + _M_data->_M_amonth02 = L"Feb"; | ||
2495 | + _M_data->_M_amonth03 = L"Mar"; | ||
2496 | + _M_data->_M_amonth04 = L"Apr"; | ||
2497 | + _M_data->_M_amonth05 = L"May"; | ||
2498 | + _M_data->_M_amonth06 = L"Jun"; | ||
2499 | + _M_data->_M_amonth07 = L"Jul"; | ||
2500 | + _M_data->_M_amonth08 = L"Aug"; | ||
2501 | + _M_data->_M_amonth09 = L"Sep"; | ||
2502 | + _M_data->_M_amonth10 = L"Oct"; | ||
2503 | + _M_data->_M_amonth11 = L"Nov"; | ||
2504 | + _M_data->_M_amonth12 = L"Dec"; | ||
2505 | + } | ||
2506 | +#if 0 | ||
2507 | + else | ||
2508 | + { | ||
2509 | + _M_c_locale_timepunct = _S_clone_c_locale(__cloc); | ||
2510 | + | ||
2511 | + union { char *__s; wchar_t *__w; } __u; | ||
2512 | + | ||
2513 | + __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc); | ||
2514 | + _M_data->_M_date_format = __u.__w; | ||
2515 | + __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc); | ||
2516 | + _M_data->_M_date_era_format = __u.__w; | ||
2517 | + __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc); | ||
2518 | + _M_data->_M_time_format = __u.__w; | ||
2519 | + __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc); | ||
2520 | + _M_data->_M_time_era_format = __u.__w; | ||
2521 | + __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc); | ||
2522 | + _M_data->_M_date_time_format = __u.__w; | ||
2523 | + __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc); | ||
2524 | + _M_data->_M_date_time_era_format = __u.__w; | ||
2525 | + __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc); | ||
2526 | + _M_data->_M_am = __u.__w; | ||
2527 | + __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc); | ||
2528 | + _M_data->_M_pm = __u.__w; | ||
2529 | + __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc); | ||
2530 | + _M_data->_M_am_pm_format = __u.__w; | ||
2531 | + | ||
2532 | + // Day names, starting with "C"'s Sunday. | ||
2533 | + __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc); | ||
2534 | + _M_data->_M_day1 = __u.__w; | ||
2535 | + __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc); | ||
2536 | + _M_data->_M_day2 = __u.__w; | ||
2537 | + __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc); | ||
2538 | + _M_data->_M_day3 = __u.__w; | ||
2539 | + __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc); | ||
2540 | + _M_data->_M_day4 = __u.__w; | ||
2541 | + __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc); | ||
2542 | + _M_data->_M_day5 = __u.__w; | ||
2543 | + __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc); | ||
2544 | + _M_data->_M_day6 = __u.__w; | ||
2545 | + __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc); | ||
2546 | + _M_data->_M_day7 = __u.__w; | ||
2547 | + | ||
2548 | + // Abbreviated day names, starting with "C"'s Sun. | ||
2549 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc); | ||
2550 | + _M_data->_M_aday1 = __u.__w; | ||
2551 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc); | ||
2552 | + _M_data->_M_aday2 = __u.__w; | ||
2553 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc); | ||
2554 | + _M_data->_M_aday3 = __u.__w; | ||
2555 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc); | ||
2556 | + _M_data->_M_aday4 = __u.__w; | ||
2557 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc); | ||
2558 | + _M_data->_M_aday5 = __u.__w; | ||
2559 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc); | ||
2560 | + _M_data->_M_aday6 = __u.__w; | ||
2561 | + __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc); | ||
2562 | + _M_data->_M_aday7 = __u.__w; | ||
2563 | + | ||
2564 | + // Month names, starting with "C"'s January. | ||
2565 | + __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc); | ||
2566 | + _M_data->_M_month01 = __u.__w; | ||
2567 | + __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc); | ||
2568 | + _M_data->_M_month02 = __u.__w; | ||
2569 | + __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc); | ||
2570 | + _M_data->_M_month03 = __u.__w; | ||
2571 | + __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc); | ||
2572 | + _M_data->_M_month04 = __u.__w; | ||
2573 | + __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc); | ||
2574 | + _M_data->_M_month05 = __u.__w; | ||
2575 | + __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc); | ||
2576 | + _M_data->_M_month06 = __u.__w; | ||
2577 | + __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc); | ||
2578 | + _M_data->_M_month07 = __u.__w; | ||
2579 | + __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc); | ||
2580 | + _M_data->_M_month08 = __u.__w; | ||
2581 | + __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc); | ||
2582 | + _M_data->_M_month09 = __u.__w; | ||
2583 | + __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc); | ||
2584 | + _M_data->_M_month10 = __u.__w; | ||
2585 | + __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc); | ||
2586 | + _M_data->_M_month11 = __u.__w; | ||
2587 | + __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc); | ||
2588 | + _M_data->_M_month12 = __u.__w; | ||
2589 | + | ||
2590 | + // Abbreviated month names, starting with "C"'s Jan. | ||
2591 | + __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc); | ||
2592 | + _M_data->_M_amonth01 = __u.__w; | ||
2593 | + __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc); | ||
2594 | + _M_data->_M_amonth02 = __u.__w; | ||
2595 | + __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc); | ||
2596 | + _M_data->_M_amonth03 = __u.__w; | ||
2597 | + __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc); | ||
2598 | + _M_data->_M_amonth04 = __u.__w; | ||
2599 | + __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc); | ||
2600 | + _M_data->_M_amonth05 = __u.__w; | ||
2601 | + __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc); | ||
2602 | + _M_data->_M_amonth06 = __u.__w; | ||
2603 | + __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc); | ||
2604 | + _M_data->_M_amonth07 = __u.__w; | ||
2605 | + __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc); | ||
2606 | + _M_data->_M_amonth08 = __u.__w; | ||
2607 | + __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc); | ||
2608 | + _M_data->_M_amonth09 = __u.__w; | ||
2609 | + __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc); | ||
2610 | + _M_data->_M_amonth10 = __u.__w; | ||
2611 | + __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc); | ||
2612 | + _M_data->_M_amonth11 = __u.__w; | ||
2613 | + __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc); | ||
2614 | + _M_data->_M_amonth12 = __u.__w; | ||
2615 | + } | ||
2616 | +#endif // 0 | ||
2617 | + } | ||
2618 | +#endif | ||
2619 | +} | ||
2620 | --- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h | ||
2621 | +++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h | ||
2622 | @@ -0,0 +1,76 @@ | ||
2623 | +// std::time_get, std::time_put implementation, GNU version -*- C++ -*- | ||
2624 | + | ||
2625 | +// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | ||
2626 | +// | ||
2627 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
2628 | +// software; you can redistribute it and/or modify it under the | ||
2629 | +// terms of the GNU General Public License as published by the | ||
2630 | +// Free Software Foundation; either version 2, or (at your option) | ||
2631 | +// any later version. | ||
2632 | + | ||
2633 | +// This library is distributed in the hope that it will be useful, | ||
2634 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2635 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2636 | +// GNU General Public License for more details. | ||
2637 | + | ||
2638 | +// You should have received a copy of the GNU General Public License along | ||
2639 | +// with this library; see the file COPYING. If not, write to the Free | ||
2640 | +// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
2641 | +// USA. | ||
2642 | + | ||
2643 | +// As a special exception, you may use this file as part of a free software | ||
2644 | +// library without restriction. Specifically, if other files instantiate | ||
2645 | +// templates or use macros or inline functions from this file, or you compile | ||
2646 | +// this file and link it with other files to produce an executable, this | ||
2647 | +// file does not by itself cause the resulting executable to be covered by | ||
2648 | +// the GNU General Public License. This exception does not however | ||
2649 | +// invalidate any other reasons why the executable file might be covered by | ||
2650 | +// the GNU General Public License. | ||
2651 | + | ||
2652 | +// | ||
2653 | +// ISO C++ 14882: 22.2.5.1.2 - time_get functions | ||
2654 | +// ISO C++ 14882: 22.2.5.3.2 - time_put functions | ||
2655 | +// | ||
2656 | + | ||
2657 | +// Written by Benjamin Kosnik <bkoz@redhat.com> | ||
2658 | + | ||
2659 | + template<typename _CharT> | ||
2660 | + __timepunct<_CharT>::__timepunct(size_t __refs) | ||
2661 | + : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), | ||
2662 | + _M_name_timepunct(_S_get_c_name()) | ||
2663 | + { _M_initialize_timepunct(); } | ||
2664 | + | ||
2665 | + template<typename _CharT> | ||
2666 | + __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) | ||
2667 | + : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL), | ||
2668 | + _M_name_timepunct(_S_get_c_name()) | ||
2669 | + { _M_initialize_timepunct(); } | ||
2670 | + | ||
2671 | + template<typename _CharT> | ||
2672 | + __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, | ||
2673 | + size_t __refs) | ||
2674 | + : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL), | ||
2675 | + _M_name_timepunct(NULL) | ||
2676 | + { | ||
2677 | + const size_t __len = std::strlen(__s) + 1; | ||
2678 | + char* __tmp = new char[__len]; | ||
2679 | + std::memcpy(__tmp, __s, __len); | ||
2680 | + _M_name_timepunct = __tmp; | ||
2681 | + | ||
2682 | + try | ||
2683 | + { _M_initialize_timepunct(__cloc); } | ||
2684 | + catch(...) | ||
2685 | + { | ||
2686 | + delete [] _M_name_timepunct; | ||
2687 | + __throw_exception_again; | ||
2688 | + } | ||
2689 | + } | ||
2690 | + | ||
2691 | + template<typename _CharT> | ||
2692 | + __timepunct<_CharT>::~__timepunct() | ||
2693 | + { | ||
2694 | + if (_M_name_timepunct != _S_get_c_name()) | ||
2695 | + delete [] _M_name_timepunct; | ||
2696 | + delete _M_data; | ||
2697 | + _S_destroy_c_locale(_M_c_locale_timepunct); | ||
2698 | + } | ||
2699 | --- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_base.h | ||
2700 | +++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h | ||
2701 | @@ -0,0 +1,64 @@ | ||
2702 | +// Locale support -*- C++ -*- | ||
2703 | + | ||
2704 | +// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004 | ||
2705 | +// Free Software Foundation, Inc. | ||
2706 | +// | ||
2707 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
2708 | +// software; you can redistribute it and/or modify it under the | ||
2709 | +// terms of the GNU General Public License as published by the | ||
2710 | +// Free Software Foundation; either version 2, or (at your option) | ||
2711 | +// any later version. | ||
2712 | + | ||
2713 | +// This library is distributed in the hope that it will be useful, | ||
2714 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2715 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2716 | +// GNU General Public License for more details. | ||
2717 | + | ||
2718 | +// You should have received a copy of the GNU General Public License along | ||
2719 | +// with this library; see the file COPYING. If not, write to the Free | ||
2720 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
2721 | +// USA. | ||
2722 | + | ||
2723 | +// As a special exception, you may use this file as part of a free software | ||
2724 | +// library without restriction. Specifically, if other files instantiate | ||
2725 | +// templates or use macros or inline functions from this file, or you compile | ||
2726 | +// this file and link it with other files to produce an executable, this | ||
2727 | +// file does not by itself cause the resulting executable to be covered by | ||
2728 | +// the GNU General Public License. This exception does not however | ||
2729 | +// invalidate any other reasons why the executable file might be covered by | ||
2730 | +// the GNU General Public License. | ||
2731 | + | ||
2732 | +// | ||
2733 | +// ISO C++ 14882: 22.1 Locales | ||
2734 | +// | ||
2735 | + | ||
2736 | +/** @file ctype_base.h | ||
2737 | + * This is an internal header file, included by other library headers. | ||
2738 | + * You should not attempt to use it directly. | ||
2739 | + */ | ||
2740 | + | ||
2741 | +// Information as gleaned from /usr/include/ctype.h | ||
2742 | + | ||
2743 | + /// @brief Base class for ctype. | ||
2744 | + struct ctype_base | ||
2745 | + { | ||
2746 | + // Note: In uClibc, the following two types depend on configuration. | ||
2747 | + | ||
2748 | + // Non-standard typedefs. | ||
2749 | + typedef const __ctype_touplow_t* __to_type; | ||
2750 | + | ||
2751 | + // NB: Offsets into ctype<char>::_M_table force a particular size | ||
2752 | + // on the mask type. Because of this, we don't use an enum. | ||
2753 | + typedef __ctype_mask_t mask; | ||
2754 | + static const mask upper = _ISupper; | ||
2755 | + static const mask lower = _ISlower; | ||
2756 | + static const mask alpha = _ISalpha; | ||
2757 | + static const mask digit = _ISdigit; | ||
2758 | + static const mask xdigit = _ISxdigit; | ||
2759 | + static const mask space = _ISspace; | ||
2760 | + static const mask print = _ISprint; | ||
2761 | + static const mask graph = _ISalpha | _ISdigit | _ISpunct; | ||
2762 | + static const mask cntrl = _IScntrl; | ||
2763 | + static const mask punct = _ISpunct; | ||
2764 | + static const mask alnum = _ISalpha | _ISdigit; | ||
2765 | + }; | ||
2766 | --- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h | ||
2767 | +++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_inline.h | ||
2768 | @@ -0,0 +1,69 @@ | ||
2769 | +// Locale support -*- C++ -*- | ||
2770 | + | ||
2771 | +// Copyright (C) 2000, 2002 Free Software Foundation, Inc. | ||
2772 | +// | ||
2773 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
2774 | +// software; you can redistribute it and/or modify it under the | ||
2775 | +// terms of the GNU General Public License as published by the | ||
2776 | +// Free Software Foundation; either version 2, or (at your option) | ||
2777 | +// any later version. | ||
2778 | + | ||
2779 | +// This library is distributed in the hope that it will be useful, | ||
2780 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2781 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2782 | +// GNU General Public License for more details. | ||
2783 | + | ||
2784 | +// You should have received a copy of the GNU General Public License along | ||
2785 | +// with this library; see the file COPYING. If not, write to the Free | ||
2786 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
2787 | +// USA. | ||
2788 | + | ||
2789 | +// As a special exception, you may use this file as part of a free software | ||
2790 | +// library without restriction. Specifically, if other files instantiate | ||
2791 | +// templates or use macros or inline functions from this file, or you compile | ||
2792 | +// this file and link it with other files to produce an executable, this | ||
2793 | +// file does not by itself cause the resulting executable to be covered by | ||
2794 | +// the GNU General Public License. This exception does not however | ||
2795 | +// invalidate any other reasons why the executable file might be covered by | ||
2796 | +// the GNU General Public License. | ||
2797 | + | ||
2798 | +// | ||
2799 | +// ISO C++ 14882: 22.1 Locales | ||
2800 | +// | ||
2801 | + | ||
2802 | +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) | ||
2803 | +// functions go in ctype.cc | ||
2804 | + | ||
2805 | + bool | ||
2806 | + ctype<char>:: | ||
2807 | + is(mask __m, char __c) const | ||
2808 | + { return _M_table[static_cast<unsigned char>(__c)] & __m; } | ||
2809 | + | ||
2810 | + const char* | ||
2811 | + ctype<char>:: | ||
2812 | + is(const char* __low, const char* __high, mask* __vec) const | ||
2813 | + { | ||
2814 | + while (__low < __high) | ||
2815 | + *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; | ||
2816 | + return __high; | ||
2817 | + } | ||
2818 | + | ||
2819 | + const char* | ||
2820 | + ctype<char>:: | ||
2821 | + scan_is(mask __m, const char* __low, const char* __high) const | ||
2822 | + { | ||
2823 | + while (__low < __high | ||
2824 | + && !(_M_table[static_cast<unsigned char>(*__low)] & __m)) | ||
2825 | + ++__low; | ||
2826 | + return __low; | ||
2827 | + } | ||
2828 | + | ||
2829 | + const char* | ||
2830 | + ctype<char>:: | ||
2831 | + scan_not(mask __m, const char* __low, const char* __high) const | ||
2832 | + { | ||
2833 | + while (__low < __high | ||
2834 | + && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0) | ||
2835 | + ++__low; | ||
2836 | + return __low; | ||
2837 | + } | ||
2838 | --- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h | ||
2839 | +++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h | ||
2840 | @@ -0,0 +1,92 @@ | ||
2841 | +// Locale support -*- C++ -*- | ||
2842 | + | ||
2843 | +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004 | ||
2844 | +// Free Software Foundation, Inc. | ||
2845 | +// | ||
2846 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
2847 | +// software; you can redistribute it and/or modify it under the | ||
2848 | +// terms of the GNU General Public License as published by the | ||
2849 | +// Free Software Foundation; either version 2, or (at your option) | ||
2850 | +// any later version. | ||
2851 | + | ||
2852 | +// This library is distributed in the hope that it will be useful, | ||
2853 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2854 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2855 | +// GNU General Public License for more details. | ||
2856 | + | ||
2857 | +// You should have received a copy of the GNU General Public License along | ||
2858 | +// with this library; see the file COPYING. If not, write to the Free | ||
2859 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
2860 | +// USA. | ||
2861 | + | ||
2862 | +// As a special exception, you may use this file as part of a free software | ||
2863 | +// library without restriction. Specifically, if other files instantiate | ||
2864 | +// templates or use macros or inline functions from this file, or you compile | ||
2865 | +// this file and link it with other files to produce an executable, this | ||
2866 | +// file does not by itself cause the resulting executable to be covered by | ||
2867 | +// the GNU General Public License. This exception does not however | ||
2868 | +// invalidate any other reasons why the executable file might be covered by | ||
2869 | +// the GNU General Public License. | ||
2870 | + | ||
2871 | +// | ||
2872 | +// ISO C++ 14882: 22.1 Locales | ||
2873 | +// | ||
2874 | + | ||
2875 | +// Information as gleaned from /usr/include/ctype.h | ||
2876 | + | ||
2877 | + const ctype_base::mask* | ||
2878 | + ctype<char>::classic_table() throw() | ||
2879 | + { return __C_ctype_b; } | ||
2880 | + | ||
2881 | + ctype<char>::ctype(__c_locale, const mask* __table, bool __del, | ||
2882 | + size_t __refs) | ||
2883 | + : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), | ||
2884 | + _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) | ||
2885 | + { | ||
2886 | + _M_toupper = __C_ctype_toupper; | ||
2887 | + _M_tolower = __C_ctype_tolower; | ||
2888 | + _M_table = __table ? __table : __C_ctype_b; | ||
2889 | + memset(_M_widen, 0, sizeof(_M_widen)); | ||
2890 | + memset(_M_narrow, 0, sizeof(_M_narrow)); | ||
2891 | + } | ||
2892 | + | ||
2893 | + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) | ||
2894 | + : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), | ||
2895 | + _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0) | ||
2896 | + { | ||
2897 | + _M_toupper = __C_ctype_toupper; | ||
2898 | + _M_tolower = __C_ctype_tolower; | ||
2899 | + _M_table = __table ? __table : __C_ctype_b; | ||
2900 | + memset(_M_widen, 0, sizeof(_M_widen)); | ||
2901 | + memset(_M_narrow, 0, sizeof(_M_narrow)); | ||
2902 | + } | ||
2903 | + | ||
2904 | + char | ||
2905 | + ctype<char>::do_toupper(char __c) const | ||
2906 | + { return _M_toupper[static_cast<unsigned char>(__c)]; } | ||
2907 | + | ||
2908 | + const char* | ||
2909 | + ctype<char>::do_toupper(char* __low, const char* __high) const | ||
2910 | + { | ||
2911 | + while (__low < __high) | ||
2912 | + { | ||
2913 | + *__low = _M_toupper[static_cast<unsigned char>(*__low)]; | ||
2914 | + ++__low; | ||
2915 | + } | ||
2916 | + return __high; | ||
2917 | + } | ||
2918 | + | ||
2919 | + char | ||
2920 | + ctype<char>::do_tolower(char __c) const | ||
2921 | + { return _M_tolower[static_cast<unsigned char>(__c)]; } | ||
2922 | + | ||
2923 | + const char* | ||
2924 | + ctype<char>::do_tolower(char* __low, const char* __high) const | ||
2925 | + { | ||
2926 | + while (__low < __high) | ||
2927 | + { | ||
2928 | + *__low = _M_tolower[static_cast<unsigned char>(*__low)]; | ||
2929 | + ++__low; | ||
2930 | + } | ||
2931 | + return __high; | ||
2932 | + } | ||
2933 | --- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/os_defines.h | ||
2934 | +++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/os_defines.h | ||
2935 | @@ -0,0 +1,44 @@ | ||
2936 | +// Specific definitions for GNU/Linux -*- C++ -*- | ||
2937 | + | ||
2938 | +// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. | ||
2939 | +// | ||
2940 | +// This file is part of the GNU ISO C++ Library. This library is free | ||
2941 | +// software; you can redistribute it and/or modify it under the | ||
2942 | +// terms of the GNU General Public License as published by the | ||
2943 | +// Free Software Foundation; either version 2, or (at your option) | ||
2944 | +// any later version. | ||
2945 | + | ||
2946 | +// This library is distributed in the hope that it will be useful, | ||
2947 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2948 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2949 | +// GNU General Public License for more details. | ||
2950 | + | ||
2951 | +// You should have received a copy of the GNU General Public License along | ||
2952 | +// with this library; see the file COPYING. If not, write to the Free | ||
2953 | +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
2954 | +// USA. | ||
2955 | + | ||
2956 | +// As a special exception, you may use this file as part of a free software | ||
2957 | +// library without restriction. Specifically, if other files instantiate | ||
2958 | +// templates or use macros or inline functions from this file, or you compile | ||
2959 | +// this file and link it with other files to produce an executable, this | ||
2960 | +// file does not by itself cause the resulting executable to be covered by | ||
2961 | +// the GNU General Public License. This exception does not however | ||
2962 | +// invalidate any other reasons why the executable file might be covered by | ||
2963 | +// the GNU General Public License. | ||
2964 | + | ||
2965 | +#ifndef _GLIBCXX_OS_DEFINES | ||
2966 | +#define _GLIBCXX_OS_DEFINES 1 | ||
2967 | + | ||
2968 | +// System-specific #define, typedefs, corrections, etc, go here. This | ||
2969 | +// file will come before all others. | ||
2970 | + | ||
2971 | +// This keeps isanum, et al from being propagated as macros. | ||
2972 | +#define __NO_CTYPE 1 | ||
2973 | + | ||
2974 | +#include <features.h> | ||
2975 | + | ||
2976 | +// We must not see the optimized string functions GNU libc defines. | ||
2977 | +#define __NO_STRING_INLINES | ||
2978 | + | ||
2979 | +#endif | ||
2980 | --- gcc-4.1.0-dist/libstdc++-v3/configure | ||
2981 | +++ gcc-4.1.0/libstdc++-v3/configure | ||
2982 | @@ -4005,6 +4005,11 @@ | ||
2983 | lt_cv_deplibs_check_method=pass_all | ||
2984 | ;; | ||
2985 | |||
2986 | +linux-uclibc*) | ||
2987 | + lt_cv_deplibs_check_method=pass_all | ||
2988 | + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` | ||
2989 | + ;; | ||
2990 | + | ||
2991 | netbsd* | knetbsd*-gnu) | ||
2992 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | ||
2993 | lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' | ||
2994 | @@ -5740,7 +5745,7 @@ | ||
2995 | enableval="$enable_clocale" | ||
2996 | |||
2997 | case "$enableval" in | ||
2998 | - generic|gnu|ieee_1003.1-2001|yes|no|auto) ;; | ||
2999 | + generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;; | ||
3000 | *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5 | ||
3001 | echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;} | ||
3002 | { (exit 1); exit 1; }; } ;; | ||
3003 | @@ -5765,6 +5770,9 @@ | ||
3004 | # Default to "generic". | ||
3005 | if test $enable_clocale_flag = auto; then | ||
3006 | case ${target_os} in | ||
3007 | + linux-uclibc*) | ||
3008 | + enable_clocale_flag=uclibc | ||
3009 | + ;; | ||
3010 | linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu) | ||
3011 | cat >conftest.$ac_ext <<_ACEOF | ||
3012 | /* confdefs.h. */ | ||
3013 | @@ -5995,6 +6003,76 @@ | ||
3014 | CTIME_CC=config/locale/generic/time_members.cc | ||
3015 | CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h | ||
3016 | ;; | ||
3017 | + uclibc) | ||
3018 | + echo "$as_me:$LINENO: result: uclibc" >&5 | ||
3019 | +echo "${ECHO_T}uclibc" >&6 | ||
3020 | + | ||
3021 | + # Declare intention to use gettext, and add support for specific | ||
3022 | + # languages. | ||
3023 | + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT | ||
3024 | + ALL_LINGUAS="de fr" | ||
3025 | + | ||
3026 | + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. | ||
3027 | + # Extract the first word of "msgfmt", so it can be a program name with args. | ||
3028 | +set dummy msgfmt; ac_word=$2 | ||
3029 | +echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
3030 | +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
3031 | +if test "${ac_cv_prog_check_msgfmt+set}" = set; then | ||
3032 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
3033 | +else | ||
3034 | + if test -n "$check_msgfmt"; then | ||
3035 | + ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test. | ||
3036 | +else | ||
3037 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
3038 | +for as_dir in $PATH | ||
3039 | +do | ||
3040 | + IFS=$as_save_IFS | ||
3041 | + test -z "$as_dir" && as_dir=. | ||
3042 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
3043 | + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
3044 | + ac_cv_prog_check_msgfmt="yes" | ||
3045 | + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
3046 | + break 2 | ||
3047 | + fi | ||
3048 | +done | ||
3049 | +done | ||
3050 | + | ||
3051 | + test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no" | ||
3052 | +fi | ||
3053 | +fi | ||
3054 | +check_msgfmt=$ac_cv_prog_check_msgfmt | ||
3055 | +if test -n "$check_msgfmt"; then | ||
3056 | + echo "$as_me:$LINENO: result: $check_msgfmt" >&5 | ||
3057 | +echo "${ECHO_T}$check_msgfmt" >&6 | ||
3058 | +else | ||
3059 | + echo "$as_me:$LINENO: result: no" >&5 | ||
3060 | +echo "${ECHO_T}no" >&6 | ||
3061 | +fi | ||
3062 | + | ||
3063 | + if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then | ||
3064 | + USE_NLS=yes | ||
3065 | + fi | ||
3066 | + # Export the build objects. | ||
3067 | + for ling in $ALL_LINGUAS; do \ | ||
3068 | + glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \ | ||
3069 | + glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \ | ||
3070 | + done | ||
3071 | + | ||
3072 | + | ||
3073 | + | ||
3074 | + CLOCALE_H=config/locale/uclibc/c_locale.h | ||
3075 | + CLOCALE_CC=config/locale/uclibc/c_locale.cc | ||
3076 | + CCODECVT_CC=config/locale/uclibc/codecvt_members.cc | ||
3077 | + CCOLLATE_CC=config/locale/uclibc/collate_members.cc | ||
3078 | + CCTYPE_CC=config/locale/uclibc/ctype_members.cc | ||
3079 | + CMESSAGES_H=config/locale/uclibc/messages_members.h | ||
3080 | + CMESSAGES_CC=config/locale/uclibc/messages_members.cc | ||
3081 | + CMONEY_CC=config/locale/uclibc/monetary_members.cc | ||
3082 | + CNUMERIC_CC=config/locale/uclibc/numeric_members.cc | ||
3083 | + CTIME_H=config/locale/uclibc/time_members.h | ||
3084 | + CTIME_CC=config/locale/uclibc/time_members.cc | ||
3085 | + CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h | ||
3086 | + ;; | ||
3087 | esac | ||
3088 | |||
3089 | # This is where the testsuite looks for locale catalogs, using the | ||
3090 | --- gcc-4.1.0-dist/libstdc++-v3/configure.host | ||
3091 | +++ gcc-4.1.0/libstdc++-v3/configure.host | ||
3092 | @@ -261,6 +261,12 @@ | ||
3093 | ;; | ||
3094 | esac | ||
3095 | |||
3096 | +# Override for uClibc since linux-uclibc gets mishandled above. | ||
3097 | +case "${host_os}" in | ||
3098 | + *-uclibc*) | ||
3099 | + os_include_dir="os/uclibc" | ||
3100 | + ;; | ||
3101 | +esac | ||
3102 | |||
3103 | # Set any OS-dependent and CPU-dependent bits. | ||
3104 | # THIS TABLE IS SORTED. KEEP IT THAT WAY. | ||
3105 | --- gcc-4.1.0-dist/libstdc++-v3/crossconfig.m4 | ||
3106 | +++ gcc-4.1.0/libstdc++-v3/crossconfig.m4 | ||
3107 | @@ -143,6 +143,99 @@ | ||
3108 | ;; | ||
3109 | esac | ||
3110 | ;; | ||
3111 | + *-uclibc*) | ||
3112 | +# Temporary hack until we implement the float versions of the libm funcs | ||
3113 | + AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ | ||
3114 | + machine/endian.h machine/param.h sys/machine.h sys/types.h \ | ||
3115 | + fp.h float.h endian.h inttypes.h locale.h float.h stdint.h]) | ||
3116 | + SECTION_FLAGS='-ffunction-sections -fdata-sections' | ||
3117 | + AC_SUBST(SECTION_FLAGS) | ||
3118 | + GLIBCXX_CHECK_LINKER_FEATURES | ||
3119 | + GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT | ||
3120 | + GLIBCXX_CHECK_WCHAR_T_SUPPORT | ||
3121 | + | ||
3122 | + # For LFS. | ||
3123 | + AC_DEFINE(HAVE_INT64_T) | ||
3124 | + case "$target" in | ||
3125 | + *-uclinux*) | ||
3126 | + # Don't enable LFS with uClinux | ||
3127 | + ;; | ||
3128 | + *) | ||
3129 | + AC_DEFINE(_GLIBCXX_USE_LFS) | ||
3130 | + esac | ||
3131 | + | ||
3132 | + # For showmanyc_helper(). | ||
3133 | + AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h) | ||
3134 | + GLIBCXX_CHECK_POLL | ||
3135 | + GLIBCXX_CHECK_S_ISREG_OR_S_IFREG | ||
3136 | + | ||
3137 | + # For xsputn_2(). | ||
3138 | + AC_CHECK_HEADERS(sys/uio.h) | ||
3139 | + GLIBCXX_CHECK_WRITEV | ||
3140 | + | ||
3141 | +# AC_DEFINE(HAVE_ACOSF) | ||
3142 | +# AC_DEFINE(HAVE_ASINF) | ||
3143 | +# AC_DEFINE(HAVE_ATANF) | ||
3144 | +# AC_DEFINE(HAVE_ATAN2F) | ||
3145 | + AC_DEFINE(HAVE_CEILF) | ||
3146 | + AC_DEFINE(HAVE_COPYSIGN) | ||
3147 | +# AC_DEFINE(HAVE_COPYSIGNF) | ||
3148 | +# AC_DEFINE(HAVE_COSF) | ||
3149 | +# AC_DEFINE(HAVE_COSHF) | ||
3150 | +# AC_DEFINE(HAVE_EXPF) | ||
3151 | +# AC_DEFINE(HAVE_FABSF) | ||
3152 | + AC_DEFINE(HAVE_FINITE) | ||
3153 | + AC_DEFINE(HAVE_FINITEF) | ||
3154 | + AC_DEFINE(HAVE_FLOORF) | ||
3155 | +# AC_DEFINE(HAVE_FMODF) | ||
3156 | +# AC_DEFINE(HAVE_FREXPF) | ||
3157 | + AC_DEFINE(HAVE_HYPOT) | ||
3158 | +# AC_DEFINE(HAVE_HYPOTF) | ||
3159 | + AC_DEFINE(HAVE_ISINF) | ||
3160 | + AC_DEFINE(HAVE_ISINFF) | ||
3161 | + AC_DEFINE(HAVE_ISNAN) | ||
3162 | + AC_DEFINE(HAVE_ISNANF) | ||
3163 | +# AC_DEFINE(HAVE_LOGF) | ||
3164 | +# AC_DEFINE(HAVE_LOG10F) | ||
3165 | +# AC_DEFINE(HAVE_MODFF) | ||
3166 | +# AC_DEFINE(HAVE_SINF) | ||
3167 | +# AC_DEFINE(HAVE_SINHF) | ||
3168 | +# AC_DEFINE(HAVE_SINCOS) | ||
3169 | +# AC_DEFINE(HAVE_SINCOSF) | ||
3170 | + AC_DEFINE(HAVE_SQRTF) | ||
3171 | +# AC_DEFINE(HAVE_TANF) | ||
3172 | +# AC_DEFINE(HAVE_TANHF) | ||
3173 | + if test x"long_double_math_on_this_cpu" = x"yes"; then | ||
3174 | + AC_MSG_ERROR([long_double_math_on_this_cpu is yes!]) | ||
3175 | +# AC_DEFINE(HAVE_ACOSL) | ||
3176 | +# AC_DEFINE(HAVE_ASINL) | ||
3177 | +# AC_DEFINE(HAVE_ATANL) | ||
3178 | +# AC_DEFINE(HAVE_ATAN2L) | ||
3179 | +# AC_DEFINE(HAVE_CEILL) | ||
3180 | +# AC_DEFINE(HAVE_COPYSIGNL) | ||
3181 | +# AC_DEFINE(HAVE_COSL) | ||
3182 | +# AC_DEFINE(HAVE_COSHL) | ||
3183 | +# AC_DEFINE(HAVE_EXPL) | ||
3184 | +# AC_DEFINE(HAVE_FABSL) | ||
3185 | +# AC_DEFINE(HAVE_FINITEL) | ||
3186 | +# AC_DEFINE(HAVE_FLOORL) | ||
3187 | +# AC_DEFINE(HAVE_FMODL) | ||
3188 | +# AC_DEFINE(HAVE_FREXPL) | ||
3189 | +# AC_DEFINE(HAVE_HYPOTL) | ||
3190 | +# AC_DEFINE(HAVE_ISINFL) | ||
3191 | +# AC_DEFINE(HAVE_ISNANL) | ||
3192 | +# AC_DEFINE(HAVE_LOGL) | ||
3193 | +# AC_DEFINE(HAVE_LOG10L) | ||
3194 | +# AC_DEFINE(HAVE_MODFL) | ||
3195 | +# AC_DEFINE(HAVE_POWL) | ||
3196 | +# AC_DEFINE(HAVE_SINL) | ||
3197 | +# AC_DEFINE(HAVE_SINHL) | ||
3198 | +# AC_DEFINE(HAVE_SINCOSL) | ||
3199 | +# AC_DEFINE(HAVE_SQRTL) | ||
3200 | +# AC_DEFINE(HAVE_TANL) | ||
3201 | +# AC_DEFINE(HAVE_TANHL) | ||
3202 | + fi | ||
3203 | + ;; | ||
3204 | *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu) | ||
3205 | AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ | ||
3206 | machine/endian.h machine/param.h sys/machine.h sys/types.h \ | ||
3207 | @@ -157,7 +250,7 @@ | ||
3208 | AC_DEFINE(HAVE_INT64_T) | ||
3209 | case "$target" in | ||
3210 | *-uclinux*) | ||
3211 | - # Don't enable LFS with uClibc | ||
3212 | + # Don't enable LFS with uClinux | ||
3213 | ;; | ||
3214 | *) | ||
3215 | AC_DEFINE(_GLIBCXX_USE_LFS) | ||
3216 | --- gcc-4.1.0-dist/libstdc++-v3/include/c_compatibility/wchar.h | ||
3217 | +++ gcc-4.1.0/libstdc++-v3/include/c_compatibility/wchar.h | ||
3218 | @@ -101,7 +101,9 @@ | ||
3219 | using std::wmemcpy; | ||
3220 | using std::wmemmove; | ||
3221 | using std::wmemset; | ||
3222 | +#if _GLIBCXX_HAVE_WCSFTIME | ||
3223 | using std::wcsftime; | ||
3224 | +#endif | ||
3225 | |||
3226 | #if _GLIBCXX_USE_C99 | ||
3227 | using std::wcstold; | ||
3228 | --- gcc-4.1.0-dist/libstdc++-v3/include/c_std/std_cwchar.h | ||
3229 | +++ gcc-4.1.0/libstdc++-v3/include/c_std/std_cwchar.h | ||
3230 | @@ -180,7 +180,9 @@ | ||
3231 | using ::wcscoll; | ||
3232 | using ::wcscpy; | ||
3233 | using ::wcscspn; | ||
3234 | +#if _GLIBCXX_HAVE_WCSFTIME | ||
3235 | using ::wcsftime; | ||
3236 | +#endif | ||
3237 | using ::wcslen; | ||
3238 | using ::wcsncat; | ||
3239 | using ::wcsncmp; | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/300-libstdc++-pic.patch b/meta/packages/gcc/gcc-4.1.2/300-libstdc++-pic.patch deleted file mode 100644 index 89d03a85e5..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/300-libstdc++-pic.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | # DP: Build and install libstdc++_pic.a library. | ||
2 | |||
3 | --- gcc-4.1.0/libstdc++-v3/src/Makefile.am 2004-11-15 17:33:05.000000000 -0600 | ||
4 | +++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.am 2005-04-25 20:05:59.186930896 -0500 | ||
5 | @@ -214,6 +214,10 @@ | ||
6 | $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@ | ||
7 | |||
8 | |||
9 | +install-exec-local: | ||
10 | + $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o | ||
11 | + $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) | ||
12 | + | ||
13 | # Added bits to build debug library. | ||
14 | if GLIBCXX_BUILD_DEBUG | ||
15 | all-local: build_debug | ||
16 | --- gcc-4.1.0/libstdc++-v3/src/Makefile.in 2005-04-11 19:13:08.000000000 -0500 | ||
17 | +++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.in 2005-04-25 20:12:33.284316275 -0500 | ||
18 | @@ -627,7 +627,7 @@ | ||
19 | |||
20 | install-data-am: install-data-local | ||
21 | |||
22 | -install-exec-am: install-toolexeclibLTLIBRARIES | ||
23 | +install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local | ||
24 | |||
25 | install-info: install-info-am | ||
26 | |||
27 | @@ -660,6 +660,7 @@ | ||
28 | distclean-libtool distclean-tags distdir dvi dvi-am html \ | ||
29 | html-am info info-am install install-am install-data \ | ||
30 | install-data-am install-data-local install-exec \ | ||
31 | + install-exec-local \ | ||
32 | install-exec-am install-info install-info-am install-man \ | ||
33 | install-strip install-toolexeclibLTLIBRARIES installcheck \ | ||
34 | installcheck-am installdirs maintainer-clean \ | ||
35 | @@ -745,6 +746,11 @@ | ||
36 | install_debug: | ||
37 | (cd ${debugdir} && $(MAKE) \ | ||
38 | toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) | ||
39 | + | ||
40 | +install-exec-local: | ||
41 | + $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o | ||
42 | + $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) | ||
43 | + | ||
44 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
45 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
46 | .NOEXPORT: | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/301-missing-execinfo_h.patch b/meta/packages/gcc/gcc-4.1.2/301-missing-execinfo_h.patch deleted file mode 100644 index 0e2092f3fb..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/301-missing-execinfo_h.patch +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | --- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500 | ||
2 | +++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500 | ||
3 | @@ -500,7 +500,7 @@ | ||
4 | #ifdef __linux__ | ||
5 | # include <features.h> | ||
6 | # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ | ||
7 | - && !defined(__ia64__) | ||
8 | + && !defined(__ia64__) && !defined(__UCLIBC__) | ||
9 | # ifndef GC_HAVE_BUILTIN_BACKTRACE | ||
10 | # define GC_HAVE_BUILTIN_BACKTRACE | ||
11 | # endif | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/302-c99-snprintf.patch b/meta/packages/gcc/gcc-4.1.2/302-c99-snprintf.patch deleted file mode 100644 index dfb22d681b..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/302-c99-snprintf.patch +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | --- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500 | ||
2 | +++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500 | ||
3 | @@ -142,7 +142,7 @@ | ||
4 | using ::vsprintf; | ||
5 | } | ||
6 | |||
7 | -#if _GLIBCXX_USE_C99 | ||
8 | +#if _GLIBCXX_USE_C99 || defined(__UCLIBC__) | ||
9 | |||
10 | #undef snprintf | ||
11 | #undef vfscanf | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/303-c99-complex-ugly-hack.patch b/meta/packages/gcc/gcc-4.1.2/303-c99-complex-ugly-hack.patch deleted file mode 100644 index 2ccc80d9bb..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/303-c99-complex-ugly-hack.patch +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | --- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500 | ||
2 | +++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500 | ||
3 | @@ -7194,6 +7194,9 @@ | ||
4 | cat >>conftest.$ac_ext <<_ACEOF | ||
5 | /* end confdefs.h. */ | ||
6 | #include <complex.h> | ||
7 | +#ifdef __UCLIBC__ | ||
8 | +#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs | ||
9 | +#endif | ||
10 | int | ||
11 | main () | ||
12 | { | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/304-index_macro.patch b/meta/packages/gcc/gcc-4.1.2/304-index_macro.patch deleted file mode 100644 index 1fac112fa9..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/304-index_macro.patch +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | --- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100 | ||
2 | +++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100 | ||
3 | @@ -59,6 +59,9 @@ | ||
4 | #include <bits/allocator.h> | ||
5 | #include <ext/hash_fun.h> | ||
6 | |||
7 | +/* cope w/ index defined as macro, SuSv3 proposal */ | ||
8 | +#undef index | ||
9 | + | ||
10 | # ifdef __GC | ||
11 | # define __GC_CONST const | ||
12 | # else | ||
13 | --- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100 | ||
14 | +++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100 | ||
15 | @@ -53,6 +53,9 @@ | ||
16 | #include <ext/memory> // For uninitialized_copy_n | ||
17 | #include <ext/numeric> // For power | ||
18 | |||
19 | +/* cope w/ index defined as macro, SuSv3 proposal */ | ||
20 | +#undef index | ||
21 | + | ||
22 | namespace __gnu_cxx | ||
23 | { | ||
24 | using std::size_t; | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/602-sdk-libstdc++-includes.patch b/meta/packages/gcc/gcc-4.1.2/602-sdk-libstdc++-includes.patch deleted file mode 100644 index 23fce7544d..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/602-sdk-libstdc++-includes.patch +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | --- gcc-4.1.0/libstdc++-v3/fragment.am 2005-03-21 11:40:14.000000000 -0600 | ||
2 | +++ gcc-4.1.0-patched/libstdc++-v3/fragment.am 2005-04-25 20:14:39.856251785 -0500 | ||
3 | @@ -21,5 +21,5 @@ | ||
4 | $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once | ||
5 | |||
6 | # -I/-D flags to pass when compiling. | ||
7 | -AM_CPPFLAGS = $(GLIBCXX_INCLUDES) | ||
8 | +AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include | ||
9 | |||
10 | --- gcc-4.1.0/libstdc++-v3/libmath/Makefile.am 2005-03-21 11:40:18.000000000 -0600 | ||
11 | +++ gcc-4.1.0-patched/libstdc++-v3/libmath/Makefile.am 2005-04-25 20:14:39.682280735 -0500 | ||
12 | @@ -35,7 +35,7 @@ | ||
13 | |||
14 | libmath_la_SOURCES = stubs.c | ||
15 | |||
16 | -AM_CPPFLAGS = $(CANADIAN_INCLUDES) | ||
17 | +AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include | ||
18 | |||
19 | # Only compiling "C" sources in this directory. | ||
20 | LIBTOOL = @LIBTOOL@ --tag CC | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/740-sh-pr24836.patch b/meta/packages/gcc/gcc-4.1.2/740-sh-pr24836.patch deleted file mode 100644 index 7992282cff..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/740-sh-pr24836.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348 | ||
2 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836 | ||
3 | |||
4 | --- gcc/gcc/configure.ac (revision 106699) | ||
5 | +++ gcc/gcc/configure.ac (working copy) | ||
6 | @@ -2446,7 +2446,7 @@ | ||
7 | tls_first_minor=14 | ||
8 | tls_as_opt="-m64 -Aesame --fatal-warnings" | ||
9 | ;; | ||
10 | - sh-*-* | sh[34]-*-*) | ||
11 | + sh-*-* | sh[34]*-*-*) | ||
12 | conftest_s=' | ||
13 | .section ".tdata","awT",@progbits | ||
14 | foo: .long 25 | ||
15 | --- gcc/gcc/configure | ||
16 | +++ gcc/gcc/configure | ||
17 | @@ -14846,7 +14846,7 @@ | ||
18 | tls_first_minor=14 | ||
19 | tls_as_opt="-m64 -Aesame --fatal-warnings" | ||
20 | ;; | ||
21 | - sh-*-* | sh[34]-*-*) | ||
22 | + sh-*-* | sh[34]*-*-*) | ||
23 | conftest_s=' | ||
24 | .section ".tdata","awT",@progbits | ||
25 | foo: .long 25 | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/800-arm-bigendian.patch b/meta/packages/gcc/gcc-4.1.2/800-arm-bigendian.patch deleted file mode 100644 index 0a9417419e..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/800-arm-bigendian.patch +++ /dev/null | |||
@@ -1,127 +0,0 @@ | |||
1 | By Lennert Buytenhek <buytenh@wantstofly.org> | ||
2 | Adds support for arm*b-linux* big-endian ARM targets | ||
3 | |||
4 | See http://gcc.gnu.org/PR16350 | ||
5 | |||
6 | Index: gcc-4.1.1/gcc/config/arm/linux-elf.h | ||
7 | =================================================================== | ||
8 | --- gcc-4.1.1.orig/gcc/config/arm/linux-elf.h | ||
9 | +++ gcc-4.1.1/gcc/config/arm/linux-elf.h | ||
10 | @@ -28,19 +28,33 @@ | ||
11 | #undef TARGET_VERSION | ||
12 | #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr); | ||
13 | |||
14 | +/* | ||
15 | + * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* | ||
16 | + * (big endian) configurations. | ||
17 | + */ | ||
18 | +#if TARGET_BIG_ENDIAN_DEFAULT | ||
19 | +#define TARGET_ENDIAN_DEFAULT MASK_BIG_END | ||
20 | +#define TARGET_ENDIAN_OPTION "mbig-endian" | ||
21 | +#define TARGET_LINKER_EMULATION "armelfb_linux" | ||
22 | +#else | ||
23 | +#define TARGET_ENDIAN_DEFAULT 0 | ||
24 | +#define TARGET_ENDIAN_OPTION "mlittle-endian" | ||
25 | +#define TARGET_LINKER_EMULATION "armelf_linux" | ||
26 | +#endif | ||
27 | + | ||
28 | #undef TARGET_DEFAULT_FLOAT_ABI | ||
29 | #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD | ||
30 | |||
31 | #undef TARGET_DEFAULT | ||
32 | -#define TARGET_DEFAULT (0) | ||
33 | +#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT) | ||
34 | |||
35 | #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6 | ||
36 | |||
37 | -#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p" | ||
38 | +#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p" | ||
39 | |||
40 | #undef MULTILIB_DEFAULTS | ||
41 | #define MULTILIB_DEFAULTS \ | ||
42 | - { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" } | ||
43 | + { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" } | ||
44 | |||
45 | /* Now we define the strings used to build the spec file. */ | ||
46 | #undef LIB_SPEC | ||
47 | @@ -61,7 +75,7 @@ | ||
48 | %{rdynamic:-export-dynamic} \ | ||
49 | %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \ | ||
50 | -X \ | ||
51 | - %{mbig-endian:-EB}" \ | ||
52 | + %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ | ||
53 | SUBTARGET_EXTRA_LINK_SPEC | ||
54 | |||
55 | #undef LINK_SPEC | ||
56 | Index: gcc-4.1.1/gcc/config.gcc | ||
57 | =================================================================== | ||
58 | --- gcc-4.1.1.orig/gcc/config.gcc | ||
59 | +++ gcc-4.1.1/gcc/config.gcc | ||
60 | @@ -672,6 +672,11 @@ arm*-*-netbsd*) | ||
61 | ;; | ||
62 | arm*-*-linux*) # ARM GNU/Linux with ELF | ||
63 | tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" | ||
64 | + case $target in | ||
65 | + arm*b-*) | ||
66 | + tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" | ||
67 | + ;; | ||
68 | + esac | ||
69 | tmake_file="${tmake_file} t-linux arm/t-arm" | ||
70 | case ${target} in | ||
71 | arm*-*-linux-gnueabi) | ||
72 | Index: gcc-4.1.1/gcc/config/arm/linux-eabi.h | ||
73 | =================================================================== | ||
74 | --- gcc-4.1.1.orig/gcc/config/arm/linux-eabi.h | ||
75 | +++ gcc-4.1.1/gcc/config/arm/linux-eabi.h | ||
76 | @@ -20,6 +20,17 @@ | ||
77 | the Free Software Foundation, 51 Franklin Street, Fifth Floor, | ||
78 | Boston, MA 02110-1301, USA. */ | ||
79 | |||
80 | +/* | ||
81 | + * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* | ||
82 | + * (big endian) configurations. | ||
83 | + */ | ||
84 | +#undef TARGET_LINKER_EMULATION | ||
85 | +#if TARGET_BIG_ENDIAN_DEFAULT | ||
86 | +#define TARGET_LINKER_EMULATION "armelfb_linux_eabi" | ||
87 | +#else | ||
88 | +#define TARGET_LINKER_EMULATION "armelf_linux_eabi" | ||
89 | +#endif | ||
90 | + | ||
91 | /* On EABI GNU/Linux, we want both the BPABI builtins and the | ||
92 | GNU/Linux builtins. */ | ||
93 | #undef TARGET_OS_CPP_BUILTINS | ||
94 | @@ -48,7 +59,7 @@ | ||
95 | #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi | ||
96 | |||
97 | #undef SUBTARGET_EXTRA_LINK_SPEC | ||
98 | -#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi" | ||
99 | +#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION | ||
100 | |||
101 | /* Use ld-linux.so.3 so that it will be possible to run "classic" | ||
102 | GNU/Linux binaries on an EABI system. */ | ||
103 | Index: gcc-4.1.1/gcc/config/arm/bpabi.h | ||
104 | =================================================================== | ||
105 | --- gcc-4.1.1.orig/gcc/config/arm/bpabi.h | ||
106 | +++ gcc-4.1.1/gcc/config/arm/bpabi.h | ||
107 | @@ -33,9 +33,19 @@ | ||
108 | #undef FPUTYPE_DEFAULT | ||
109 | #define FPUTYPE_DEFAULT FPUTYPE_VFP | ||
110 | |||
111 | +/* | ||
112 | + * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-* | ||
113 | + * (big endian) configurations. | ||
114 | + */ | ||
115 | +#if TARGET_BIG_ENDIAN_DEFAULT | ||
116 | +#define TARGET_ENDIAN_DEFAULT MASK_BIG_END | ||
117 | +#else | ||
118 | +#define TARGET_ENDIAN_DEFAULT 0 | ||
119 | +#endif | ||
120 | + | ||
121 | /* EABI targets should enable interworking by default. */ | ||
122 | #undef TARGET_DEFAULT | ||
123 | -#define TARGET_DEFAULT MASK_INTERWORK | ||
124 | +#define TARGET_DEFAULT (MASK_INTERWORK | TARGET_ENDIAN_DEFAULT) | ||
125 | |||
126 | /* The ARM BPABI functions return a boolean; they use no special | ||
127 | calling convention. */ | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/801-arm-bigendian-eabi.patch b/meta/packages/gcc/gcc-4.1.2/801-arm-bigendian-eabi.patch deleted file mode 100644 index 54490fc24f..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/801-arm-bigendian-eabi.patch +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | Index: gcc-4.1.1/gcc/config/arm/linux-eabi.h | ||
2 | =================================================================== | ||
3 | --- gcc-4.1.1.orig/gcc/config/arm/linux-eabi.h 2007-02-20 14:51:33.416193250 +0100 | ||
4 | +++ gcc-4.1.1/gcc/config/arm/linux-eabi.h 2007-02-20 14:52:11.622581000 +0100 | ||
5 | @@ -48,7 +48,8 @@ | ||
6 | #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi | ||
7 | |||
8 | #undef SUBTARGET_EXTRA_LINK_SPEC | ||
9 | -#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi" | ||
10 | +#define SUBTARGET_EXTRA_LINK_SPEC \ | ||
11 | + " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} " | ||
12 | |||
13 | /* Use ld-linux.so.3 so that it will be possible to run "classic" | ||
14 | GNU/Linux binaries on an EABI system. */ | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/README b/meta/packages/gcc/gcc-4.1.2/README deleted file mode 100644 index b85840dc20..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/README +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | The numbered patches come from | ||
2 | http://www.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/gcc/4.1.1/ | ||
3 | Other patches are locally added to fix things (mostly inherited and reapplied | ||
4 | from gcc 3.4.4 where applicable) | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/arm-nolibfloat.patch b/meta/packages/gcc/gcc-4.1.2/arm-nolibfloat.patch deleted file mode 100644 index c4897c0330..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/arm-nolibfloat.patch +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | # Dimitry Andric <dimitry@andric.com>, 2004-05-01 | ||
2 | # | ||
3 | # * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed | ||
4 | # anymore. (The required functions are now in libgcc.) | ||
5 | # | ||
6 | # Fixes errors like | ||
7 | # arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat | ||
8 | # collect2: ld returned 1 exit status | ||
9 | # make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1 | ||
10 | # when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat | ||
11 | |||
12 | Index: gcc-4.0.2/gcc/config/arm/linux-elf.h | ||
13 | =================================================================== | ||
14 | --- gcc-4.0.2.orig/gcc/config/arm/linux-elf.h 2005-03-04 16:14:01.000000000 +0000 | ||
15 | +++ gcc-4.0.2/gcc/config/arm/linux-elf.h 2005-11-11 18:02:54.000000000 +0000 | ||
16 | @@ -56,7 +56,7 @@ | ||
17 | %{shared:-lc} \ | ||
18 | %{!shared:%{profile:-lc_p}%{!profile:-lc}}" | ||
19 | |||
20 | -#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" | ||
21 | +#define LIBGCC_SPEC "-lgcc" | ||
22 | |||
23 | /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add | ||
24 | the GNU/Linux magical crtbegin.o file (see crtstuff.c) which | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/arm-softfloat.patch b/meta/packages/gcc/gcc-4.1.2/arm-softfloat.patch deleted file mode 100644 index c86c83ed15..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/arm-softfloat.patch +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | Index: gcc-4.0.2/gcc/config/arm/t-linux | ||
2 | =================================================================== | ||
3 | --- gcc-4.0.2.orig/gcc/config/arm/t-linux 2004-05-15 12:41:35.000000000 +0000 | ||
4 | +++ gcc-4.0.2/gcc/config/arm/t-linux 2005-11-11 16:07:53.000000000 +0000 | ||
5 | @@ -4,7 +4,10 @@ | ||
6 | LIBGCC2_DEBUG_CFLAGS = -g0 | ||
7 | |||
8 | LIB1ASMSRC = arm/lib1funcs.asm | ||
9 | -LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx | ||
10 | +LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ | ||
11 | + _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ | ||
12 | + _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ | ||
13 | + _fixsfsi _fixunssfsi _floatdidf _floatdisf | ||
14 | |||
15 | # MULTILIB_OPTIONS = mhard-float/msoft-float | ||
16 | # MULTILIB_DIRNAMES = hard-float soft-float | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/arm-thumb-cache.patch b/meta/packages/gcc/gcc-4.1.2/arm-thumb-cache.patch deleted file mode 100644 index fa63846c8c..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/arm-thumb-cache.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | --- gcc-4.1.1/gcc/config/arm/linux-gas.h- 2005-06-25 03:22:41.000000000 +0200 | ||
2 | +++ gcc-4.1.1/gcc/config/arm/linux-gas.h 2006-06-18 10:23:46.000000000 +0200 | ||
3 | @@ -44,6 +44,7 @@ | ||
4 | |||
5 | /* Clear the instruction cache from `beg' to `end'. This makes an | ||
6 | inline system call to SYS_cacheflush. */ | ||
7 | +#if !defined(__thumb__) | ||
8 | #define CLEAR_INSN_CACHE(BEG, END) \ | ||
9 | { \ | ||
10 | register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ | ||
11 | @@ -53,3 +54,18 @@ | ||
12 | : "=r" (_beg) \ | ||
13 | : "0" (_beg), "r" (_end), "r" (_flg)); \ | ||
14 | } | ||
15 | +#else | ||
16 | +#define CLEAR_INSN_CACHE(BEG, END) \ | ||
17 | +{ \ | ||
18 | + register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ | ||
19 | + register unsigned long _end __asm ("a2") = (unsigned long) (END); \ | ||
20 | + register unsigned long _flg __asm ("a3") = 0; \ | ||
21 | + register unsigned long _swi __asm ("a4") = 0xf0002; \ | ||
22 | + __asm __volatile ("push {r7}\n" \ | ||
23 | + " mov r7,a4\n" \ | ||
24 | + " swi 0 @ sys_cacheflush\n" \ | ||
25 | + " pop {r7}\n" \ | ||
26 | + : "=r" (_beg) \ | ||
27 | + : "0" (_beg), "r" (_end), "r" (_flg), "r" (_swi)); \ | ||
28 | +} | ||
29 | +#endif | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/arm-thumb.patch b/meta/packages/gcc/gcc-4.1.2/arm-thumb.patch deleted file mode 100644 index 69e2f68cf2..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/arm-thumb.patch +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | |||
2 | # | ||
3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
4 | # | ||
5 | |||
6 | --- gcc-4.1.1/gcc/config/arm/lib1funcs.asm~gcc | ||
7 | +++ gcc-4.1.1/gcc/config/arm/lib1funcs.asm | ||
8 | @@ -995,10 +995,24 @@ | ||
9 | .code 32 | ||
10 | FUNC_START div0 | ||
11 | |||
12 | +#if ! defined __thumb__ | ||
13 | stmfd sp!, {r1, lr} | ||
14 | mov r0, #SIGFPE | ||
15 | bl SYM(raise) __PLT__ | ||
16 | RETLDM r1 | ||
17 | +#else | ||
18 | + push {r1, lr} | ||
19 | + mov r0, #SIGFPE | ||
20 | + bl SYM(raise) __PLT__ | ||
21 | +#if __ARM_ARCH__ > 4 | ||
22 | + pop {r1, pc} | ||
23 | +#else | ||
24 | + @ on 4T that won't work | ||
25 | + pop {r1} | ||
26 | + pop {r3} | ||
27 | + bx r3 | ||
28 | +#endif | ||
29 | +#endif | ||
30 | |||
31 | FUNC_END div0 | ||
32 | |||
33 | @@ -1141,11 +1155,12 @@ | ||
34 | code here switches to the correct mode before executing the function. */ | ||
35 | |||
36 | .text | ||
37 | - .align 0 | ||
38 | + .align 1 | ||
39 | .force_thumb | ||
40 | |||
41 | .macro call_via register | ||
42 | THUMB_FUNC_START _call_via_\register | ||
43 | + .hidden SYM (_call_via_\register) | ||
44 | |||
45 | bx \register | ||
46 | nop | ||
47 | @@ -1242,6 +1257,7 @@ | ||
48 | .code 16 | ||
49 | |||
50 | THUMB_FUNC_START _interwork_call_via_\register | ||
51 | + .hidden SYM (_interwork_call_via_\register) | ||
52 | |||
53 | bx pc | ||
54 | nop | ||
55 | --- gcc-4.1.1/gcc/config/arm/t-linux~gcc | ||
56 | +++ gcc-4.1.1/gcc/config/arm/t-linux | ||
57 | @@ -7,6 +7,7 @@ | ||
58 | LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ | ||
59 | _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ | ||
60 | _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ | ||
61 | + _call_via_rX \ | ||
62 | _fixsfsi _fixunssfsi _floatdidf _floatdisf | ||
63 | |||
64 | # MULTILIB_OPTIONS = mhard-float/msoft-float | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/cache-amnesia.patch b/meta/packages/gcc/gcc-4.1.2/cache-amnesia.patch deleted file mode 100644 index ef7cd111c5..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/cache-amnesia.patch +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | diff --git a/gcc/configure b/gcc/configure | ||
2 | index 44620ab..6e1830c 100755 | ||
3 | --- a/gcc/configure | ||
4 | +++ b/gcc/configure | ||
5 | @@ -12272,7 +12272,7 @@ else | ||
6 | esac | ||
7 | saved_CFLAGS="${CFLAGS}" | ||
8 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | ||
9 | - ${realsrcdir}/configure \ | ||
10 | + CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \ | ||
11 | --enable-languages=${enable_languages-all} \ | ||
12 | --target=$target_alias --host=$build_alias --build=$build_alias | ||
13 | CFLAGS="${saved_CFLAGS}" | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/fix-ICE-in-arm_unwind_emit_set.diff b/meta/packages/gcc/gcc-4.1.2/fix-ICE-in-arm_unwind_emit_set.diff deleted file mode 100644 index 568e15abff..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/fix-ICE-in-arm_unwind_emit_set.diff +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | --- trunk/gcc/config/arm/arm.c 2006/09/19 13:18:27 117055 | ||
2 | +++ trunk/gcc/config/arm/arm.c 2006/09/19 13:19:24 117056 | ||
3 | @@ -15415,6 +15415,15 @@ | ||
4 | /* Move from sp to reg. */ | ||
5 | asm_fprintf (asm_out_file, "\t.movsp %r\n", REGNO (e0)); | ||
6 | } | ||
7 | + else if (GET_CODE (e1) == PLUS | ||
8 | + && GET_CODE (XEXP (e1, 0)) == REG | ||
9 | + && REGNO (XEXP (e1, 0)) == SP_REGNUM | ||
10 | + && GET_CODE (XEXP (e1, 1)) == CONST_INT) | ||
11 | + { | ||
12 | + /* Set reg to offset from sp. */ | ||
13 | + asm_fprintf (asm_out_file, "\t.movsp %r, #%d\n", | ||
14 | + REGNO (e0), (int)INTVAL(XEXP (e1, 1))); | ||
15 | + } | ||
16 | else | ||
17 | abort (); | ||
18 | break; | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/gcc41-configure.in.patch b/meta/packages/gcc/gcc-4.1.2/gcc41-configure.in.patch deleted file mode 100644 index 3d33bcb978..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/gcc41-configure.in.patch +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | --- gcc-3.4.4/configure.in.orig 2005-08-09 19:57:51.504323183 -0700 | ||
2 | +++ gcc-3.4.4/configure.in 2005-08-09 20:00:12.073168623 -0700 | ||
3 | @@ -1907,7 +1907,7 @@ | ||
4 | *) gxx_include_dir=${with_gxx_include_dir} ;; | ||
5 | esac | ||
6 | |||
7 | -FLAGS_FOR_TARGET= | ||
8 | +FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" | ||
9 | case " $target_configdirs " in | ||
10 | *" newlib "*) | ||
11 | case " $target_configargs " in | ||
12 | --- gcc-3.4.4/configure.orig 2005-08-09 21:02:29.668360660 -0700 | ||
13 | +++ gcc-3.4.4/configure 2005-08-09 21:02:50.157649970 -0700 | ||
14 | @@ -2669,7 +2669,7 @@ | ||
15 | *) gxx_include_dir=${with_gxx_include_dir} ;; | ||
16 | esac | ||
17 | |||
18 | -FLAGS_FOR_TARGET= | ||
19 | +FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" | ||
20 | case " $target_configdirs " in | ||
21 | *" newlib "*) | ||
22 | case " $target_configargs " in | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/gfortran.patch b/meta/packages/gcc/gcc-4.1.2/gfortran.patch deleted file mode 100644 index 96905e5d7d..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/gfortran.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | The patch below fixes a crash building libgfortran on arm-linux-gnueabi. | ||
2 | |||
3 | This target doesn't really have a 128-bit integer type, however it does use | ||
4 | TImode to represent the return value of certain special ABI defined library | ||
5 | functions. This results in type_for_size(TImode) being called. | ||
6 | |||
7 | Because TImode deosn't correspond to any gfortran integer kind | ||
8 | gfc_type_for_size returns NULL and we segfault shortly after. | ||
9 | |||
10 | The patch below fixes this by making gfc_type_for_size handle TImode in the | ||
11 | same way as the C frontend. | ||
12 | |||
13 | Tested on x86_64-linux and arm-linux-gnueabi. | ||
14 | Applied to trunk. | ||
15 | |||
16 | Paul | ||
17 | |||
18 | 2007-05-15 Paul Brook <paul@codesourcery.com> | ||
19 | |||
20 | gcc/fortran/ | ||
21 | * trans-types.c (gfc_type_for_size): Handle signed TImode. | ||
22 | |||
23 | Index: gcc-4.2.1/gcc/fortran/trans-types.c | ||
24 | =================================================================== | ||
25 | --- gcc-4.2.1/gcc/fortran/trans-types.c (revision 170435) | ||
26 | +++ gcc-4.2.1/gcc/fortran/trans-types.c (working copy) | ||
27 | @@ -1800,6 +1800,13 @@ gfc_type_for_size (unsigned bits, int un | ||
28 | if (type && bits == TYPE_PRECISION (type)) | ||
29 | return type; | ||
30 | } | ||
31 | + | ||
32 | + /* Handle TImode as a special case because it is used by some backends | ||
33 | + (eg. ARM) even though it is not available for normal use. */ | ||
34 | +#if HOST_BITS_PER_WIDE_INT >= 64 | ||
35 | + if (bits == TYPE_PRECISION (intTI_type_node)) | ||
36 | + return intTI_type_node; | ||
37 | +#endif | ||
38 | } | ||
39 | else | ||
40 | { | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/ldflags.patch b/meta/packages/gcc/gcc-4.1.2/ldflags.patch deleted file mode 100644 index 9576f60778..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/ldflags.patch +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | --- /tmp/Makefile.in 2006-02-23 20:56:01.399758728 +0100 | ||
2 | +++ gcc-4.1-20060217/Makefile.in 2006-02-23 20:56:16.874406224 +0100 | ||
3 | @@ -334,7 +334,7 @@ | ||
4 | CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) | ||
5 | LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) | ||
6 | LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates | ||
7 | -LDFLAGS_FOR_TARGET = | ||
8 | +LDFLAGS_FOR_TARGET = @LDFLAGS@ | ||
9 | PICFLAG_FOR_TARGET = | ||
10 | |||
11 | # ------------------------------------ | ||
12 | --- /tmp/Makefile.tpl 2006-02-23 20:50:34.077519272 +0100 | ||
13 | +++ gcc-4.1-20060217/Makefile.tpl 2006-02-23 21:04:31.092273688 +0100 | ||
14 | @@ -337,7 +337,7 @@ | ||
15 | CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) | ||
16 | LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) | ||
17 | LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates | ||
18 | -LDFLAGS_FOR_TARGET = | ||
19 | +LDFLAGS_FOR_TARGET = @LDFLAGS@ | ||
20 | PICFLAG_FOR_TARGET = | ||
21 | |||
22 | # ------------------------------------ | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/sdk-libstdc++-includes.patch b/meta/packages/gcc/gcc-4.1.2/sdk-libstdc++-includes.patch deleted file mode 100644 index 4377c2143b..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/sdk-libstdc++-includes.patch +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | --- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100 | ||
2 | +++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100 | ||
3 | @@ -32,7 +32,7 @@ | ||
4 | |||
5 | libmath_la_SOURCES = stubs.c | ||
6 | |||
7 | -AM_CPPFLAGS = $(CANADIAN_INCLUDES) | ||
8 | +AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include | ||
9 | |||
10 | # Only compiling "C" sources in this directory. | ||
11 | LIBTOOL = @LIBTOOL@ --tag CC | ||
12 | --- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100 | ||
13 | +++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100 | ||
14 | @@ -18,7 +18,7 @@ | ||
15 | $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once | ||
16 | |||
17 | # -I/-D flags to pass when compiling. | ||
18 | -AM_CPPFLAGS = $(GLIBCXX_INCLUDES) | ||
19 | +AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include | ||
20 | |||
21 | |||
22 | |||
diff --git a/meta/packages/gcc/gcc-4.1.2/sh3-installfix-fixheaders.patch b/meta/packages/gcc/gcc-4.1.2/sh3-installfix-fixheaders.patch deleted file mode 100644 index a06cd2e075..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/sh3-installfix-fixheaders.patch +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | --- gcc-4.1.1/gcc/Makefile.in_orig 2007-01-31 21:24:23.000000000 +0000 | ||
2 | +++ gcc-4.1.1/gcc/Makefile.in 2007-01-31 21:24:43.000000000 +0000 | ||
3 | @@ -3772,8 +3772,6 @@ | ||
4 | $(INSTALL_SCRIPT) $(mkinstalldirs) \ | ||
5 | $(DESTDIR)$(itoolsdir)/mkinstalldirs ; \ | ||
6 | $(INSTALL_SCRIPT) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \ | ||
7 | - $(INSTALL_PROGRAM) build/fix-header$(build_exeext) \ | ||
8 | - $(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \ | ||
9 | else :; fi | ||
10 | echo 'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \ | ||
11 | > $(DESTDIR)$(itoolsdatadir)/mkheaders.conf | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/unbreak-armv4t.patch b/meta/packages/gcc/gcc-4.1.2/unbreak-armv4t.patch deleted file mode 100644 index b3399abfdb..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/unbreak-armv4t.patch +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | diff -urN gcc-4.1.1/gcc/config/arm/linux-eabi.h gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h | ||
2 | --- gcc-4.1.1/gcc/config/arm/linux-eabi.h 2006-10-22 11:11:49.000000000 -0700 | ||
3 | +++ gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h 2006-10-24 21:34:01.000000000 -0700 | ||
4 | @@ -45,7 +45,7 @@ | ||
5 | The ARM10TDMI core is the default for armv5t, so set | ||
6 | SUBTARGET_CPU_DEFAULT to achieve this. */ | ||
7 | #undef SUBTARGET_CPU_DEFAULT | ||
8 | -#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi | ||
9 | +#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi | ||
10 | |||
11 | #undef SUBTARGET_EXTRA_LINK_SPEC | ||
12 | #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi" | ||
diff --git a/meta/packages/gcc/gcc-4.1.2/zecke-no-host-includes.patch b/meta/packages/gcc/gcc-4.1.2/zecke-no-host-includes.patch deleted file mode 100644 index 8b05cb73a9..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/zecke-no-host-includes.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | Index: gcc-4.0.2/gcc/c-incpath.c | ||
2 | =================================================================== | ||
3 | --- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100 | ||
4 | +++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200 | ||
5 | @@ -350,6 +350,26 @@ | ||
6 | p->construct = 0; | ||
7 | p->user_supplied_p = user_supplied_p; | ||
8 | |||
9 | +#ifdef CROSS_COMPILE | ||
10 | + /* A common error when cross compiling is including | ||
11 | + host headers. This code below will try to fail fast | ||
12 | + for cross compiling. Currently we consider /usr/include, | ||
13 | + /opt/include and /sw/include as harmful. */ | ||
14 | + { | ||
15 | + /* printf("Adding Path: %s\n", p->name ); */ | ||
16 | + if( strstr(p->name, "/usr/include" ) == p->name ) { | ||
17 | + fprintf(stderr, _("BUILD ISOLATION FAILURE: /usr/include in INCLUDEPATH: %s\n Please fix the flags passed to the compiler to use the correct prefix.\n"), p->name); | ||
18 | + abort(); | ||
19 | + } else if( strstr(p->name, "/sw/include") == p->name ) { | ||
20 | + fprintf(stderr, _("BUILD ISOLATION FAILURE: /sw/include in INCLUDEPATH: %s\n Please fix the flags passed to the compiler to use the correct prefix.\n"), p->name); | ||
21 | + abort(); | ||
22 | + } else if( strstr(p->name, "/opt/include") == p->name ) { | ||
23 | + fprintf(stderr, _("BUILD ISOLATION FAILURE: /opt/include in INCLUDEPATH: %s\n Please fix the flags passed to the compiler to use the correct prefix.\n"), p->name); | ||
24 | + abort(); | ||
25 | + } | ||
26 | + } | ||
27 | +#endif | ||
28 | + | ||
29 | add_cpp_dir_path (p, chain); | ||
30 | } | ||
31 | |||
diff --git a/meta/packages/gcc/gcc-4.1.2/zecke-xgcc-cpp.patch b/meta/packages/gcc/gcc-4.1.2/zecke-xgcc-cpp.patch deleted file mode 100644 index 921cab6e18..0000000000 --- a/meta/packages/gcc/gcc-4.1.2/zecke-xgcc-cpp.patch +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | upstream: n/a | ||
2 | comment: Use the preprocessor we have just compiled instead the one of | ||
3 | the system. There might be incompabilities between us and them. | ||
4 | |||
5 | Index: gcc-4.1.1/Makefile.in | ||
6 | =================================================================== | ||
7 | --- gcc-4.1.1.orig/Makefile.in 2006-08-06 13:32:44.000000000 +0200 | ||
8 | +++ gcc-4.1.1/Makefile.in 2006-08-06 13:32:46.000000000 +0200 | ||
9 | @@ -194,6 +194,7 @@ | ||
10 | AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \ | ||
11 | CC="$(CC_FOR_TARGET)"; export CC; \ | ||
12 | CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ | ||
13 | + CPP="$(CC_FOR_TARGET) -E"; export CCP; \ | ||
14 | CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ | ||
15 | CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \ | ||
16 | CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ | ||
diff --git a/meta/packages/gcc/gcc-cross-initial_4.1.2.bb b/meta/packages/gcc/gcc-cross-initial_4.1.2.bb deleted file mode 100644 index 1c1d094382..0000000000 --- a/meta/packages/gcc/gcc-cross-initial_4.1.2.bb +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | require gcc-cross_${PV}.bb | ||
2 | require gcc-cross-initial.inc | ||
3 | |||
4 | EXTRA_OECONF += "--disable-libmudflap \ | ||
5 | --disable-libssp" | ||
diff --git a/meta/packages/gcc/gcc-cross-intermediate_4.1.2.bb b/meta/packages/gcc/gcc-cross-intermediate_4.1.2.bb deleted file mode 100644 index 3e103aa24e..0000000000 --- a/meta/packages/gcc/gcc-cross-intermediate_4.1.2.bb +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | require gcc-cross_${PV}.bb | ||
2 | require gcc-cross-intermediate.inc | ||
3 | |||
4 | EXTRA_OECONF += "--disable-libmudflap \ | ||
5 | --disable-libssp" | ||
diff --git a/meta/packages/gcc/gcc-cross_4.1.2.bb b/meta/packages/gcc/gcc-cross_4.1.2.bb deleted file mode 100644 index d37ca6653c..0000000000 --- a/meta/packages/gcc/gcc-cross_4.1.2.bb +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | PR = "r17" | ||
2 | |||
3 | require gcc-${PV}.inc | ||
4 | require gcc-cross4.inc | ||
5 | require gcc-configure-cross.inc | ||
6 | require gcc-package-cross.inc | ||
7 | |||
8 | SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " | ||
9 | |||
10 | EXTRA_OECONF_append_avr32= " --disable-libmudflap " | ||
11 | |||
12 | EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" | ||
13 | |||
14 | ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}" | ||
diff --git a/meta/packages/gcc/gcc_4.1.2.bb b/meta/packages/gcc/gcc_4.1.2.bb deleted file mode 100644 index dd88ccdc27..0000000000 --- a/meta/packages/gcc/gcc_4.1.2.bb +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | PR = "r14" | ||
2 | |||
3 | require gcc-${PV}.inc | ||
4 | require gcc-configure-target.inc | ||
5 | require gcc-package-target.inc | ||
6 | |||
7 | ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}" | ||