summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-03-17 11:53:45 +0000
committerRichard Purdie <richard@openedhand.com>2008-03-17 11:53:45 +0000
commita619546dc4c209b75e15f4384a974a3f397c1327 (patch)
tree263f104aee409f6050adbee39ff5e65ccd6864ce /meta
parentf2888e8164ff305ffdca06c057e764499e445128 (diff)
downloadpoky-a619546dc4c209b75e15f4384a974a3f397c1327.tar.gz
gcc: Drop 3.3.4
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4018 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta')
-rw-r--r--meta/packages/gcc/gcc-3.3.4/arm-gotoff.dpatch135
-rw-r--r--meta/packages/gcc/gcc-3.3.4/arm-ldm-peephole.patch91
-rw-r--r--meta/packages/gcc/gcc-3.3.4/arm-ldm.dpatch148
-rw-r--r--meta/packages/gcc/gcc-3.3.4/arm-tune.patch9
-rw-r--r--meta/packages/gcc/gcc-3.3.4/bash3.patch20
-rw-r--r--meta/packages/gcc/gcc-3.3.4/gcc-uclibc-3.3-100-conf.patch1593
-rw-r--r--meta/packages/gcc/gcc-3.3.4/gcc-uclibc-3.3-110-conf.patch55
-rw-r--r--meta/packages/gcc/gcc-3.3.4/gcc-uclibc-3.3-120-softfloat.patch14
-rw-r--r--meta/packages/gcc/gcc-3.3.4/gcc-uclibc-3.3-200-code.patch3021
-rw-r--r--meta/packages/gcc/gcc-3.3.4/gcc34-15089.patch19
-rw-r--r--meta/packages/gcc/gcc-3.3.4/libibery-crosstool.patch683
-rw-r--r--meta/packages/gcc/gcc-3.3.4/reverse-compare.patch31
-rw-r--r--meta/packages/gcc/gcc-3.3.4/sdk-libstdc++-includes.patch48
-rw-r--r--meta/packages/gcc/gcc-cross-initial_3.3.4.bb2
-rw-r--r--meta/packages/gcc/gcc-cross_3.3.4.bb13
-rw-r--r--meta/packages/gcc/gcc_3.3.4.bb169
16 files changed, 0 insertions, 6051 deletions
diff --git a/meta/packages/gcc/gcc-3.3.4/arm-gotoff.dpatch b/meta/packages/gcc/gcc-3.3.4/arm-gotoff.dpatch
deleted file mode 100644
index 610f9430e0..0000000000
--- a/meta/packages/gcc/gcc-3.3.4/arm-gotoff.dpatch
+++ /dev/null
@@ -1,135 +0,0 @@
1#! /bin/sh -e
2
3src=gcc
4if [ $# -eq 3 -a "$2" = '-d' ]; then
5 pdir="-d $3"
6 src=$3/gcc
7elif [ $# -ne 1 ]; then
8 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
9 exit 1
10fi
11case "$1" in
12 -patch)
13 patch $pdir -f --no-backup-if-mismatch -p0 --fuzz 10 < $0
14 ;;
15 -unpatch)
16 patch $pdir -f --no-backup-if-mismatch -R -p0 --fuzz 10 < $0
17 ;;
18 *)
19 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
20 exit 1
21esac
22exit 0
23
24# DP: use GOTOFF not GOT relocs for .LCn and other local symbols;
25# DP: don't use gotoff for non-static functions, even if defined locally
26
27--- gcc/config/arm/arm.c 2003-06-14 15:20:53.000000000 +0100
28+++ gcc/config/arm/arm.c 2004-03-06 15:15:32.000000000 +0000
29@@ -2364,6 +2394,40 @@
30 return 1;
31 }
32
33+/* Return true if OP is a symbolic operand that resolves locally. */
34+
35+static int
36+local_symbolic_operand (op, mode)
37+ rtx op;
38+ enum machine_mode mode ATTRIBUTE_UNUSED;
39+{
40+ if (GET_CODE (op) == CONST
41+ && GET_CODE (XEXP (op, 0)) == PLUS
42+ && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT)
43+ op = XEXP (XEXP (op, 0), 0);
44+
45+ if (GET_CODE (op) == LABEL_REF)
46+ return 1;
47+
48+ if (GET_CODE (op) != SYMBOL_REF)
49+ return 0;
50+
51+ /* These we've been told are local by varasm and encode_section_info
52+ respectively. */
53+ if (CONSTANT_POOL_ADDRESS_P (op) || ENCODED_LOCAL_BINDING_ATTR_P (XSTR (op, 0)))
54+ return 1;
55+
56+ /* There is, however, a not insubstantial body of code in the rest of
57+ the compiler that assumes it can just stick the results of
58+ ASM_GENERATE_INTERNAL_LABEL in a symbol_ref and have done. */
59+ /* ??? This is a hack. Should update the body of the compiler to
60+ always create a DECL an invoke targetm.encode_section_info. */
61+ if (strncmp (arm_strip_name_encoding (XSTR (op, 0)), ".L", 2) == 0)
62+ return 1;
63+
64+ return 0;
65+}
66+
67 rtx
68 legitimize_pic_address (orig, mode, reg)
69 rtx orig;
70@@ -2404,10 +2468,7 @@
71 else
72 emit_insn (gen_pic_load_addr_thumb (address, orig));
73
74- if ((GET_CODE (orig) == LABEL_REF
75- || (GET_CODE (orig) == SYMBOL_REF &&
76- ENCODED_SHORT_CALL_ATTR_P (XSTR (orig, 0))))
77- && NEED_GOT_RELOC)
78+ if (local_symbolic_operand (orig, Pmode) && NEED_GOT_RELOC)
79 pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, address);
80 else
81 {
82@@ -8804,11 +8911,7 @@
83 if (NEED_GOT_RELOC && flag_pic && making_const_table &&
84 (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF))
85 {
86- if (GET_CODE (x) == SYMBOL_REF
87- && (CONSTANT_POOL_ADDRESS_P (x)
88- || ENCODED_SHORT_CALL_ATTR_P (XSTR (x, 0))))
89- fputs ("(GOTOFF)", asm_out_file);
90- else if (GET_CODE (x) == LABEL_REF)
91+ if (local_symbolic_operand (x, Pmode))
92 fputs ("(GOTOFF)", asm_out_file);
93 else
94 fputs ("(GOT)", asm_out_file);
95@@ -11335,6 +11418,11 @@
96 else if (! TREE_PUBLIC (decl))
97 arm_encode_call_attribute (decl, SHORT_CALL_FLAG_CHAR);
98 }
99+
100+ if (TREE_CODE_CLASS (TREE_CODE (decl)) == 'd'
101+ && flag_pic
102+ && (*targetm.binds_local_p) (decl))
103+ arm_encode_call_attribute (decl, LOCAL_BINDING_FLAG_CHAR);
104 }
105 #endif /* !ARM_PE */
106
107
108--- gcc/config/arm/arm.h Fri Mar 5 18:49:44 2004
109+++ gcc/config/arm/arm.h Fri Mar 5 15:04:31 2004
110@@ -1870,6 +1870,7 @@
111 Note, '@' and '*' have already been taken. */
112 #define SHORT_CALL_FLAG_CHAR '^'
113 #define LONG_CALL_FLAG_CHAR '#'
114+#define LOCAL_BINDING_FLAG_CHAR '%'
115
116 #define ENCODED_SHORT_CALL_ATTR_P(SYMBOL_NAME) \
117 (*(SYMBOL_NAME) == SHORT_CALL_FLAG_CHAR)
118@@ -1877,6 +1878,9 @@
119 #define ENCODED_LONG_CALL_ATTR_P(SYMBOL_NAME) \
120 (*(SYMBOL_NAME) == LONG_CALL_FLAG_CHAR)
121
122+#define ENCODED_LOCAL_BINDING_ATTR_P(SYMBOL_NAME) \
123+ (*(SYMBOL_NAME) == LOCAL_BINDING_FLAG_CHAR)
124+
125 #ifndef SUBTARGET_NAME_ENCODING_LENGTHS
126 #define SUBTARGET_NAME_ENCODING_LENGTHS
127 #endif
128@@ -1888,6 +1892,7 @@
129 #define ARM_NAME_ENCODING_LENGTHS \
130 case SHORT_CALL_FLAG_CHAR: return 1; \
131 case LONG_CALL_FLAG_CHAR: return 1; \
132+ case LOCAL_BINDING_FLAG_CHAR: return 1; \
133 case '*': return 1; \
134 SUBTARGET_NAME_ENCODING_LENGTHS
135
diff --git a/meta/packages/gcc/gcc-3.3.4/arm-ldm-peephole.patch b/meta/packages/gcc/gcc-3.3.4/arm-ldm-peephole.patch
deleted file mode 100644
index 83b07e0343..0000000000
--- a/meta/packages/gcc/gcc-3.3.4/arm-ldm-peephole.patch
+++ /dev/null
@@ -1,91 +0,0 @@
12004-03-19 Philip Blundell <philb@gnu.org>
2
3 * config/arm/arm.c (adjacent_mem_locations): Reject location pairs
4 where both offsets are nonzero if target is Harvard architecture.
5 (load_multiple_sequence, store_multiple_sequence): Avoid two-word
6 LDM/STM on XScale unless -Os.
7 * config/arm/arm.md (arith_adjacentmem): Inhibit if tuning for
8 XScale and not -Os.
9 * genpeep.c: Have generated code include flags.h.
10
11--- gcc/genpeep.c~ 2001-12-02 00:04:19.000000000 +0000
12+++ gcc/genpeep.c 2004-03-19 11:17:18.000000000 +0000
13@@ -402,6 +402,7 @@
14 printf ("#include \"recog.h\"\n");
15 printf ("#include \"except.h\"\n\n");
16 printf ("#include \"function.h\"\n\n");
17+ printf ("#include \"flags.h\"\n\n");
18
19 printf ("#ifdef HAVE_peephole\n");
20 printf ("extern rtx peep_operand[];\n\n");
21
22--- gcc/config/arm/arm.md~ 2004-03-11 15:28:01.000000000 +0000
23+++ gcc/config/arm/arm.md 2004-03-19 13:00:03.000000000 +0000
24@@ -7958,13 +7958,16 @@
25 (set_attr "length" "4,8,8")]
26 )
27
28+; Try to convert LDR+LDR+arith into [add+]LDM+arith
29+; On XScale, LDM is always slower than two LDRs, so only do this if
30+; optimising for size.
31 (define_insn "*arith_adjacentmem"
32 [(set (match_operand:SI 0 "s_register_operand" "=r")
33 (match_operator:SI 1 "shiftable_operator"
34 [(match_operand:SI 2 "memory_operand" "m")
35 (match_operand:SI 3 "memory_operand" "m")]))
36 (clobber (match_scratch:SI 4 "=r"))]
37- "TARGET_ARM && adjacent_mem_locations (operands[2], operands[3])"
38+ "TARGET_ARM && (!arm_tune_xscale || optimize_size) && adjacent_mem_locations (operands[2], operands[3])"
39 "*
40 {
41 rtx ldm[3];
42@@ -7999,7 +8002,9 @@
43 }
44 if (val1 && val2)
45 {
46+ /* This would be a loss on a Harvard core, but adjacent_mem_locations()
47+ will prevent it from happening. */
48 rtx ops[3];
49 ldm[0] = ops[0] = operands[4];
50 ops[1] = XEXP (XEXP (operands[2], 0), 0);
51
52--- gcc/config/arm/arm.c~ 2004-03-11 15:28:01.000000000 +0000
53+++ gcc/config/arm/arm.c 2004-03-19 15:36:03.000000000 +0000
54@@ -3818,8 +3818,11 @@
55 sequence. */
56 if (!const_ok_for_op (PLUS, val0) || !const_ok_for_op (PLUS, val1))
57 return 0;
58-
59- return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4);
60+
61+ /* For Harvard cores, only accept pairs where one offset is zero.
62+ See comment in load_multiple_sequence. */
63+ return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4)
64+ && (!arm_ld_sched || val0 == 0 || val1 == 0);
65 }
66 return 0;
67 }
68@@ -4075,6 +4078,11 @@
69 *load_offset = unsorted_offsets[order[0]];
70 }
71
72+ /* For XScale a two-word LDM is a performance loss, so only do this if
73+ size is more important. See comments in arm_gen_load_multiple. */
74+ if (nops == 2 && arm_tune_xscale && !optimize_size)
75+ return 0;
76+
77 if (unsorted_offsets[order[0]] == 0)
78 return 1; /* ldmia */
79
80@@ -4307,6 +4315,11 @@
81 *load_offset = unsorted_offsets[order[0]];
82 }
83
84+ /* For XScale a two-word LDM is a performance loss, so only do this if
85+ size is more important. See comments in arm_gen_load_multiple. */
86+ if (nops == 2 && arm_tune_xscale && !optimize_size)
87+ return 0;
88+
89 if (unsorted_offsets[order[0]] == 0)
90 return 1; /* stmia */
91
diff --git a/meta/packages/gcc/gcc-3.3.4/arm-ldm.dpatch b/meta/packages/gcc/gcc-3.3.4/arm-ldm.dpatch
deleted file mode 100644
index 561624f39c..0000000000
--- a/meta/packages/gcc/gcc-3.3.4/arm-ldm.dpatch
+++ /dev/null
@@ -1,148 +0,0 @@
1#! /bin/sh -e
2
3src=gcc
4if [ $# -eq 3 -a "$2" = '-d' ]; then
5 pdir="-d $3"
6 src=$3/gcc
7elif [ $# -ne 1 ]; then
8 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
9 exit 1
10fi
11case "$1" in
12 -patch)
13 patch $pdir -f --no-backup-if-mismatch -p0 --fuzz 10 < $0
14 ;;
15 -unpatch)
16 patch $pdir -f --no-backup-if-mismatch -R -p0 --fuzz 10 < $0
17 ;;
18 *)
19 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
20 exit 1
21esac
22exit 0
23
24# DP: try harder to avoid ldm in function epilogues
25
26--- gcc/config/arm/arm.c Fri Mar 5 18:49:42 2004
27+++ gcc/config/arm/arm.c Fri Mar 5 16:00:21 2004
28@@ -7598,6 +7629,26 @@
29 return_used_this_function = 0;
30 }
31
32+/* Return the number (counting from 0) of
33+ the least significant set bit in MASK. */
34+
35+#ifdef __GNUC__
36+inline
37+#endif
38+static int
39+number_of_first_bit_set (mask)
40+ int mask;
41+{
42+ int bit;
43+
44+ for (bit = 0;
45+ (mask & (1 << bit)) == 0;
46+ ++bit)
47+ continue;
48+
49+ return bit;
50+}
51+
52 const char *
53 arm_output_epilogue (really_return)
54 int really_return;
55@@ -7788,27 +7839,47 @@
56 saved_regs_mask |= (1 << PC_REGNUM);
57 }
58
59- /* Load the registers off the stack. If we only have one register
60- to load use the LDR instruction - it is faster. */
61- if (saved_regs_mask == (1 << LR_REGNUM))
62- {
63- /* The exception handler ignores the LR, so we do
64- not really need to load it off the stack. */
65- if (eh_ofs)
66- asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
67- else
68- asm_fprintf (f, "\tldr\t%r, [%r], #4\n", LR_REGNUM, SP_REGNUM);
69- }
70- else if (saved_regs_mask)
71+ if (saved_regs_mask)
72 {
73- if (saved_regs_mask & (1 << SP_REGNUM))
74- /* Note - write back to the stack register is not enabled
75- (ie "ldmfd sp!..."). We know that the stack pointer is
76- in the list of registers and if we add writeback the
77- instruction becomes UNPREDICTABLE. */
78- print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
79+ /* Load the registers off the stack. If we only have one register
80+ to load use the LDR instruction - it is faster. */
81+ if (bit_count (saved_regs_mask) == 1)
82+ {
83+ int reg = number_of_first_bit_set (saved_regs_mask);
84+
85+ switch (reg)
86+ {
87+ case SP_REGNUM:
88+ /* Mustn't use base writeback when loading SP. */
89+ asm_fprintf (f, "\tldr\t%r, [%r]\n", SP_REGNUM, SP_REGNUM);
90+ break;
91+
92+ case LR_REGNUM:
93+ if (eh_ofs)
94+ {
95+ /* The exception handler ignores the LR, so we do
96+ not really need to load it off the stack. */
97+ asm_fprintf (f, "\tadd\t%r, %r, #4\n", SP_REGNUM, SP_REGNUM);
98+ break;
99+ }
100+ /* else fall through */
101+
102+ default:
103+ asm_fprintf (f, "\tldr\t%r, [%r], #4\n", reg, SP_REGNUM);
104+ break;
105+ }
106+ }
107 else
108- print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
109+ {
110+ if (saved_regs_mask & (1 << SP_REGNUM))
111+ /* Note - write back to the stack register is not enabled
112+ (ie "ldmfd sp!..."). We know that the stack pointer is
113+ in the list of registers and if we add writeback the
114+ instruction becomes UNPREDICTABLE. */
115+ print_multi_reg (f, "ldmfd\t%r", SP_REGNUM, saved_regs_mask);
116+ else
117+ print_multi_reg (f, "ldmfd\t%r!", SP_REGNUM, saved_regs_mask);
118+ }
119 }
120
121 if (current_function_pretend_args_size)
122@@ -9610,26 +9677,6 @@
123 }
124 }
125
126-/* Return the number (counting from 0) of
127- the least significant set bit in MASK. */
128-
129-#ifdef __GNUC__
130-inline
131-#endif
132-static int
133-number_of_first_bit_set (mask)
134- int mask;
135-{
136- int bit;
137-
138- for (bit = 0;
139- (mask & (1 << bit)) == 0;
140- ++bit)
141- continue;
142-
143- return bit;
144-}
145-
146 /* Generate code to return from a thumb function.
147 If 'reg_containing_return_addr' is -1, then the return address is
148 actually on the stack, at the stack pointer. */
diff --git a/meta/packages/gcc/gcc-3.3.4/arm-tune.patch b/meta/packages/gcc/gcc-3.3.4/arm-tune.patch
deleted file mode 100644
index 701c99b87c..0000000000
--- a/meta/packages/gcc/gcc-3.3.4/arm-tune.patch
+++ /dev/null
@@ -1,9 +0,0 @@
1--- gcc/config/arm/linux-elf.h.orig 2004-03-11 14:46:33.000000000 +0000
2+++ gcc/config/arm/linux-elf.h 2004-03-11 14:48:23.000000000 +0000
3@@ -128,3 +128,6 @@
4
5 #define LINK_GCC_C_SEQUENCE_SPEC \
6 "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
7+
8+/* Tune for XScale. */
9+#define TARGET_TUNE_DEFAULT TARGET_CPU_xscale
diff --git a/meta/packages/gcc/gcc-3.3.4/bash3.patch b/meta/packages/gcc/gcc-3.3.4/bash3.patch
deleted file mode 100644
index 614ba50eec..0000000000
--- a/meta/packages/gcc/gcc-3.3.4/bash3.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1--- gcc-3.3.4/configure.orig 2002-09-29 18:11:24.000000000 +0200
2+++ gcc-3.3.4/configure 2005-01-28 12:26:40.000000000 +0100
3@@ -697,7 +697,7 @@
4 if test -f skip-this-dir; then
5 # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
6 # and reset the trap handler.
7- trap 0
8+ trap '' 0
9 rm -rf Makefile* ${tmpdir}
10 # Execute the final clean-up actions
11 ${config_shell} skip-this-dir
12@@ -1596,7 +1596,7 @@
13 # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
14 # and reset the trap handler.
15 rm -rf ${tmpdir}
16-trap 0
17+trap '' 0
18
19 exit 0
20
diff --git a/meta/packages/gcc/gcc-3.3.4/gcc-uclibc-3.3-100-conf.patch b/meta/packages/gcc/gcc-3.3.4/gcc-uclibc-3.3-100-conf.patch
deleted file mode 100644
index 213b4fbbd6..0000000000
--- a/meta/packages/gcc/gcc-3.3.4/gcc-uclibc-3.3-100-conf.patch
+++ /dev/null
@@ -1,1593 +0,0 @@
1diff -urN gcc-3.3.3/boehm-gc/config.sub gcc-3.3.3-new/boehm-gc/config.sub
2--- gcc-3.3.3/boehm-gc/config.sub 2002-02-11 22:37:53.000000000 -0600
3+++ gcc-3.3.3-new/boehm-gc/config.sub 2004-02-16 21:12:16.000000000 -0600
4@@ -118,7 +118,7 @@
5 # Here we must recognize all the valid KERNEL-OS combinations.
6 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
7 case $maybe_os in
8- nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
9+ nto-qnx* | linux-gnu* | linux-uclibc* | storm-chaos* | os2-emx* | windows32-*)
10 os=-$maybe_os
11 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
12 ;;
13@@ -1089,7 +1089,8 @@
14 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
15 | -chorusos* | -chorusrdb* \
16 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
17- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
18+ | -mingw32* | -linux-gnu* | -linux-uclibc* \
19+ | -uxpv* | -beos* | -mpeix* | -udk* \
20 | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
21 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
22 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
23diff -urN gcc-3.3.3/config.sub gcc-3.3.3-new/config.sub
24--- gcc-3.3.3/config.sub 2003-01-30 17:25:36.000000000 -0600
25+++ gcc-3.3.3-new/config.sub 2004-02-16 21:12:16.000000000 -0600
26@@ -118,7 +118,7 @@
27 # Here we must recognize all the valid KERNEL-OS combinations.
28 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
29 case $maybe_os in
30- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
31+ nto-qnx* | linux-gnu* | linux-uclibc* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
32 os=-$maybe_os
33 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
34 ;;
35@@ -1112,7 +1112,8 @@
36 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
37 | -chorusos* | -chorusrdb* \
38 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
39- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
40+ | -mingw32* | -linux-gnu* | -linux-uclibc* \
41+ | -uxpv* | -beos* | -mpeix* | -udk* \
42 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
43 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
44 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
45diff -urN gcc-3.3.3/gcc/config/arm/linux-elf.h gcc-3.3.3-new/gcc/config/arm/linux-elf.h
46--- gcc-3.3.3/gcc/config/arm/linux-elf.h 2003-09-16 10:39:23.000000000 -0500
47+++ gcc-3.3.3-new/gcc/config/arm/linux-elf.h 2004-02-16 21:12:16.000000000 -0600
48@@ -78,6 +78,18 @@
49 "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
50
51 #undef LINK_SPEC
52+#ifdef USE_UCLIBC
53+#define LINK_SPEC "%{h*} %{version:-v} \
54+ %{b} %{Wl,*:%*} \
55+ %{static:-Bstatic} \
56+ %{shared:-shared} \
57+ %{symbolic:-Bsymbolic} \
58+ %{rdynamic:-export-dynamic} \
59+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0} \
60+ -X \
61+ %{mbig-endian:-EB}" \
62+ SUBTARGET_EXTRA_LINK_SPEC
63+#else
64 #define LINK_SPEC "%{h*} %{version:-v} \
65 %{b} %{Wl,*:%*} \
66 %{static:-Bstatic} \
67@@ -88,6 +100,7 @@
68 -X \
69 %{mbig-endian:-EB}" \
70 SUBTARGET_EXTRA_LINK_SPEC
71+#endif
72
73 #define TARGET_OS_CPP_BUILTINS() \
74 do { \
75diff -urN gcc-3.3.3/gcc/config/cris/linux.h gcc-3.3.3-new/gcc/config/cris/linux.h
76--- gcc-3.3.3/gcc/config/cris/linux.h 2003-03-10 21:01:35.000000000 -0600
77+++ gcc-3.3.3-new/gcc/config/cris/linux.h 2004-02-16 21:12:16.000000000 -0600
78@@ -81,6 +81,25 @@
79 #undef CRIS_DEFAULT_CPU_VERSION
80 #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
81
82+#ifdef USE_UCLIBC
83+
84+#undef CRIS_SUBTARGET_VERSION
85+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
86+
87+#undef CRIS_LINK_SUBTARGET_SPEC
88+#define CRIS_LINK_SUBTARGET_SPEC \
89+ "-mcrislinux\
90+ -rpath-link include/asm/../..%s\
91+ %{shared} %{static}\
92+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
93+ %{!shared: \
94+ %{!static: \
95+ %{rdynamic:-export-dynamic} \
96+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
97+ %{!r:%{O2|O3: --gc-sections}}"
98+
99+#else /* USE_UCLIBC */
100+
101 #undef CRIS_SUBTARGET_VERSION
102 #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
103
104@@ -95,6 +114,8 @@
105 %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
106 %{!r:%{O2|O3: --gc-sections}}"
107
108+#endif /* USE_UCLIBC */
109+
110
111 /* Node: Run-time Target */
112
113diff -urN gcc-3.3.3/gcc/config/cris/t-linux-uclibc gcc-3.3.3-new/gcc/config/cris/t-linux-uclibc
114--- gcc-3.3.3/gcc/config/cris/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
115+++ gcc-3.3.3-new/gcc/config/cris/t-linux-uclibc 2004-02-16 21:12:16.000000000 -0600
116@@ -0,0 +1,3 @@
117+T_CFLAGS = -DUSE_UCLIBC
118+TARGET_LIBGCC2_CFLAGS += -fPIC
119+CRTSTUFF_T_CFLAGS_S = $(TARGET_LIBGCC2_CFLAGS)
120diff -urN gcc-3.3.3/gcc/config/i386/linux.h gcc-3.3.3-new/gcc/config/i386/linux.h
121--- gcc-3.3.3/gcc/config/i386/linux.h 2003-11-14 00:46:12.000000000 -0600
122+++ gcc-3.3.3-new/gcc/config/i386/linux.h 2004-02-16 21:12:16.000000000 -0600
123@@ -136,6 +136,15 @@
124 %{static:-static}}}"
125 #endif
126 #else
127+#if defined USE_UCLIBC
128+#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
129+ %{!shared: \
130+ %{!ibcs: \
131+ %{!static: \
132+ %{rdynamic:-export-dynamic} \
133+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
134+ %{static:-static}}}"
135+#else
136 #define LINK_SPEC "-m elf_i386 %{shared:-shared} \
137 %{!shared: \
138 %{!ibcs: \
139@@ -144,6 +153,7 @@
140 %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
141 %{static:-static}}}"
142 #endif
143+#endif
144
145 /* A C statement (sans semicolon) to output to the stdio stream
146 FILE the assembler definition of uninitialized global DECL named
147diff -urN gcc-3.3.3/gcc/config/mips/linux.h gcc-3.3.3-new/gcc/config/mips/linux.h
148--- gcc-3.3.3/gcc/config/mips/linux.h 2003-12-23 02:58:00.000000000 -0600
149+++ gcc-3.3.3-new/gcc/config/mips/linux.h 2004-02-16 21:12:16.000000000 -0600
150@@ -175,6 +175,17 @@
151
152 /* Borrowed from sparc/linux.h */
153 #undef LINK_SPEC
154+#ifdef USE_UCLIBC
155+#define LINK_SPEC \
156+ "%(endian_spec) \
157+ %{shared:-shared} \
158+ %{!shared: \
159+ %{!ibcs: \
160+ %{!static: \
161+ %{rdynamic:-export-dynamic} \
162+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
163+ %{static:-static}}}"
164+#else
165 #define LINK_SPEC \
166 "%(endian_spec) \
167 %{shared:-shared} \
168@@ -184,6 +195,7 @@
169 %{rdynamic:-export-dynamic} \
170 %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
171 %{static:-static}}}"
172+#endif
173
174 #undef SUBTARGET_ASM_SPEC
175 #define SUBTARGET_ASM_SPEC "\
176diff -urN gcc-3.3.3/gcc/config/sh/linux.h gcc-3.3.3-new/gcc/config/sh/linux.h
177--- gcc-3.3.3/gcc/config/sh/linux.h 2003-11-06 17:13:33.000000000 -0600
178+++ gcc-3.3.3-new/gcc/config/sh/linux.h 2004-02-16 21:12:16.000000000 -0600
179@@ -44,12 +44,21 @@
180 #undef SUBTARGET_LINK_EMUL_SUFFIX
181 #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
182 #undef SUBTARGET_LINK_SPEC
183+#ifdef USE_UCLIBC
184+#define SUBTARGET_LINK_SPEC \
185+ "%{shared:-shared} \
186+ %{!static: \
187+ %{rdynamic:-export-dynamic} \
188+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
189+ %{static:-static}"
190+#else
191 #define SUBTARGET_LINK_SPEC \
192 "%{shared:-shared} \
193 %{!static: \
194 %{rdynamic:-export-dynamic} \
195 %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
196 %{static:-static}"
197+#endif
198
199 /* The GNU C++ standard library requires that these macros be defined. */
200 #undef CPLUSPLUS_CPP_SPEC
201diff -urN gcc-3.3.3/gcc/config/sh/t-linux-uclibc gcc-3.3.3-new/gcc/config/sh/t-linux-uclibc
202--- gcc-3.3.3/gcc/config/sh/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
203+++ gcc-3.3.3-new/gcc/config/sh/t-linux-uclibc 2004-02-16 21:12:16.000000000 -0600
204@@ -0,0 +1,16 @@
205+T_CFLAGS = -DUSE_UCLIBC
206+
207+# Don't run fixproto
208+STMP_FIXPROTO =
209+
210+TARGET_LIBGCC2_CFLAGS = -fpic
211+LIB1ASMFUNCS_CACHE = _ic_invalidate
212+
213+LIB2FUNCS_EXTRA=
214+
215+MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4
216+MULTILIB_DIRNAMES=
217+MULTILIB_MATCHES =
218+MULTILIB_EXCEPTIONS=
219+
220+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o
221diff -urN gcc-3.3.3/gcc/config/sh/t-sh64-uclibc gcc-3.3.3-new/gcc/config/sh/t-sh64-uclibc
222--- gcc-3.3.3/gcc/config/sh/t-sh64-uclibc 1969-12-31 18:00:00.000000000 -0600
223+++ gcc-3.3.3-new/gcc/config/sh/t-sh64-uclibc 2004-02-16 21:12:16.000000000 -0600
224@@ -0,0 +1,13 @@
225+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o
226+
227+LIB1ASMFUNCS = \
228+ _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
229+ _shcompact_call_trampoline _shcompact_return_trampoline \
230+ _shcompact_incoming_args _ic_invalidate _nested_trampoline \
231+ _push_pop_shmedia_regs \
232+ _udivdi3 _divdi3 _umoddi3 _moddi3
233+
234+MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
235+MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64
236+MULTILIB_MATCHES=
237+MULTILIB_EXCEPTIONS=
238diff -urN gcc-3.3.3/gcc/config/t-linux-uclibc gcc-3.3.3-new/gcc/config/t-linux-uclibc
239--- gcc-3.3.3/gcc/config/t-linux-uclibc 1969-12-31 18:00:00.000000000 -0600
240+++ gcc-3.3.3-new/gcc/config/t-linux-uclibc 2004-02-16 21:12:16.000000000 -0600
241@@ -0,0 +1,23 @@
242+T_CFLAGS = -DUSE_UCLIBC
243+
244+# Don't run fixproto
245+STMP_FIXPROTO =
246+
247+# Compile crtbeginS.o and crtendS.o with pic.
248+CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
249+# Compile libgcc2.a with pic.
250+TARGET_LIBGCC2_CFLAGS = -fPIC
251+
252+# Override t-slibgcc-elf-ver to export some libgcc symbols with
253+# the symbol versions that glibc used.
254+SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
255+
256+# Use unwind-dw2-fde-glibc
257+#LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
258+# $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
259+#LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
260+
261+# Use unwind-dw2-fde
262+LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
263+ $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
264+LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h
265diff -urN gcc-3.3.3/gcc/config.gcc gcc-3.3.3-new/gcc/config.gcc
266--- gcc-3.3.3/gcc/config.gcc 2004-01-21 00:06:00.000000000 -0600
267+++ gcc-3.3.3-new/gcc/config.gcc 2004-02-16 21:12:16.000000000 -0600
268@@ -697,6 +697,17 @@
269 extra_parts=""
270 use_collect2=yes
271 ;;
272+arm*-*-linux-uclibc*) # ARM GNU/Linux with ELF - uClibc
273+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
274+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc arm/t-linux"
275+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
276+ gnu_ld=yes
277+ case x${enable_threads} in
278+ x | xyes | xpthreads | xposix)
279+ thread_file='posix'
280+ ;;
281+ esac
282+ ;;
283 arm*-*-linux*) # ARM GNU/Linux with ELF
284 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
285 tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
286@@ -772,6 +783,10 @@
287 tmake_file="cris/t-cris cris/t-elfmulti"
288 gas=yes
289 ;;
290+cris-*-linux-uclibc*)
291+ tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
292+ tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux-uclibc"
293+ ;;
294 cris-*-linux*)
295 tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
296 tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
297@@ -1173,6 +1188,11 @@
298 thread_file='single'
299 fi
300 ;;
301+i[34567]86-*-linux*uclibc*) # Intel 80386's running GNU/Linux
302+ # with ELF format using uClibc
303+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
304+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc i386/t-crtstuff"
305+ ;;
306 i[34567]86-*-linux*) # Intel 80386's running GNU/Linux
307 # with ELF format using glibc 2
308 # aka GNU/Linux C library 6
309@@ -1883,6 +1903,16 @@
310 tm_file="elfos.h ${tm_file} mips/netbsd.h"
311 tmake_file="${tmake_file} mips/t-netbsd"
312 ;;
313+mips*-*-linux-uclibc*) # Linux MIPS, either endian. uClibc
314+ tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
315+ case $machine in
316+ mipsisa32*-*)
317+ target_cpu_default="MASK_SOFT_FLOAT"
318+ tm_defines="MIPS_ISA_DEFAULT=32"
319+ ;;
320+ esac
321+ tmake_file="t-slibgcc-elf-ver t-linux-uclibc mips/t-linux"
322+ ;;
323 mips*-*-linux*) # Linux MIPS, either endian.
324 tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
325 case $machine in
326@@ -2129,6 +2159,11 @@
327 out_file=rs6000/rs6000.c
328 tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
329 ;;
330+powerpc-*-linux-uclibc*)
331+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
332+ out_file=rs6000/rs6000.c
333+ tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux-uclibc rs6000/t-ppccomm"
334+ ;;
335 powerpc-*-linux*)
336 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
337 out_file=rs6000/rs6000.c
338@@ -2313,10 +2348,18 @@
339 tmake_file="${tmake_file} sh/t-le"
340 ;;
341 esac
342- tmake_file="${tmake_file} sh/t-linux"
343+ case $machine in
344+ *-*-linux-uclibc*) tmake_file="${tmake_file} sh/t-linux-uclibc" ;;
345+ *) tmake_file="${tmake_file} sh/t-linux" ;;
346+ esac
347 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
348 gas=yes gnu_ld=yes
349 case $machine in
350+ sh64*-*-linux-uclibc*)
351+ tmake_file="${tmake_file} sh/t-sh64-uclibc"
352+ tm_file="${tm_file} sh/sh64.h"
353+ extra_headers="shmedia.h ushmedia.h sshmedia.h"
354+ ;;
355 sh64*)
356 tmake_file="${tmake_file} sh/t-sh64"
357 tm_file="${tm_file} sh/sh64.h"
358diff -urN gcc-3.3.3/libstdc++-v3/aclocal.m4 gcc-3.3.3-new/libstdc++-v3/aclocal.m4
359--- gcc-3.3.3/libstdc++-v3/aclocal.m4 2004-01-12 10:18:44.000000000 -0600
360+++ gcc-3.3.3-new/libstdc++-v3/aclocal.m4 2004-02-16 21:12:16.000000000 -0600
361@@ -1216,6 +1216,9 @@
362 dnl Default to "generic"
363 if test x$enable_clocale_flag = xno; then
364 case x${target_os} in
365+ xlinux-uclibc*)
366+ enable_clocale_flag=uclibc
367+ ;;
368 xlinux* | xgnu*)
369 AC_EGREP_CPP([_GLIBCPP_ok], [
370 #include <features.h>
371@@ -1339,6 +1342,41 @@
372 CTIME_CC=config/locale/generic/time_members.cc
373 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
374 ;;
375+ xuclibc)
376+ AC_MSG_RESULT(uclibc)
377+
378+ # Declare intention to use gettext, and add support for specific
379+ # languages.
380+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
381+ ALL_LINGUAS="de fr"
382+
383+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
384+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
385+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
386+ USE_NLS=yes
387+ fi
388+ # Export the build objects.
389+ for ling in $ALL_LINGUAS; do \
390+ glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
391+ glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
392+ done
393+ AC_SUBST(glibcpp_MOFILES)
394+ AC_SUBST(glibcpp_POFILES)
395+
396+ CLOCALE_H=config/locale/uclibc/c_locale.h
397+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
398+ CCODECVT_H=config/locale/uclibc/codecvt_specializations.h
399+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
400+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
401+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
402+ CMESSAGES_H=config/locale/uclibc/messages_members.h
403+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
404+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
405+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
406+ CTIME_H=config/locale/uclibc/time_members.h
407+ CTIME_CC=config/locale/uclibc/time_members.cc
408+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
409+ ;;
410 *)
411 echo "$enable_clocale is an unknown locale package" 1>&2
412 exit 1
413diff -urN gcc-3.3.3/libstdc++-v3/configure gcc-3.3.3-new/libstdc++-v3/configure
414--- gcc-3.3.3/libstdc++-v3/configure 2004-01-12 10:18:45.000000000 -0600
415+++ gcc-3.3.3-new/libstdc++-v3/configure 2004-02-17 00:21:12.000000000 -0600
416@@ -2996,6 +2996,9 @@
417
418 if test x$enable_clocale_flag = xno; then
419 case x${target_os} in
420+ xlinux-uclibc*)
421+ enable_clocale_flag=uclibc
422+ ;;
423 xlinux* | xgnu*)
424 cat > conftest.$ac_ext <<EOF
425 #line 3002 "configure"
426@@ -3182,6 +3185,70 @@
427 CTIME_CC=config/locale/generic/time_members.cc
428 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
429 ;;
430+ xuclibc)
431+ echo "$ac_t""uclibc" 1>&6
432+
433+ # Declare intention to use gettext, and add support for specific
434+ # languages.
435+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
436+ ALL_LINGUAS="de fr"
437+
438+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
439+ # Extract the first word of "msgfmt", so it can be a program name with args.
440+set dummy msgfmt; ac_word=$2
441+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
442+echo "configure:3117: checking for $ac_word" >&5
443+if eval "test \"`echo '$''{'ac_cv_prog_check_msgfmt'+set}'`\" = set"; then
444+ echo $ac_n "(cached) $ac_c" 1>&6
445+else
446+ if test -n "$check_msgfmt"; then
447+ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
448+else
449+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
450+ ac_dummy="$PATH"
451+ for ac_dir in $ac_dummy; do
452+ test -z "$ac_dir" && ac_dir=.
453+ if test -f $ac_dir/$ac_word; then
454+ ac_cv_prog_check_msgfmt="yes"
455+ break
456+ fi
457+ done
458+ IFS="$ac_save_ifs"
459+ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
460+fi
461+fi
462+check_msgfmt="$ac_cv_prog_check_msgfmt"
463+if test -n "$check_msgfmt"; then
464+ echo "$ac_t""$check_msgfmt" 1>&6
465+else
466+ echo "$ac_t""no" 1>&6
467+fi
468+
469+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
470+ USE_NLS=yes
471+ fi
472+ # Export the build objects.
473+ for ling in $ALL_LINGUAS; do \
474+ glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
475+ glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
476+ done
477+
478+
479+
480+ CLOCALE_H=config/locale/uclibc/c_locale.h
481+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
482+ CCODECVT_H=config/locale/uclibc/codecvt_specializations.h
483+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
484+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
485+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
486+ CMESSAGES_H=config/locale/uclibc/messages_members.h
487+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
488+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
489+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
490+ CTIME_H=config/locale/uclibc/time_members.h
491+ CTIME_CC=config/locale/uclibc/time_members.cc
492+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
493+ ;;
494 *)
495 echo "$enable_clocale is an unknown locale package" 1>&2
496 exit 1
497@@ -4212,6 +4279,968 @@
498 # GLIBCPP_CHECK_MATH_SUPPORT
499
500 case "$target" in
501+ *-uclibc*)
502+ os_include_dir="os/uclibc"
503+ for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
504+ machine/endian.h machine/param.h sys/machine.h sys/types.h \
505+ fp.h locale.h float.h inttypes.h
506+do
507+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
508+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
509+echo "configure:4224: checking for $ac_hdr" >&5
510+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
511+ echo $ac_n "(cached) $ac_c" 1>&6
512+else
513+ cat > conftest.$ac_ext <<EOF
514+#line 4229 "configure"
515+#include "confdefs.h"
516+#include <$ac_hdr>
517+EOF
518+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
519+{ (eval echo configure:4234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
520+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
521+if test -z "$ac_err"; then
522+ rm -rf conftest*
523+ eval "ac_cv_header_$ac_safe=yes"
524+else
525+ echo "$ac_err" >&5
526+ echo "configure: failed program was:" >&5
527+ cat conftest.$ac_ext >&5
528+ rm -rf conftest*
529+ eval "ac_cv_header_$ac_safe=no"
530+fi
531+rm -f conftest*
532+fi
533+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
534+ echo "$ac_t""yes" 1>&6
535+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
536+ cat >> confdefs.h <<EOF
537+#define $ac_tr_hdr 1
538+EOF
539+
540+else
541+ echo "$ac_t""no" 1>&6
542+fi
543+done
544+
545+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
546+
547+
548+ # If we're not using GNU ld, then there's no point in even trying these
549+ # tests. Check for that first. We should have already tested for gld
550+ # by now (in libtool), but require it now just to be safe...
551+ test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
552+ test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
553+
554+
555+ # The name set by libtool depends on the version of libtool. Shame on us
556+ # for depending on an impl detail, but c'est la vie. Older versions used
557+ # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
558+ # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
559+ # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't
560+ # set (hence we're using an older libtool), then set it.
561+ if test x${with_gnu_ld+set} != xset; then
562+ if test x${ac_cv_prog_gnu_ld+set} != xset; then
563+ # We got through "ac_require(ac_prog_ld)" and still not set? Huh?
564+ with_gnu_ld=no
565+ else
566+ with_gnu_ld=$ac_cv_prog_gnu_ld
567+ fi
568+ fi
569+
570+ # Start by getting the version number. I think the libtool test already
571+ # does some of this, but throws away the result.
572+
573+ ldver=`$LD --version 2>/dev/null | head -1 | \
574+ sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
575+
576+ glibcpp_gnu_ld_version=`echo $ldver | \
577+ $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
578+
579+ # Set --gc-sections.
580+ if test "$with_gnu_ld" = "notbroken"; then
581+ # GNU ld it is! Joy and bunny rabbits!
582+
583+ # All these tests are for C++; save the language and the compiler flags.
584+ # Need to do this so that g++ won't try to link in libstdc++
585+ ac_test_CFLAGS="${CFLAGS+set}"
586+ ac_save_CFLAGS="$CFLAGS"
587+ CFLAGS='-x c++ -Wl,--gc-sections'
588+
589+ # Check for -Wl,--gc-sections
590+ # XXX This test is broken at the moment, as symbols required for
591+ # linking are now in libsupc++ (not built yet.....). In addition,
592+ # this test has cored on solaris in the past. In addition,
593+ # --gc-sections doesn't really work at the moment (keeps on discarding
594+ # used sections, first .eh_frame and now some of the glibc sections for
595+ # iconv). Bzzzzt. Thanks for playing, maybe next time.
596+ echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
597+echo "configure:4312: checking for ld that supports -Wl,--gc-sections" >&5
598+ if test "$cross_compiling" = yes; then
599+ ac_sectionLDflags=yes
600+else
601+ cat > conftest.$ac_ext <<EOF
602+#line 4317 "configure"
603+#include "confdefs.h"
604+
605+ int main(void)
606+ {
607+ try { throw 1; }
608+ catch (...) { };
609+ return 0;
610+ }
611+
612+EOF
613+if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
614+then
615+ ac_sectionLDflags=yes
616+else
617+ echo "configure: failed program was:" >&5
618+ cat conftest.$ac_ext >&5
619+ rm -fr conftest*
620+ ac_sectionLDflags=no
621+fi
622+rm -fr conftest*
623+fi
624+
625+ if test "$ac_test_CFLAGS" = set; then
626+ CFLAGS="$ac_save_CFLAGS"
627+ else
628+ # this is the suspicious part
629+ CFLAGS=''
630+ fi
631+ if test "$ac_sectionLDflags" = "yes"; then
632+ SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
633+ fi
634+ echo "$ac_t""$ac_sectionLDflags" 1>&6
635+ fi
636+
637+ # Set linker optimization flags.
638+ if test x"$with_gnu_ld" = x"yes"; then
639+ OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
640+ fi
641+
642+
643+
644+
645+
646+ echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
647+echo "configure:4362: checking for main in -lm" >&5
648+ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
649+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
650+ echo $ac_n "(cached) $ac_c" 1>&6
651+else
652+ ac_save_LIBS="$LIBS"
653+LIBS="-lm $LIBS"
654+cat > conftest.$ac_ext <<EOF
655+#line 4370 "configure"
656+#include "confdefs.h"
657+
658+int main() {
659+main()
660+; return 0; }
661+EOF
662+if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
663+ rm -rf conftest*
664+ eval "ac_cv_lib_$ac_lib_var=yes"
665+else
666+ echo "configure: failed program was:" >&5
667+ cat conftest.$ac_ext >&5
668+ rm -rf conftest*
669+ eval "ac_cv_lib_$ac_lib_var=no"
670+fi
671+rm -f conftest*
672+LIBS="$ac_save_LIBS"
673+
674+fi
675+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
676+ echo "$ac_t""yes" 1>&6
677+ ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
678+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
679+ cat >> confdefs.h <<EOF
680+#define $ac_tr_lib 1
681+EOF
682+
683+ LIBS="-lm $LIBS"
684+
685+else
686+ echo "$ac_t""no" 1>&6
687+fi
688+
689+ for ac_func in nan copysignf
690+do
691+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
692+echo "configure:4407: checking for $ac_func" >&5
693+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
694+ echo $ac_n "(cached) $ac_c" 1>&6
695+else
696+ cat > conftest.$ac_ext <<EOF
697+#line 4412 "configure"
698+#include "confdefs.h"
699+/* System header to define __stub macros and hopefully few prototypes,
700+ which can conflict with char $ac_func(); below. */
701+#include <assert.h>
702+/* Override any gcc2 internal prototype to avoid an error. */
703+/* We use char because int might match the return type of a gcc2
704+ builtin and then its argument prototype would still apply. */
705+char $ac_func();
706+
707+int main() {
708+
709+/* The GNU C library defines this for functions which it implements
710+ to always fail with ENOSYS. Some functions are actually named
711+ something starting with __ and the normal name is an alias. */
712+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
713+choke me
714+#else
715+$ac_func();
716+#endif
717+
718+; return 0; }
719+EOF
720+if { (eval echo configure:4435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
721+ rm -rf conftest*
722+ eval "ac_cv_func_$ac_func=yes"
723+else
724+ echo "configure: failed program was:" >&5
725+ cat conftest.$ac_ext >&5
726+ rm -rf conftest*
727+ eval "ac_cv_func_$ac_func=no"
728+fi
729+rm -f conftest*
730+fi
731+
732+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
733+ echo "$ac_t""yes" 1>&6
734+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
735+ cat >> confdefs.h <<EOF
736+#define $ac_tr_func 1
737+EOF
738+
739+else
740+ echo "$ac_t""no" 1>&6
741+LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
742+fi
743+done
744+
745+
746+ for ac_func in __signbit
747+do
748+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
749+echo "configure:4464: checking for $ac_func" >&5
750+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
751+ echo $ac_n "(cached) $ac_c" 1>&6
752+else
753+ cat > conftest.$ac_ext <<EOF
754+#line 4469 "configure"
755+#include "confdefs.h"
756+/* System header to define __stub macros and hopefully few prototypes,
757+ which can conflict with char $ac_func(); below. */
758+#include <assert.h>
759+/* Override any gcc2 internal prototype to avoid an error. */
760+/* We use char because int might match the return type of a gcc2
761+ builtin and then its argument prototype would still apply. */
762+char $ac_func();
763+
764+int main() {
765+
766+/* The GNU C library defines this for functions which it implements
767+ to always fail with ENOSYS. Some functions are actually named
768+ something starting with __ and the normal name is an alias. */
769+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
770+choke me
771+#else
772+$ac_func();
773+#endif
774+
775+; return 0; }
776+EOF
777+if { (eval echo configure:4492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
778+ rm -rf conftest*
779+ eval "ac_cv_func_$ac_func=yes"
780+else
781+ echo "configure: failed program was:" >&5
782+ cat conftest.$ac_ext >&5
783+ rm -rf conftest*
784+ eval "ac_cv_func_$ac_func=no"
785+fi
786+rm -f conftest*
787+fi
788+
789+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
790+ echo "$ac_t""yes" 1>&6
791+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
792+ cat >> confdefs.h <<EOF
793+#define $ac_tr_func 1
794+EOF
795+
796+else
797+ echo "$ac_t""no" 1>&6
798+LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
799+fi
800+done
801+
802+ for ac_func in __signbitf
803+do
804+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
805+echo "configure:4520: checking for $ac_func" >&5
806+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
807+ echo $ac_n "(cached) $ac_c" 1>&6
808+else
809+ cat > conftest.$ac_ext <<EOF
810+#line 4525 "configure"
811+#include "confdefs.h"
812+/* System header to define __stub macros and hopefully few prototypes,
813+ which can conflict with char $ac_func(); below. */
814+#include <assert.h>
815+/* Override any gcc2 internal prototype to avoid an error. */
816+/* We use char because int might match the return type of a gcc2
817+ builtin and then its argument prototype would still apply. */
818+char $ac_func();
819+
820+int main() {
821+
822+/* The GNU C library defines this for functions which it implements
823+ to always fail with ENOSYS. Some functions are actually named
824+ something starting with __ and the normal name is an alias. */
825+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
826+choke me
827+#else
828+$ac_func();
829+#endif
830+
831+; return 0; }
832+EOF
833+if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
834+ rm -rf conftest*
835+ eval "ac_cv_func_$ac_func=yes"
836+else
837+ echo "configure: failed program was:" >&5
838+ cat conftest.$ac_ext >&5
839+ rm -rf conftest*
840+ eval "ac_cv_func_$ac_func=no"
841+fi
842+rm -f conftest*
843+fi
844+
845+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
846+ echo "$ac_t""yes" 1>&6
847+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
848+ cat >> confdefs.h <<EOF
849+#define $ac_tr_func 1
850+EOF
851+
852+else
853+ echo "$ac_t""no" 1>&6
854+LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
855+fi
856+done
857+
858+
859+ if test x$ac_cv_func_copysignl = x"yes"; then
860+ for ac_func in __signbitl
861+do
862+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
863+echo "configure:4578: checking for $ac_func" >&5
864+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
865+ echo $ac_n "(cached) $ac_c" 1>&6
866+else
867+ cat > conftest.$ac_ext <<EOF
868+#line 4583 "configure"
869+#include "confdefs.h"
870+/* System header to define __stub macros and hopefully few prototypes,
871+ which can conflict with char $ac_func(); below. */
872+#include <assert.h>
873+/* Override any gcc2 internal prototype to avoid an error. */
874+/* We use char because int might match the return type of a gcc2
875+ builtin and then its argument prototype would still apply. */
876+char $ac_func();
877+
878+int main() {
879+
880+/* The GNU C library defines this for functions which it implements
881+ to always fail with ENOSYS. Some functions are actually named
882+ something starting with __ and the normal name is an alias. */
883+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
884+choke me
885+#else
886+$ac_func();
887+#endif
888+
889+; return 0; }
890+EOF
891+if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
892+ rm -rf conftest*
893+ eval "ac_cv_func_$ac_func=yes"
894+else
895+ echo "configure: failed program was:" >&5
896+ cat conftest.$ac_ext >&5
897+ rm -rf conftest*
898+ eval "ac_cv_func_$ac_func=no"
899+fi
900+rm -f conftest*
901+fi
902+
903+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
904+ echo "$ac_t""yes" 1>&6
905+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
906+ cat >> confdefs.h <<EOF
907+#define $ac_tr_func 1
908+EOF
909+
910+else
911+ echo "$ac_t""no" 1>&6
912+LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
913+fi
914+done
915+
916+ fi
917+
918+ if test -n "$LIBMATHOBJS"; then
919+ need_libmath=yes
920+ fi
921+
922+
923+
924+if test "$need_libmath" = yes; then
925+ GLIBCPP_BUILD_LIBMATH_TRUE=
926+ GLIBCPP_BUILD_LIBMATH_FALSE='#'
927+else
928+ GLIBCPP_BUILD_LIBMATH_TRUE='#'
929+ GLIBCPP_BUILD_LIBMATH_FALSE=
930+fi
931+
932+
933+ enable_wchar_t=no
934+
935+ echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
936+echo "configure:4651: checking for mbstate_t" >&5
937+ cat > conftest.$ac_ext <<EOF
938+#line 4653 "configure"
939+#include "confdefs.h"
940+#include <wchar.h>
941+int main() {
942+mbstate_t teststate;
943+; return 0; }
944+EOF
945+if { (eval echo configure:4660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
946+ rm -rf conftest*
947+ have_mbstate_t=yes
948+else
949+ echo "configure: failed program was:" >&5
950+ cat conftest.$ac_ext >&5
951+ rm -rf conftest*
952+ have_mbstate_t=no
953+fi
954+rm -f conftest*
955+ echo "$ac_t""$have_mbstate_t" 1>&6
956+ if test x"$have_mbstate_t" = xyes; then
957+ cat >> confdefs.h <<\EOF
958+#define HAVE_MBSTATE_T 1
959+EOF
960+
961+ fi
962+
963+ for ac_hdr in wchar.h
964+do
965+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
966+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
967+echo "configure:4682: checking for $ac_hdr" >&5
968+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
969+ echo $ac_n "(cached) $ac_c" 1>&6
970+else
971+ cat > conftest.$ac_ext <<EOF
972+#line 4687 "configure"
973+#include "confdefs.h"
974+#include <$ac_hdr>
975+EOF
976+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
977+{ (eval echo configure:4692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
978+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
979+if test -z "$ac_err"; then
980+ rm -rf conftest*
981+ eval "ac_cv_header_$ac_safe=yes"
982+else
983+ echo "$ac_err" >&5
984+ echo "configure: failed program was:" >&5
985+ cat conftest.$ac_ext >&5
986+ rm -rf conftest*
987+ eval "ac_cv_header_$ac_safe=no"
988+fi
989+rm -f conftest*
990+fi
991+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
992+ echo "$ac_t""yes" 1>&6
993+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
994+ cat >> confdefs.h <<EOF
995+#define $ac_tr_hdr 1
996+EOF
997+ ac_has_wchar_h=yes
998+else
999+ echo "$ac_t""no" 1>&6
1000+ac_has_wchar_h=no
1001+fi
1002+done
1003+
1004+ for ac_hdr in wctype.h
1005+do
1006+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1007+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1008+echo "configure:4723: checking for $ac_hdr" >&5
1009+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1010+ echo $ac_n "(cached) $ac_c" 1>&6
1011+else
1012+ cat > conftest.$ac_ext <<EOF
1013+#line 4728 "configure"
1014+#include "confdefs.h"
1015+#include <$ac_hdr>
1016+EOF
1017+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1018+{ (eval echo configure:4733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1019+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1020+if test -z "$ac_err"; then
1021+ rm -rf conftest*
1022+ eval "ac_cv_header_$ac_safe=yes"
1023+else
1024+ echo "$ac_err" >&5
1025+ echo "configure: failed program was:" >&5
1026+ cat conftest.$ac_ext >&5
1027+ rm -rf conftest*
1028+ eval "ac_cv_header_$ac_safe=no"
1029+fi
1030+rm -f conftest*
1031+fi
1032+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1033+ echo "$ac_t""yes" 1>&6
1034+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1035+ cat >> confdefs.h <<EOF
1036+#define $ac_tr_hdr 1
1037+EOF
1038+ ac_has_wctype_h=yes
1039+else
1040+ echo "$ac_t""no" 1>&6
1041+ac_has_wctype_h=no
1042+fi
1043+done
1044+
1045+
1046+ if test x"$ac_has_wchar_h" = xyes &&
1047+ test x"$ac_has_wctype_h" = xyes &&
1048+ test x"$enable_c_mbchar" != xno; then
1049+
1050+ echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
1051+echo "configure:4766: checking for WCHAR_MIN and WCHAR_MAX" >&5
1052+ cat > conftest.$ac_ext <<EOF
1053+#line 4768 "configure"
1054+#include "confdefs.h"
1055+#include <wchar.h>
1056+int main() {
1057+int i = WCHAR_MIN; int j = WCHAR_MAX;
1058+; return 0; }
1059+EOF
1060+if { (eval echo configure:4775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1061+ rm -rf conftest*
1062+ has_wchar_minmax=yes
1063+else
1064+ echo "configure: failed program was:" >&5
1065+ cat conftest.$ac_ext >&5
1066+ rm -rf conftest*
1067+ has_wchar_minmax=no
1068+fi
1069+rm -f conftest*
1070+ echo "$ac_t""$has_wchar_minmax" 1>&6
1071+
1072+ echo $ac_n "checking for WEOF""... $ac_c" 1>&6
1073+echo "configure:4788: checking for WEOF" >&5
1074+ cat > conftest.$ac_ext <<EOF
1075+#line 4790 "configure"
1076+#include "confdefs.h"
1077+
1078+ #include <wchar.h>
1079+ #include <stddef.h>
1080+int main() {
1081+wint_t i = WEOF;
1082+; return 0; }
1083+EOF
1084+if { (eval echo configure:4799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1085+ rm -rf conftest*
1086+ has_weof=yes
1087+else
1088+ echo "configure: failed program was:" >&5
1089+ cat conftest.$ac_ext >&5
1090+ rm -rf conftest*
1091+ has_weof=no
1092+fi
1093+rm -f conftest*
1094+ echo "$ac_t""$has_weof" 1>&6
1095+
1096+ ac_wfuncs=yes
1097+ for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
1098+do
1099+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1100+echo "configure:4815: checking for $ac_func" >&5
1101+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1102+ echo $ac_n "(cached) $ac_c" 1>&6
1103+else
1104+ cat > conftest.$ac_ext <<EOF
1105+#line 4820 "configure"
1106+#include "confdefs.h"
1107+/* System header to define __stub macros and hopefully few prototypes,
1108+ which can conflict with char $ac_func(); below. */
1109+#include <assert.h>
1110+/* Override any gcc2 internal prototype to avoid an error. */
1111+/* We use char because int might match the return type of a gcc2
1112+ builtin and then its argument prototype would still apply. */
1113+char $ac_func();
1114+
1115+int main() {
1116+
1117+/* The GNU C library defines this for functions which it implements
1118+ to always fail with ENOSYS. Some functions are actually named
1119+ something starting with __ and the normal name is an alias. */
1120+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1121+choke me
1122+#else
1123+$ac_func();
1124+#endif
1125+
1126+; return 0; }
1127+EOF
1128+if { (eval echo configure:4843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1129+ rm -rf conftest*
1130+ eval "ac_cv_func_$ac_func=yes"
1131+else
1132+ echo "configure: failed program was:" >&5
1133+ cat conftest.$ac_ext >&5
1134+ rm -rf conftest*
1135+ eval "ac_cv_func_$ac_func=no"
1136+fi
1137+rm -f conftest*
1138+fi
1139+
1140+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1141+ echo "$ac_t""yes" 1>&6
1142+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1143+ cat >> confdefs.h <<EOF
1144+#define $ac_tr_func 1
1145+EOF
1146+
1147+else
1148+ echo "$ac_t""no" 1>&6
1149+\
1150+ ac_wfuncs=no
1151+fi
1152+done
1153+
1154+
1155+ for ac_func in btowc wctob fgetwc fgetws fputwc fputws fwide \
1156+ fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
1157+ vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
1158+ mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
1159+ wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
1160+ wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
1161+do
1162+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1163+echo "configure:4878: checking for $ac_func" >&5
1164+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1165+ echo $ac_n "(cached) $ac_c" 1>&6
1166+else
1167+ cat > conftest.$ac_ext <<EOF
1168+#line 4883 "configure"
1169+#include "confdefs.h"
1170+/* System header to define __stub macros and hopefully few prototypes,
1171+ which can conflict with char $ac_func(); below. */
1172+#include <assert.h>
1173+/* Override any gcc2 internal prototype to avoid an error. */
1174+/* We use char because int might match the return type of a gcc2
1175+ builtin and then its argument prototype would still apply. */
1176+char $ac_func();
1177+
1178+int main() {
1179+
1180+/* The GNU C library defines this for functions which it implements
1181+ to always fail with ENOSYS. Some functions are actually named
1182+ something starting with __ and the normal name is an alias. */
1183+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1184+choke me
1185+#else
1186+$ac_func();
1187+#endif
1188+
1189+; return 0; }
1190+EOF
1191+if { (eval echo configure:4906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1192+ rm -rf conftest*
1193+ eval "ac_cv_func_$ac_func=yes"
1194+else
1195+ echo "configure: failed program was:" >&5
1196+ cat conftest.$ac_ext >&5
1197+ rm -rf conftest*
1198+ eval "ac_cv_func_$ac_func=no"
1199+fi
1200+rm -f conftest*
1201+fi
1202+
1203+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1204+ echo "$ac_t""yes" 1>&6
1205+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1206+ cat >> confdefs.h <<EOF
1207+#define $ac_tr_func 1
1208+EOF
1209+
1210+else
1211+ echo "$ac_t""no" 1>&6
1212+\
1213+ ac_wfuncs=no
1214+fi
1215+done
1216+
1217+
1218+ echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
1219+echo "configure:4934: checking for ISO C99 wchar_t support" >&5
1220+ if test x"$has_weof" = xyes &&
1221+ test x"$has_wchar_minmax" = xyes &&
1222+ test x"$ac_wfuncs" = xyes; then
1223+ ac_isoC99_wchar_t=yes
1224+ else
1225+ ac_isoC99_wchar_t=no
1226+ fi
1227+ echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
1228+
1229+ ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
1230+echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
1231+echo "configure:4946: checking for iconv.h" >&5
1232+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1233+ echo $ac_n "(cached) $ac_c" 1>&6
1234+else
1235+ cat > conftest.$ac_ext <<EOF
1236+#line 4951 "configure"
1237+#include "confdefs.h"
1238+#include <iconv.h>
1239+EOF
1240+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1241+{ (eval echo configure:4956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1242+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1243+if test -z "$ac_err"; then
1244+ rm -rf conftest*
1245+ eval "ac_cv_header_$ac_safe=yes"
1246+else
1247+ echo "$ac_err" >&5
1248+ echo "configure: failed program was:" >&5
1249+ cat conftest.$ac_ext >&5
1250+ rm -rf conftest*
1251+ eval "ac_cv_header_$ac_safe=no"
1252+fi
1253+rm -f conftest*
1254+fi
1255+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1256+ echo "$ac_t""yes" 1>&6
1257+ ac_has_iconv_h=yes
1258+else
1259+ echo "$ac_t""no" 1>&6
1260+ac_has_iconv_h=no
1261+fi
1262+
1263+ ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
1264+echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
1265+echo "configure:4980: checking for langinfo.h" >&5
1266+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1267+ echo $ac_n "(cached) $ac_c" 1>&6
1268+else
1269+ cat > conftest.$ac_ext <<EOF
1270+#line 4985 "configure"
1271+#include "confdefs.h"
1272+#include <langinfo.h>
1273+EOF
1274+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1275+{ (eval echo configure:4990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1276+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1277+if test -z "$ac_err"; then
1278+ rm -rf conftest*
1279+ eval "ac_cv_header_$ac_safe=yes"
1280+else
1281+ echo "$ac_err" >&5
1282+ echo "configure: failed program was:" >&5
1283+ cat conftest.$ac_ext >&5
1284+ rm -rf conftest*
1285+ eval "ac_cv_header_$ac_safe=no"
1286+fi
1287+rm -f conftest*
1288+fi
1289+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1290+ echo "$ac_t""yes" 1>&6
1291+ ac_has_langinfo_h=yes
1292+else
1293+ echo "$ac_t""no" 1>&6
1294+ac_has_langinfo_h=no
1295+fi
1296+
1297+
1298+ echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
1299+echo "configure:5014: checking for iconv in -liconv" >&5
1300+ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
1301+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1302+ echo $ac_n "(cached) $ac_c" 1>&6
1303+else
1304+ ac_save_LIBS="$LIBS"
1305+LIBS="-liconv $LIBS"
1306+cat > conftest.$ac_ext <<EOF
1307+#line 5022 "configure"
1308+#include "confdefs.h"
1309+/* Override any gcc2 internal prototype to avoid an error. */
1310+/* We use char because int might match the return type of a gcc2
1311+ builtin and then its argument prototype would still apply. */
1312+char iconv();
1313+
1314+int main() {
1315+iconv()
1316+; return 0; }
1317+EOF
1318+if { (eval echo configure:5033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1319+ rm -rf conftest*
1320+ eval "ac_cv_lib_$ac_lib_var=yes"
1321+else
1322+ echo "configure: failed program was:" >&5
1323+ cat conftest.$ac_ext >&5
1324+ rm -rf conftest*
1325+ eval "ac_cv_lib_$ac_lib_var=no"
1326+fi
1327+rm -f conftest*
1328+LIBS="$ac_save_LIBS"
1329+
1330+fi
1331+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1332+ echo "$ac_t""yes" 1>&6
1333+ libiconv="-liconv"
1334+else
1335+ echo "$ac_t""no" 1>&6
1336+fi
1337+
1338+ ac_save_LIBS="$LIBS"
1339+ LIBS="$LIBS $libiconv"
1340+
1341+ for ac_func in iconv_open iconv_close iconv nl_langinfo
1342+do
1343+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1344+echo "configure:5059: checking for $ac_func" >&5
1345+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1346+ echo $ac_n "(cached) $ac_c" 1>&6
1347+else
1348+ cat > conftest.$ac_ext <<EOF
1349+#line 5064 "configure"
1350+#include "confdefs.h"
1351+/* System header to define __stub macros and hopefully few prototypes,
1352+ which can conflict with char $ac_func(); below. */
1353+#include <assert.h>
1354+/* Override any gcc2 internal prototype to avoid an error. */
1355+/* We use char because int might match the return type of a gcc2
1356+ builtin and then its argument prototype would still apply. */
1357+char $ac_func();
1358+
1359+int main() {
1360+
1361+/* The GNU C library defines this for functions which it implements
1362+ to always fail with ENOSYS. Some functions are actually named
1363+ something starting with __ and the normal name is an alias. */
1364+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1365+choke me
1366+#else
1367+$ac_func();
1368+#endif
1369+
1370+; return 0; }
1371+EOF
1372+if { (eval echo configure:5087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1373+ rm -rf conftest*
1374+ eval "ac_cv_func_$ac_func=yes"
1375+else
1376+ echo "configure: failed program was:" >&5
1377+ cat conftest.$ac_ext >&5
1378+ rm -rf conftest*
1379+ eval "ac_cv_func_$ac_func=no"
1380+fi
1381+rm -f conftest*
1382+fi
1383+
1384+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1385+ echo "$ac_t""yes" 1>&6
1386+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1387+ cat >> confdefs.h <<EOF
1388+#define $ac_tr_func 1
1389+EOF
1390+ \
1391+ ac_XPG2funcs=yes
1392+else
1393+ echo "$ac_t""no" 1>&6
1394+ac_XPG2funcs=no
1395+fi
1396+done
1397+
1398+
1399+ LIBS="$ac_save_LIBS"
1400+
1401+ echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
1402+echo "configure:5117: checking for XPG2 wchar_t support" >&5
1403+ if test x"$ac_has_iconv_h" = xyes &&
1404+ test x"$ac_has_langinfo_h" = xyes &&
1405+ test x"$ac_XPG2funcs" = xyes; then
1406+ ac_XPG2_wchar_t=yes
1407+ else
1408+ ac_XPG2_wchar_t=no
1409+ fi
1410+ echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
1411+
1412+ if test x"$ac_isoC99_wchar_t" = xyes &&
1413+ test x"$ac_XPG2_wchar_t" = xyes; then
1414+ cat >> confdefs.h <<\EOF
1415+#define _GLIBCPP_USE_WCHAR_T 1
1416+EOF
1417+
1418+ enable_wchar_t=yes
1419+ fi
1420+ fi
1421+ echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
1422+echo "configure:5137: checking for enabled wchar_t specializations" >&5
1423+ echo "$ac_t""$enable_wchar_t" 1>&6
1424+
1425+
1426+if test "$enable_wchar_t" = yes; then
1427+ GLIBCPP_TEST_WCHAR_T_TRUE=
1428+ GLIBCPP_TEST_WCHAR_T_FALSE='#'
1429+else
1430+ GLIBCPP_TEST_WCHAR_T_TRUE='#'
1431+ GLIBCPP_TEST_WCHAR_T_FALSE=
1432+fi
1433+
1434+
1435+ cat >> confdefs.h <<\EOF
1436+#define HAVE_COPYSIGN 1
1437+EOF
1438+
1439+ cat >> confdefs.h <<\EOF
1440+#define HAVE_FINITE 1
1441+EOF
1442+
1443+ cat >> confdefs.h <<\EOF
1444+#define HAVE_FINITEF 1
1445+EOF
1446+
1447+ cat >> confdefs.h <<\EOF
1448+#define HAVE_ISINF 1
1449+EOF
1450+
1451+ cat >> confdefs.h <<\EOF
1452+#define HAVE_ISINFF 1
1453+EOF
1454+
1455+ cat >> confdefs.h <<\EOF
1456+#define HAVE_ISNAN 1
1457+EOF
1458+
1459+ cat >> confdefs.h <<\EOF
1460+#define HAVE_ISNANF 1
1461+EOF
1462+ ;;
1463 *-linux*)
1464 os_include_dir="os/gnu-linux"
1465 for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
1466diff -urN gcc-3.3.3/libstdc++-v3/configure.in gcc-3.3.3-new/libstdc++-v3/configure.in
1467--- gcc-3.3.3/libstdc++-v3/configure.in 2004-01-12 10:19:22.000000000 -0600
1468+++ gcc-3.3.3-new/libstdc++-v3/configure.in 2004-02-16 23:13:45.000000000 -0600
1469@@ -117,6 +117,36 @@
1470 # GLIBCPP_CHECK_MATH_SUPPORT
1471
1472 case "$target" in
1473+ *-uclibc*)
1474+ os_include_dir="os/uclibc"
1475+ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
1476+ machine/endian.h machine/param.h sys/machine.h sys/types.h \
1477+ fp.h locale.h float.h inttypes.h])
1478+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
1479+ AC_SUBST(SECTION_FLAGS)
1480+ GLIBCPP_CHECK_LINKER_FEATURES
1481+ GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
1482+ GLIBCPP_CHECK_WCHAR_T_SUPPORT
1483+
1484+ AC_DEFINE(HAVE_COPYSIGN)
1485+ #AC_DEFINE(HAVE_COPYSIGNF)
1486+ AC_DEFINE(HAVE_FINITE)
1487+ AC_DEFINE(HAVE_FINITEF)
1488+ #AC_DEFINE(HAVE_FREXPF)
1489+ #AC_DEFINE(HAVE_HYPOTF)
1490+ AC_DEFINE(HAVE_ISINF)
1491+ AC_DEFINE(HAVE_ISINFF)
1492+ AC_DEFINE(HAVE_ISNAN)
1493+ AC_DEFINE(HAVE_ISNANF)
1494+ #AC_DEFINE(HAVE_SINCOS)
1495+ #AC_DEFINE(HAVE_SINCOSF)
1496+ #if test x"long_double_math_on_this_cpu" = x"yes"; then
1497+ #AC_DEFINE(HAVE_FINITEL)
1498+ #AC_DEFINE(HAVE_HYPOTL)
1499+ #AC_DEFINE(HAVE_ISINFL)
1500+ #AC_DEFINE(HAVE_ISNANL)
1501+ #fi
1502+ ;;
1503 *-linux*)
1504 os_include_dir="os/gnu-linux"
1505 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
1506diff -urN gcc-3.3.3/libstdc++-v3/configure.target gcc-3.3.3-new/libstdc++-v3/configure.target
1507--- gcc-3.3.3/libstdc++-v3/configure.target 2003-10-01 14:07:07.000000000 -0500
1508+++ gcc-3.3.3-new/libstdc++-v3/configure.target 2004-02-16 21:12:16.000000000 -0600
1509@@ -133,6 +133,9 @@
1510 freebsd*)
1511 os_include_dir="os/bsd/freebsd"
1512 ;;
1513+ linux-uclibc*)
1514+ os_include_dir="os/uclibc"
1515+ ;;
1516 gnu* | linux*)
1517 os_include_dir="os/gnu-linux"
1518 ;;
1519diff -urN gcc-3.3.3/libstdc++-v3/include/c_std/std_cstdlib.h gcc-3.3.3-new/libstdc++-v3/include/c_std/std_cstdlib.h
1520--- gcc-3.3.3/libstdc++-v3/include/c_std/std_cstdlib.h 2003-04-18 05:08:05.000000000 -0500
1521+++ gcc-3.3.3-new/libstdc++-v3/include/c_std/std_cstdlib.h 2004-02-16 21:12:16.000000000 -0600
1522@@ -101,9 +101,11 @@
1523 using ::labs;
1524 using ::ldiv;
1525 using ::malloc;
1526+#if _GLIBCPP_USE_WCHAR_T
1527 using ::mblen;
1528 using ::mbstowcs;
1529 using ::mbtowc;
1530+#endif
1531 using ::qsort;
1532 using ::rand;
1533 using ::realloc;
1534@@ -112,8 +114,10 @@
1535 using ::strtol;
1536 using ::strtoul;
1537 using ::system;
1538+#if _GLIBCPP_USE_WCHAR_T
1539 using ::wcstombs;
1540 using ::wctomb;
1541+#endif
1542
1543 inline long
1544 abs(long __i) { return labs(__i); }
1545diff -urN gcc-3.3.3/libstdc++-v3/include/c_std/std_cwchar.h gcc-3.3.3-new/libstdc++-v3/include/c_std/std_cwchar.h
1546--- gcc-3.3.3/libstdc++-v3/include/c_std/std_cwchar.h 2003-04-18 05:08:05.000000000 -0500
1547+++ gcc-3.3.3-new/libstdc++-v3/include/c_std/std_cwchar.h 2004-02-16 21:12:16.000000000 -0600
1548@@ -165,7 +165,9 @@
1549 using ::wcscoll;
1550 using ::wcscpy;
1551 using ::wcscspn;
1552+#ifdef HAVE_WCSFTIME
1553 using ::wcsftime;
1554+#endif
1555 using ::wcslen;
1556 using ::wcsncat;
1557 using ::wcsncmp;
1558diff -urN gcc-3.3.3/ltconfig gcc-3.3.3-new/ltconfig
1559--- gcc-3.3.3/ltconfig 2003-02-19 20:10:02.000000000 -0600
1560+++ gcc-3.3.3-new/ltconfig 2004-02-16 21:12:16.000000000 -0600
1561@@ -603,6 +603,7 @@
1562 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1563 case $host_os in
1564 linux-gnu*) ;;
1565+linux-uclibc*) ;;
1566 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1567 esac
1568
1569@@ -1247,6 +1248,24 @@
1570 dynamic_linker='GNU/Linux ld.so'
1571 ;;
1572
1573+linux-uclibc*)
1574+ version_type=linux
1575+ need_lib_prefix=no
1576+ need_version=no
1577+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1578+ soname_spec='${libname}${release}.so$major'
1579+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1580+ shlibpath_var=LD_LIBRARY_PATH
1581+ shlibpath_overrides_runpath=no
1582+ # This implies no fast_install, which is unacceptable.
1583+ # Some rework will be needed to allow for fast_install
1584+ # before this can be enabled.
1585+ # Note: copied from linux-gnu, and may not be appropriate.
1586+ hardcode_into_libs=yes
1587+ # Assume using the uClibc dynamic linker.
1588+ dynamic_linker="uClibc ld.so"
1589+ ;;
1590+
1591 netbsd*)
1592 need_lib_prefix=no
1593 need_version=no
diff --git a/meta/packages/gcc/gcc-3.3.4/gcc-uclibc-3.3-110-conf.patch b/meta/packages/gcc/gcc-3.3.4/gcc-uclibc-3.3-110-conf.patch
deleted file mode 100644
index f297c3283f..0000000000
--- a/meta/packages/gcc/gcc-3.3.4/gcc-uclibc-3.3-110-conf.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1Use the patch by Carl Miller <chaz@energoncube.net> for powerpc, with
2some minor modifications. Changed *os_uclibc to *os_linux_uclibc since
3at some point we might support other platforms. Also updated to 3.3.3.
4diff -urN gcc-3.3.3/gcc/config/rs6000/linux.h gcc-3.3.3-new/gcc/config/rs6000/linux.h
5--- gcc-3.3.3/gcc/config/rs6000/linux.h 2003-11-14 00:46:10.000000000 -0600
6+++ gcc-3.3.3-new/gcc/config/rs6000/linux.h 2004-02-16 21:13:40.000000000 -0600
7@@ -64,7 +64,11 @@
8 #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
9
10 #undef LINK_OS_DEFAULT_SPEC
11+#ifdef USE_UCLIBC
12+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
13+#else
14 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
15+#endif
16
17 #undef TARGET_VERSION
18 #define TARGET_VERSION fprintf (stderr, " (PowerPC GNU/Linux)");
19diff -urN gcc-3.3.3/gcc/config/rs6000/sysv4.h gcc-3.3.3-new/gcc/config/rs6000/sysv4.h
20--- gcc-3.3.3/gcc/config/rs6000/sysv4.h 2003-10-28 13:55:41.000000000 -0600
21+++ gcc-3.3.3-new/gcc/config/rs6000/sysv4.h 2004-02-16 21:13:40.000000000 -0600
22@@ -968,9 +968,11 @@
23 %{mcall-linux: %(link_os_linux) } \
24 %{mcall-gnu: %(link_os_gnu) } \
25 %{mcall-netbsd: %(link_os_netbsd) } \
26+%{mcall-uclibc: %(link_os_linux_uclibc) } \
27 %{!mads: %{!myellowknife: %{!mmvme: %{!msim: %{!mwindiss: \
28 %{!mcall-freebsd: %{!mcall-linux: %{!mcall-gnu: \
29- %{!mcall-netbsd: %(link_os_default) }}}}}}}}}"
30+ %{!mcall-netbsd: %{!mcall-uclibc: \
31+ %(link_os_default) }}}}}}}}}}"
32
33 #define LINK_OS_DEFAULT_SPEC ""
34
35@@ -1307,6 +1309,12 @@
36
37 #define LINK_OS_WINDISS_SPEC ""
38
39+/* uClibc support for Linux. */
40+
41+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
42+ %{rdynamic:-export-dynamic} \
43+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
44+
45 /* Define any extra SPECS that the compiler needs to generate. */
46 /* Override rs6000.h definition. */
47 #undef SUBTARGET_EXTRA_SPECS
48@@ -1372,6 +1380,7 @@
49 { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
50 { "link_os_vxworks", LINK_OS_VXWORKS_SPEC }, \
51 { "link_os_windiss", LINK_OS_WINDISS_SPEC }, \
52+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
53 { "link_os_default", LINK_OS_DEFAULT_SPEC }, \
54 { "cc1_endian_big", CC1_ENDIAN_BIG_SPEC }, \
55 { "cc1_endian_little", CC1_ENDIAN_LITTLE_SPEC }, \
diff --git a/meta/packages/gcc/gcc-3.3.4/gcc-uclibc-3.3-120-softfloat.patch b/meta/packages/gcc/gcc-3.3.4/gcc-uclibc-3.3-120-softfloat.patch
deleted file mode 100644
index f2431896cf..0000000000
--- a/meta/packages/gcc/gcc-3.3.4/gcc-uclibc-3.3-120-softfloat.patch
+++ /dev/null
@@ -1,14 +0,0 @@
1--- gcc-3.3.2-old/configure.in 2003-08-09 01:57:21.000000000 -0500
2+++ gcc-3.3.2/configure.in 2004-01-15 12:46:29.000000000 -0600
3@@ -1418,6 +1418,11 @@
4 fi
5
6 FLAGS_FOR_TARGET=
7+case " $targargs " in
8+ *" --nfp "* | *" --without-float "*)
9+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -msoft-float'
10+ ;;
11+esac
12 case " $target_configdirs " in
13 *" newlib "*)
14 case " $targargs " in
diff --git a/meta/packages/gcc/gcc-3.3.4/gcc-uclibc-3.3-200-code.patch b/meta/packages/gcc/gcc-3.3.4/gcc-uclibc-3.3-200-code.patch
deleted file mode 100644
index 5880d834b4..0000000000
--- a/meta/packages/gcc/gcc-3.3.4/gcc-uclibc-3.3-200-code.patch
+++ /dev/null
@@ -1,3021 +0,0 @@
1Warning! This patch is not finished. The wide char time-related stuff
2is broken or non-functional. But it serves as a starting point to get
3things building while I continue to work on the uClibc locale internals.
4diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
5--- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 1969-12-31 18:00:00.000000000 -0600
6+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2004-01-09 07:55:02.000000000 -0600
7@@ -0,0 +1,63 @@
8+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
9+
10+// Copyright (C) 2002 Free Software Foundation, Inc.
11+//
12+// This file is part of the GNU ISO C++ Library. This library is free
13+// software; you can redistribute it and/or modify it under the
14+// terms of the GNU General Public License as published by the
15+// Free Software Foundation; either version 2, or (at your option)
16+// any later version.
17+
18+// This library is distributed in the hope that it will be useful,
19+// but WITHOUT ANY WARRANTY; without even the implied warranty of
20+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21+// GNU General Public License for more details.
22+
23+// You should have received a copy of the GNU General Public License along
24+// with this library; see the file COPYING. If not, write to the Free
25+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
26+// USA.
27+
28+// As a special exception, you may use this file as part of a free software
29+// library without restriction. Specifically, if other files instantiate
30+// templates or use macros or inline functions from this file, or you compile
31+// this file and link it with other files to produce an executable, this
32+// file does not by itself cause the resulting executable to be covered by
33+// the GNU General Public License. This exception does not however
34+// invalidate any other reasons why the executable file might be covered by
35+// the GNU General Public License.
36+
37+// Written by Jakub Jelinek <jakub@redhat.com>
38+
39+#include <clocale>
40+
41+#ifdef __UCLIBC_MJN3_ONLY__
42+#warning clean this up
43+#endif
44+
45+#ifdef __UCLIBC_HAS_XLOCALE__
46+
47+extern "C" __typeof(iswctype_l) __iswctype_l;
48+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
49+extern "C" __typeof(strcoll_l) __strcoll_l;
50+extern "C" __typeof(strftime_l) __strftime_l;
51+extern "C" __typeof(strtod_l) __strtod_l;
52+extern "C" __typeof(strtof_l) __strtof_l;
53+extern "C" __typeof(strtold_l) __strtold_l;
54+extern "C" __typeof(strtol_l) __strtol_l;
55+extern "C" __typeof(strtoll_l) __strtoll_l;
56+extern "C" __typeof(strtoul_l) __strtoul_l;
57+extern "C" __typeof(strtoull_l) __strtoull_l;
58+extern "C" __typeof(strxfrm_l) __strxfrm_l;
59+extern "C" __typeof(towlower_l) __towlower_l;
60+extern "C" __typeof(towupper_l) __towupper_l;
61+extern "C" __typeof(wcscoll_l) __wcscoll_l;
62+extern "C" __typeof(wcsftime_l) __wcsftime_l;
63+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
64+extern "C" __typeof(wctype_l) __wctype_l;
65+extern "C" __typeof(newlocale) __newlocale;
66+extern "C" __typeof(freelocale) __freelocale;
67+extern "C" __typeof(duplocale) __duplocale;
68+extern "C" __typeof(uselocale) __uselocale;
69+
70+#endif // GLIBC 2.3 and later
71diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/c_locale.cc
72--- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/c_locale.cc 1969-12-31 18:00:00.000000000 -0600
73+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2004-01-09 08:37:55.000000000 -0600
74@@ -0,0 +1,231 @@
75+// Wrapper for underlying C-language localization -*- C++ -*-
76+
77+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
78+//
79+// This file is part of the GNU ISO C++ Library. This library is free
80+// software; you can redistribute it and/or modify it under the
81+// terms of the GNU General Public License as published by the
82+// Free Software Foundation; either version 2, or (at your option)
83+// any later version.
84+
85+// This library is distributed in the hope that it will be useful,
86+// but WITHOUT ANY WARRANTY; without even the implied warranty of
87+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
88+// GNU General Public License for more details.
89+
90+// You should have received a copy of the GNU General Public License along
91+// with this library; see the file COPYING. If not, write to the Free
92+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
93+// USA.
94+
95+// As a special exception, you may use this file as part of a free software
96+// library without restriction. Specifically, if other files instantiate
97+// templates or use macros or inline functions from this file, or you compile
98+// this file and link it with other files to produce an executable, this
99+// file does not by itself cause the resulting executable to be covered by
100+// the GNU General Public License. This exception does not however
101+// invalidate any other reasons why the executable file might be covered by
102+// the GNU General Public License.
103+
104+//
105+// ISO C++ 14882: 22.8 Standard locale categories.
106+//
107+
108+// Written by Benjamin Kosnik <bkoz@redhat.com>
109+
110+#include <locale>
111+#include <stdexcept>
112+#include <langinfo.h>
113+#include <bits/c++locale_internal.h>
114+
115+#ifndef __UCLIBC_HAS_XLOCALE__
116+#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
117+#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
118+#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
119+#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
120+#define __strtof_l(S, E, L) strtof((S), (E))
121+#define __strtod_l(S, E, L) strtod((S), (E))
122+#define __strtold_l(S, E, L) strtold((S), (E))
123+#endif
124+
125+namespace std
126+{
127+ template<>
128+ void
129+ __convert_to_v(const char* __s, long& __v, ios_base::iostate& __err,
130+ const __c_locale& __cloc, int __base)
131+ {
132+ if (!(__err & ios_base::failbit))
133+ {
134+ char* __sanity;
135+ errno = 0;
136+ long __l = __strtol_l(__s, &__sanity, __base, __cloc);
137+ if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
138+ __v = __l;
139+ else
140+ __err |= ios_base::failbit;
141+ }
142+ }
143+
144+ template<>
145+ void
146+ __convert_to_v(const char* __s, unsigned long& __v,
147+ ios_base::iostate& __err, const __c_locale& __cloc,
148+ int __base)
149+ {
150+ if (!(__err & ios_base::failbit))
151+ {
152+ char* __sanity;
153+ errno = 0;
154+ unsigned long __ul = __strtoul_l(__s, &__sanity, __base, __cloc);
155+ if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
156+ __v = __ul;
157+ else
158+ __err |= ios_base::failbit;
159+ }
160+ }
161+
162+#ifdef _GLIBCPP_USE_LONG_LONG
163+ template<>
164+ void
165+ __convert_to_v(const char* __s, long long& __v, ios_base::iostate& __err,
166+ const __c_locale& __cloc, int __base)
167+ {
168+ if (!(__err & ios_base::failbit))
169+ {
170+ char* __sanity;
171+ errno = 0;
172+ long long __ll = __strtoll_l(__s, &__sanity, __base, __cloc);
173+ if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
174+ __v = __ll;
175+ else
176+ __err |= ios_base::failbit;
177+ }
178+ }
179+
180+ template<>
181+ void
182+ __convert_to_v(const char* __s, unsigned long long& __v,
183+ ios_base::iostate& __err, const __c_locale& __cloc,
184+ int __base)
185+ {
186+ if (!(__err & ios_base::failbit))
187+ {
188+ char* __sanity;
189+ errno = 0;
190+ unsigned long long __ull = __strtoull_l(__s, &__sanity, __base,
191+ __cloc);
192+ if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
193+ __v = __ull;
194+ else
195+ __err |= ios_base::failbit;
196+ }
197+ }
198+#endif
199+
200+ template<>
201+ void
202+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
203+ const __c_locale& __cloc, int)
204+ {
205+ if (!(__err & ios_base::failbit))
206+ {
207+ char* __sanity;
208+ errno = 0;
209+ float __f = __strtof_l(__s, &__sanity, __cloc);
210+ if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
211+ __v = __f;
212+ else
213+ __err |= ios_base::failbit;
214+ }
215+ }
216+
217+ template<>
218+ void
219+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
220+ const __c_locale& __cloc, int)
221+ {
222+ if (!(__err & ios_base::failbit))
223+ {
224+ char* __sanity;
225+ errno = 0;
226+ double __d = __strtod_l(__s, &__sanity, __cloc);
227+ if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
228+ __v = __d;
229+ else
230+ __err |= ios_base::failbit;
231+ }
232+ }
233+
234+ template<>
235+ void
236+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
237+ const __c_locale& __cloc, int)
238+ {
239+ if (!(__err & ios_base::failbit))
240+ {
241+ char* __sanity;
242+ errno = 0;
243+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
244+ if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
245+ __v = __ld;
246+ else
247+ __err |= ios_base::failbit;
248+ }
249+ }
250+
251+ void
252+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
253+ __c_locale __old)
254+ {
255+#ifdef __UCLIBC_HAS_XLOCALE__
256+ __cloc = __newlocale(1 << LC_ALL, __s, __old);
257+ if (!__cloc)
258+ {
259+ // This named locale is not supported by the underlying OS.
260+ __throw_runtime_error("attempt to create locale from unknown name");
261+ }
262+#else
263+ __cloc = NULL;
264+#endif
265+ }
266+
267+ void
268+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
269+ {
270+#ifdef __UCLIBC_HAS_XLOCALE__
271+ if (_S_c_locale != __cloc)
272+ __freelocale(__cloc);
273+#else
274+ __cloc = NULL;
275+#endif
276+ }
277+
278+ __c_locale
279+ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
280+#ifdef __UCLIBC_HAS_XLOCALE__
281+ { return __duplocale(__cloc); }
282+#else
283+ { return __c_locale(); }
284+#endif
285+
286+ const char* locale::_S_categories[_S_categories_size
287+ + _S_extra_categories_size] =
288+ {
289+ "LC_CTYPE",
290+ "LC_NUMERIC",
291+ "LC_TIME",
292+ "LC_COLLATE",
293+ "LC_MONETARY",
294+ "LC_MESSAGES"
295+#if _GLIBCPP_NUM_CATEGORIES != 0
296+ ,
297+ "LC_PAPER",
298+ "LC_NAME",
299+ "LC_ADDRESS",
300+ "LC_TELEPHONE",
301+ "LC_MEASUREMENT",
302+ "LC_IDENTIFICATION"
303+#endif
304+ };
305+} // namespace std
306diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/c_locale.h
307--- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/c_locale.h 1969-12-31 18:00:00.000000000 -0600
308+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/c_locale.h 2004-01-09 07:51:06.000000000 -0600
309@@ -0,0 +1,118 @@
310+// Wrapper for underlying C-language localization -*- C++ -*-
311+
312+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
313+//
314+// This file is part of the GNU ISO C++ Library. This library is free
315+// software; you can redistribute it and/or modify it under the
316+// terms of the GNU General Public License as published by the
317+// Free Software Foundation; either version 2, or (at your option)
318+// any later version.
319+
320+// This library is distributed in the hope that it will be useful,
321+// but WITHOUT ANY WARRANTY; without even the implied warranty of
322+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
323+// GNU General Public License for more details.
324+
325+// You should have received a copy of the GNU General Public License along
326+// with this library; see the file COPYING. If not, write to the Free
327+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
328+// USA.
329+
330+// As a special exception, you may use this file as part of a free software
331+// library without restriction. Specifically, if other files instantiate
332+// templates or use macros or inline functions from this file, or you compile
333+// this file and link it with other files to produce an executable, this
334+// file does not by itself cause the resulting executable to be covered by
335+// the GNU General Public License. This exception does not however
336+// invalidate any other reasons why the executable file might be covered by
337+// the GNU General Public License.
338+
339+//
340+// ISO C++ 14882: 22.8 Standard locale categories.
341+//
342+
343+// Written by Benjamin Kosnik <bkoz@redhat.com>
344+
345+#ifndef _CPP_BITS_C_LOCALE_H
346+#define _CPP_BITS_C_LOCALE_H 1
347+
348+#pragma GCC system_header
349+
350+#include <clocale>
351+#include <langinfo.h> // For codecvt
352+#ifdef __UCLIBC_MJN3_ONLY__
353+#warning fix this
354+#endif
355+#ifdef __UCLIBC_HAS_LOCALE__
356+#include <iconv.h> // For codecvt using iconv, iconv_t
357+#endif
358+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
359+#include <libintl.h> // For messages
360+#endif
361+
362+#ifdef __UCLIBC_MJN3_ONLY__
363+#warning what is _GLIBCPP_C_LOCALE_GNU for
364+#endif
365+#define _GLIBCPP_C_LOCALE_GNU 1
366+
367+#ifdef __UCLIBC_MJN3_ONLY__
368+#warning fix categories
369+#endif
370+// #define _GLIBCPP_NUM_CATEGORIES 6
371+#define _GLIBCPP_NUM_CATEGORIES 0
372+
373+#ifdef __UCLIBC_HAS_XLOCALE__
374+namespace __gnu_cxx
375+{
376+ extern "C" __typeof(uselocale) __uselocale;
377+}
378+#endif
379+
380+namespace std
381+{
382+#ifdef __UCLIBC_HAS_XLOCALE__
383+ typedef __locale_t __c_locale;
384+#else
385+ typedef int* __c_locale;
386+#endif
387+
388+ // Convert numeric value of type _Tv to string and return length of
389+ // string. If snprintf is available use it, otherwise fall back to
390+ // the unsafe sprintf which, in general, can be dangerous and should
391+ // be avoided.
392+ template<typename _Tv>
393+ int
394+ __convert_from_v(char* __out, const int __size, const char* __fmt,
395+#ifdef __UCLIBC_HAS_XLOCALE__
396+ _Tv __v, const __c_locale& __cloc, int __prec = -1)
397+ {
398+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
399+#else
400+ _Tv __v, const __c_locale&, int __prec = -1)
401+ {
402+# ifdef __UCLIBC_HAS_LOCALE__
403+ char* __old = setlocale(LC_ALL, NULL);
404+ char* __sav = static_cast<char*>(malloc(strlen(__old) + 1));
405+ if (__sav)
406+ strcpy(__sav, __old);
407+ setlocale(LC_ALL, "C");
408+# endif
409+#endif
410+
411+ int __ret;
412+ if (__prec >= 0)
413+ __ret = snprintf(__out, __size, __fmt, __prec, __v);
414+ else
415+ __ret = snprintf(__out, __size, __fmt, __v);
416+
417+#ifdef __UCLIBC_HAS_XLOCALE__
418+ __gnu_cxx::__uselocale(__old);
419+#elif defined __UCLIBC_HAS_LOCALE__
420+ setlocale(LC_ALL, __sav);
421+ free(__sav);
422+#endif
423+ return __ret;
424+ }
425+}
426+
427+#endif
428diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
429--- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 1969-12-31 18:00:00.000000000 -0600
430+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2004-01-09 04:04:34.000000000 -0600
431@@ -0,0 +1,113 @@
432+// std::codecvt implementation details, GNU version -*- C++ -*-
433+
434+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
435+//
436+// This file is part of the GNU ISO C++ Library. This library is free
437+// software; you can redistribute it and/or modify it under the
438+// terms of the GNU General Public License as published by the
439+// Free Software Foundation; either version 2, or (at your option)
440+// any later version.
441+
442+// This library is distributed in the hope that it will be useful,
443+// but WITHOUT ANY WARRANTY; without even the implied warranty of
444+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
445+// GNU General Public License for more details.
446+
447+// You should have received a copy of the GNU General Public License along
448+// with this library; see the file COPYING. If not, write to the Free
449+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
450+// USA.
451+
452+// As a special exception, you may use this file as part of a free software
453+// library without restriction. Specifically, if other files instantiate
454+// templates or use macros or inline functions from this file, or you compile
455+// this file and link it with other files to produce an executable, this
456+// file does not by itself cause the resulting executable to be covered by
457+// the GNU General Public License. This exception does not however
458+// invalidate any other reasons why the executable file might be covered by
459+// the GNU General Public License.
460+
461+//
462+// ISO C++ 14882: 22.2.1.5 - Template class codecvt
463+//
464+
465+// Written by Benjamin Kosnik <bkoz@redhat.com>
466+
467+#include <locale>
468+#include <bits/c++locale_internal.h>
469+
470+namespace std
471+{
472+ // Specializations.
473+#ifdef _GLIBCPP_USE_WCHAR_T
474+ codecvt_base::result
475+ codecvt<wchar_t, char, mbstate_t>::
476+ do_out(state_type& __state, const intern_type* __from,
477+ const intern_type* __from_end, const intern_type*& __from_next,
478+ extern_type* __to, extern_type* __to_end,
479+ extern_type*& __to_next) const
480+ {
481+ result __ret = error;
482+ size_t __len = min(__from_end - __from, __to_end - __to);
483+#ifdef __UCLIBC_HAS_XLOCALE__
484+ __c_locale __old = __uselocale(_S_c_locale);
485+#endif
486+ size_t __conv = wcsrtombs(__to, &__from, __len, &__state);
487+#ifdef __UCLIBC_HAS_XLOCALE__
488+ __uselocale(__old);
489+#endif
490+
491+ if (__conv == __len)
492+ {
493+ __from_next = __from;
494+ __to_next = __to + __conv;
495+ __ret = ok;
496+ }
497+ else if (__conv > 0 && __conv < __len)
498+ {
499+ __from_next = __from;
500+ __to_next = __to + __conv;
501+ __ret = partial;
502+ }
503+ else
504+ __ret = error;
505+
506+ return __ret;
507+ }
508+
509+ codecvt_base::result
510+ codecvt<wchar_t, char, mbstate_t>::
511+ do_in(state_type& __state, const extern_type* __from,
512+ const extern_type* __from_end, const extern_type*& __from_next,
513+ intern_type* __to, intern_type* __to_end,
514+ intern_type*& __to_next) const
515+ {
516+ result __ret = error;
517+ size_t __len = min(__from_end - __from, __to_end - __to);
518+#ifdef __UCLIBC_HAS_XLOCALE__
519+ __c_locale __old = __uselocale(_S_c_locale);
520+#endif
521+ size_t __conv = mbsrtowcs(__to, &__from, __len, &__state);
522+#ifdef __UCLIBC_HAS_XLOCALE__
523+ __uselocale(__old);
524+#endif
525+
526+ if (__conv == __len)
527+ {
528+ __from_next = __from;
529+ __to_next = __to + __conv;
530+ __ret = ok;
531+ }
532+ else if (__conv > 0 && __conv < __len)
533+ {
534+ __from_next = __from;
535+ __to_next = __to + __conv;
536+ __ret = partial;
537+ }
538+ else
539+ __ret = error;
540+
541+ return __ret;
542+ }
543+#endif
544+}
545diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/codecvt_specializations.h gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/codecvt_specializations.h
546--- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/codecvt_specializations.h 1969-12-31 18:00:00.000000000 -0600
547+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/codecvt_specializations.h 2004-01-09 01:53:51.000000000 -0600
548@@ -0,0 +1,461 @@
549+// Locale support (codecvt) -*- C++ -*-
550+
551+// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
552+//
553+// This file is part of the GNU ISO C++ Library. This library is free
554+// software; you can redistribute it and/or modify it under the
555+// terms of the GNU General Public License as published by the
556+// Free Software Foundation; either version 2, or (at your option)
557+// any later version.
558+
559+// This library is distributed in the hope that it will be useful,
560+// but WITHOUT ANY WARRANTY; without even the implied warranty of
561+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
562+// GNU General Public License for more details.
563+
564+// You should have received a copy of the GNU General Public License along
565+// with this library; see the file COPYING. If not, write to the Free
566+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
567+// USA.
568+
569+// As a special exception, you may use this file as part of a free software
570+// library without restriction. Specifically, if other files instantiate
571+// templates or use macros or inline functions from this file, or you compile
572+// this file and link it with other files to produce an executable, this
573+// file does not by itself cause the resulting executable to be covered by
574+// the GNU General Public License. This exception does not however
575+// invalidate any other reasons why the executable file might be covered by
576+// the GNU General Public License.
577+
578+//
579+// ISO C++ 14882: 22.2.1.5 Template class codecvt
580+//
581+
582+// Warning: this file is not meant for user inclusion. Use <locale>.
583+
584+// Written by Benjamin Kosnik <bkoz@cygnus.com>
585+
586+ // XXX
587+ // Define this here to codecvt.cc can have _S_max_size definition.
588+#define _GLIBCPP_USE___ENC_TRAITS 1
589+
590+ // Extension to use icov for dealing with character encodings,
591+ // including conversions and comparisons between various character
592+ // sets. This object encapsulates data that may need to be shared between
593+ // char_traits, codecvt and ctype.
594+ class __enc_traits
595+ {
596+ public:
597+ // Types:
598+ // NB: A conversion descriptor subsumes and enhances the
599+ // functionality of a simple state type such as mbstate_t.
600+ typedef iconv_t __desc_type;
601+
602+ protected:
603+ // Data Members:
604+ // Max size of charset encoding name
605+ static const int _S_max_size = 32;
606+ // Name of internal character set encoding.
607+ char _M_int_enc[_S_max_size];
608+ // Name of external character set encoding.
609+ char _M_ext_enc[_S_max_size];
610+
611+ // Conversion descriptor between external encoding to internal encoding.
612+ __desc_type _M_in_desc;
613+ // Conversion descriptor between internal encoding to external encoding.
614+ __desc_type _M_out_desc;
615+
616+ // Details the byte-order marker for the external encoding, if necessary.
617+ int _M_ext_bom;
618+
619+ // Details the byte-order marker for the internal encoding, if necessary.
620+ int _M_int_bom;
621+
622+ public:
623+ explicit __enc_traits()
624+ : _M_in_desc(0), _M_out_desc(0), _M_ext_bom(0), _M_int_bom(0)
625+ {
626+ memset(_M_int_enc, 0, _S_max_size);
627+ memset(_M_ext_enc, 0, _S_max_size);
628+ }
629+
630+ explicit __enc_traits(const char* __int, const char* __ext,
631+ int __ibom = 0, int __ebom = 0)
632+ : _M_in_desc(0), _M_out_desc(0), _M_ext_bom(0), _M_int_bom(0)
633+ {
634+ strncpy(_M_int_enc, __int, _S_max_size);
635+ strncpy(_M_ext_enc, __ext, _S_max_size);
636+ }
637+
638+ // 21.1.2 traits typedefs
639+ // p4
640+ // typedef STATE_T state_type
641+ // requires: state_type shall meet the requirements of
642+ // CopyConstructible types (20.1.3)
643+ __enc_traits(const __enc_traits& __obj): _M_in_desc(0), _M_out_desc(0)
644+ {
645+ strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size);
646+ strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size);
647+ _M_ext_bom = __obj._M_ext_bom;
648+ _M_int_bom = __obj._M_int_bom;
649+ }
650+
651+ // Need assignment operator as well.
652+ __enc_traits&
653+ operator=(const __enc_traits& __obj)
654+ {
655+ strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size);
656+ strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size);
657+ _M_in_desc = 0;
658+ _M_out_desc = 0;
659+ _M_ext_bom = __obj._M_ext_bom;
660+ _M_int_bom = __obj._M_int_bom;
661+ return *this;
662+ }
663+
664+ ~__enc_traits()
665+ {
666+ __desc_type __err = reinterpret_cast<iconv_t>(-1);
667+ if (_M_in_desc && _M_in_desc != __err)
668+ iconv_close(_M_in_desc);
669+ if (_M_out_desc && _M_out_desc != __err)
670+ iconv_close(_M_out_desc);
671+ }
672+
673+ void
674+ _M_init()
675+ {
676+ const __desc_type __err = reinterpret_cast<iconv_t>(-1);
677+ if (!_M_in_desc)
678+ {
679+ _M_in_desc = iconv_open(_M_int_enc, _M_ext_enc);
680+ if (_M_in_desc == __err)
681+ __throw_runtime_error("creating iconv input descriptor failed.");
682+ }
683+ if (!_M_out_desc)
684+ {
685+ _M_out_desc = iconv_open(_M_ext_enc, _M_int_enc);
686+ if (_M_out_desc == __err)
687+ __throw_runtime_error("creating iconv output descriptor failed.");
688+ }
689+ }
690+
691+ bool
692+ _M_good()
693+ {
694+ const __desc_type __err = reinterpret_cast<iconv_t>(-1);
695+ bool __test = _M_in_desc && _M_in_desc != __err;
696+ __test &= _M_out_desc && _M_out_desc != __err;
697+ return __test;
698+ }
699+
700+ const __desc_type*
701+ _M_get_in_descriptor()
702+ { return &_M_in_desc; }
703+
704+ const __desc_type*
705+ _M_get_out_descriptor()
706+ { return &_M_out_desc; }
707+
708+ int
709+ _M_get_external_bom()
710+ { return _M_ext_bom; }
711+
712+ int
713+ _M_get_internal_bom()
714+ { return _M_int_bom; }
715+
716+ const char*
717+ _M_get_internal_enc()
718+ { return _M_int_enc; }
719+
720+ const char*
721+ _M_get_external_enc()
722+ { return _M_ext_enc; }
723+ };
724+
725+ // Partial specialization
726+ // This specialization takes advantage of iconv to provide code
727+ // conversions between a large number of character encodings.
728+ template<typename _InternT, typename _ExternT>
729+ class codecvt<_InternT, _ExternT, __enc_traits>
730+ : public __codecvt_abstract_base<_InternT, _ExternT, __enc_traits>
731+ {
732+ public:
733+ // Types:
734+ typedef codecvt_base::result result;
735+ typedef _InternT intern_type;
736+ typedef _ExternT extern_type;
737+ typedef __enc_traits state_type;
738+ typedef __enc_traits::__desc_type __desc_type;
739+ typedef __enc_traits __enc_type;
740+
741+ // Data Members:
742+ static locale::id id;
743+
744+ explicit
745+ codecvt(size_t __refs = 0)
746+ : __codecvt_abstract_base<intern_type, extern_type, state_type>(__refs)
747+ { }
748+
749+ explicit
750+ codecvt(__enc_type* __enc, size_t __refs = 0)
751+ : __codecvt_abstract_base<intern_type, extern_type, state_type>(__refs)
752+ { }
753+
754+ protected:
755+ virtual
756+ ~codecvt() { }
757+
758+ virtual result
759+ do_out(state_type& __state, const intern_type* __from,
760+ const intern_type* __from_end, const intern_type*& __from_next,
761+ extern_type* __to, extern_type* __to_end,
762+ extern_type*& __to_next) const;
763+
764+ virtual result
765+ do_unshift(state_type& __state, extern_type* __to,
766+ extern_type* __to_end, extern_type*& __to_next) const;
767+
768+ virtual result
769+ do_in(state_type& __state, const extern_type* __from,
770+ const extern_type* __from_end, const extern_type*& __from_next,
771+ intern_type* __to, intern_type* __to_end,
772+ intern_type*& __to_next) const;
773+
774+ virtual int
775+ do_encoding() const throw();
776+
777+ virtual bool
778+ do_always_noconv() const throw();
779+
780+ virtual int
781+ do_length(const state_type&, const extern_type* __from,
782+ const extern_type* __end, size_t __max) const;
783+
784+ virtual int
785+ do_max_length() const throw();
786+ };
787+
788+ template<typename _InternT, typename _ExternT>
789+ locale::id
790+ codecvt<_InternT, _ExternT, __enc_traits>::id;
791+
792+ // This adaptor works around the signature problems of the second
793+ // argument to iconv(): SUSv2 and others use 'const char**', but glibc 2.2
794+ // uses 'char**', which matches the POSIX 1003.1-2001 standard.
795+ // Using this adaptor, g++ will do the work for us.
796+ template<typename _T>
797+ inline size_t
798+ __iconv_adaptor(size_t(*__func)(iconv_t, _T, size_t*, char**, size_t*),
799+ iconv_t __cd, char** __inbuf, size_t* __inbytes,
800+ char** __outbuf, size_t* __outbytes)
801+ { return __func(__cd, (_T)__inbuf, __inbytes, __outbuf, __outbytes); }
802+
803+ template<typename _InternT, typename _ExternT>
804+ codecvt_base::result
805+ codecvt<_InternT, _ExternT, __enc_traits>::
806+ do_out(state_type& __state, const intern_type* __from,
807+ const intern_type* __from_end, const intern_type*& __from_next,
808+ extern_type* __to, extern_type* __to_end,
809+ extern_type*& __to_next) const
810+ {
811+ result __ret = codecvt_base::error;
812+ if (__state._M_good())
813+ {
814+ typedef state_type::__desc_type __desc_type;
815+ const __desc_type* __desc = __state._M_get_out_descriptor();
816+ const size_t __fmultiple = sizeof(intern_type);
817+ size_t __fbytes = __fmultiple * (__from_end - __from);
818+ const size_t __tmultiple = sizeof(extern_type);
819+ size_t __tbytes = __tmultiple * (__to_end - __to);
820+
821+ // Argument list for iconv specifies a byte sequence. Thus,
822+ // all to/from arrays must be brutally casted to char*.
823+ char* __cto = reinterpret_cast<char*>(__to);
824+ char* __cfrom;
825+ size_t __conv;
826+
827+ // Some encodings need a byte order marker as the first item
828+ // in the byte stream, to designate endian-ness. The default
829+ // value for the byte order marker is NULL, so if this is
830+ // the case, it's not necessary and we can just go on our
831+ // merry way.
832+ int __int_bom = __state._M_get_internal_bom();
833+ if (__int_bom)
834+ {
835+ size_t __size = __from_end - __from;
836+ intern_type* __cfixed = static_cast<intern_type*>(__builtin_alloca(sizeof(intern_type) * (__size + 1)));
837+ __cfixed[0] = static_cast<intern_type>(__int_bom);
838+ char_traits<intern_type>::copy(__cfixed + 1, __from, __size);
839+ __cfrom = reinterpret_cast<char*>(__cfixed);
840+ __conv = __iconv_adaptor(iconv, *__desc, &__cfrom,
841+ &__fbytes, &__cto, &__tbytes);
842+ }
843+ else
844+ {
845+ intern_type* __cfixed = const_cast<intern_type*>(__from);
846+ __cfrom = reinterpret_cast<char*>(__cfixed);
847+ __conv = __iconv_adaptor(iconv, *__desc, &__cfrom, &__fbytes,
848+ &__cto, &__tbytes);
849+ }
850+
851+ if (__conv != size_t(-1))
852+ {
853+ __from_next = reinterpret_cast<const intern_type*>(__cfrom);
854+ __to_next = reinterpret_cast<extern_type*>(__cto);
855+ __ret = codecvt_base::ok;
856+ }
857+ else
858+ {
859+ if (__fbytes < __fmultiple * (__from_end - __from))
860+ {
861+ __from_next = reinterpret_cast<const intern_type*>(__cfrom);
862+ __to_next = reinterpret_cast<extern_type*>(__cto);
863+ __ret = codecvt_base::partial;
864+ }
865+ else
866+ __ret = codecvt_base::error;
867+ }
868+ }
869+ return __ret;
870+ }
871+
872+ template<typename _InternT, typename _ExternT>
873+ codecvt_base::result
874+ codecvt<_InternT, _ExternT, __enc_traits>::
875+ do_unshift(state_type& __state, extern_type* __to,
876+ extern_type* __to_end, extern_type*& __to_next) const
877+ {
878+ result __ret = codecvt_base::error;
879+ if (__state._M_good())
880+ {
881+ typedef state_type::__desc_type __desc_type;
882+ const __desc_type* __desc = __state._M_get_in_descriptor();
883+ const size_t __tmultiple = sizeof(intern_type);
884+ size_t __tlen = __tmultiple * (__to_end - __to);
885+
886+ // Argument list for iconv specifies a byte sequence. Thus,
887+ // all to/from arrays must be brutally casted to char*.
888+ char* __cto = reinterpret_cast<char*>(__to);
889+ size_t __conv = __iconv_adaptor(iconv,*__desc, NULL, NULL,
890+ &__cto, &__tlen);
891+
892+ if (__conv != size_t(-1))
893+ {
894+ __to_next = reinterpret_cast<extern_type*>(__cto);
895+ if (__tlen == __tmultiple * (__to_end - __to))
896+ __ret = codecvt_base::noconv;
897+ else if (__tlen == 0)
898+ __ret = codecvt_base::ok;
899+ else
900+ __ret = codecvt_base::partial;
901+ }
902+ else
903+ __ret = codecvt_base::error;
904+ }
905+ return __ret;
906+ }
907+
908+ template<typename _InternT, typename _ExternT>
909+ codecvt_base::result
910+ codecvt<_InternT, _ExternT, __enc_traits>::
911+ do_in(state_type& __state, const extern_type* __from,
912+ const extern_type* __from_end, const extern_type*& __from_next,
913+ intern_type* __to, intern_type* __to_end,
914+ intern_type*& __to_next) const
915+ {
916+ result __ret = codecvt_base::error;
917+ if (__state._M_good())
918+ {
919+ typedef state_type::__desc_type __desc_type;
920+ const __desc_type* __desc = __state._M_get_in_descriptor();
921+ const size_t __fmultiple = sizeof(extern_type);
922+ size_t __flen = __fmultiple * (__from_end - __from);
923+ const size_t __tmultiple = sizeof(intern_type);
924+ size_t __tlen = __tmultiple * (__to_end - __to);
925+
926+ // Argument list for iconv specifies a byte sequence. Thus,
927+ // all to/from arrays must be brutally casted to char*.
928+ char* __cto = reinterpret_cast<char*>(__to);
929+ char* __cfrom;
930+ size_t __conv;
931+
932+ // Some encodings need a byte order marker as the first item
933+ // in the byte stream, to designate endian-ness. The default
934+ // value for the byte order marker is NULL, so if this is
935+ // the case, it's not necessary and we can just go on our
936+ // merry way.
937+ int __ext_bom = __state._M_get_external_bom();
938+ if (__ext_bom)
939+ {
940+ size_t __size = __from_end - __from;
941+ extern_type* __cfixed = static_cast<extern_type*>(__builtin_alloca(sizeof(extern_type) * (__size + 1)));
942+ __cfixed[0] = static_cast<extern_type>(__ext_bom);
943+ char_traits<extern_type>::copy(__cfixed + 1, __from, __size);
944+ __cfrom = reinterpret_cast<char*>(__cfixed);
945+ __conv = __iconv_adaptor(iconv, *__desc, &__cfrom,
946+ &__flen, &__cto, &__tlen);
947+ }
948+ else
949+ {
950+ extern_type* __cfixed = const_cast<extern_type*>(__from);
951+ __cfrom = reinterpret_cast<char*>(__cfixed);
952+ __conv = __iconv_adaptor(iconv, *__desc, &__cfrom,
953+ &__flen, &__cto, &__tlen);
954+ }
955+
956+
957+ if (__conv != size_t(-1))
958+ {
959+ __from_next = reinterpret_cast<const extern_type*>(__cfrom);
960+ __to_next = reinterpret_cast<intern_type*>(__cto);
961+ __ret = codecvt_base::ok;
962+ }
963+ else
964+ {
965+ if (__flen < static_cast<size_t>(__from_end - __from))
966+ {
967+ __from_next = reinterpret_cast<const extern_type*>(__cfrom);
968+ __to_next = reinterpret_cast<intern_type*>(__cto);
969+ __ret = codecvt_base::partial;
970+ }
971+ else
972+ __ret = codecvt_base::error;
973+ }
974+ }
975+ return __ret;
976+ }
977+
978+ template<typename _InternT, typename _ExternT>
979+ int
980+ codecvt<_InternT, _ExternT, __enc_traits>::
981+ do_encoding() const throw()
982+ {
983+ int __ret = 0;
984+ if (sizeof(_ExternT) <= sizeof(_InternT))
985+ __ret = sizeof(_InternT)/sizeof(_ExternT);
986+ return __ret;
987+ }
988+
989+ template<typename _InternT, typename _ExternT>
990+ bool
991+ codecvt<_InternT, _ExternT, __enc_traits>::
992+ do_always_noconv() const throw()
993+ { return false; }
994+
995+ template<typename _InternT, typename _ExternT>
996+ int
997+ codecvt<_InternT, _ExternT, __enc_traits>::
998+ do_length(const state_type&, const extern_type* __from,
999+ const extern_type* __end, size_t __max) const
1000+ { return min(__max, static_cast<size_t>(__end - __from)); }
1001+
1002+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
1003+// 74. Garbled text for codecvt::do_max_length
1004+ template<typename _InternT, typename _ExternT>
1005+ int
1006+ codecvt<_InternT, _ExternT, __enc_traits>::
1007+ do_max_length() const throw()
1008+ { return 1; }
1009+#endif
1010diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/collate_members.cc
1011--- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/collate_members.cc 1969-12-31 18:00:00.000000000 -0600
1012+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/collate_members.cc 2004-01-09 08:06:24.000000000 -0600
1013@@ -0,0 +1,80 @@
1014+// std::collate implementation details, GNU version -*- C++ -*-
1015+
1016+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
1017+//
1018+// This file is part of the GNU ISO C++ Library. This library is free
1019+// software; you can redistribute it and/or modify it under the
1020+// terms of the GNU General Public License as published by the
1021+// Free Software Foundation; either version 2, or (at your option)
1022+// any later version.
1023+
1024+// This library is distributed in the hope that it will be useful,
1025+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1026+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1027+// GNU General Public License for more details.
1028+
1029+// You should have received a copy of the GNU General Public License along
1030+// with this library; see the file COPYING. If not, write to the Free
1031+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1032+// USA.
1033+
1034+// As a special exception, you may use this file as part of a free software
1035+// library without restriction. Specifically, if other files instantiate
1036+// templates or use macros or inline functions from this file, or you compile
1037+// this file and link it with other files to produce an executable, this
1038+// file does not by itself cause the resulting executable to be covered by
1039+// the GNU General Public License. This exception does not however
1040+// invalidate any other reasons why the executable file might be covered by
1041+// the GNU General Public License.
1042+
1043+//
1044+// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
1045+//
1046+
1047+// Written by Benjamin Kosnik <bkoz@redhat.com>
1048+
1049+#include <locale>
1050+#include <bits/c++locale_internal.h>
1051+
1052+#ifndef __UCLIBC_HAS_XLOCALE__
1053+#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
1054+#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
1055+#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
1056+#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
1057+#endif
1058+
1059+namespace std
1060+{
1061+ // These are basically extensions to char_traits, and perhaps should
1062+ // be put there instead of here.
1063+ template<>
1064+ int
1065+ collate<char>::_M_compare(const char* __one, const char* __two) const
1066+ {
1067+ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
1068+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
1069+ }
1070+
1071+ template<>
1072+ size_t
1073+ collate<char>::_M_transform(char* __to, const char* __from,
1074+ size_t __n) const
1075+ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
1076+
1077+#ifdef _GLIBCPP_USE_WCHAR_T
1078+ template<>
1079+ int
1080+ collate<wchar_t>::_M_compare(const wchar_t* __one,
1081+ const wchar_t* __two) const
1082+ {
1083+ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
1084+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
1085+ }
1086+
1087+ template<>
1088+ size_t
1089+ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
1090+ size_t __n) const
1091+ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
1092+#endif
1093+}
1094diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/ctype_members.cc
1095--- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/ctype_members.cc 1969-12-31 18:00:00.000000000 -0600
1096+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2004-01-09 08:15:41.000000000 -0600
1097@@ -0,0 +1,274 @@
1098+// std::ctype implementation details, GNU version -*- C++ -*-
1099+
1100+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
1101+//
1102+// This file is part of the GNU ISO C++ Library. This library is free
1103+// software; you can redistribute it and/or modify it under the
1104+// terms of the GNU General Public License as published by the
1105+// Free Software Foundation; either version 2, or (at your option)
1106+// any later version.
1107+
1108+// This library is distributed in the hope that it will be useful,
1109+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1110+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1111+// GNU General Public License for more details.
1112+
1113+// You should have received a copy of the GNU General Public License along
1114+// with this library; see the file COPYING. If not, write to the Free
1115+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1116+// USA.
1117+
1118+// As a special exception, you may use this file as part of a free software
1119+// library without restriction. Specifically, if other files instantiate
1120+// templates or use macros or inline functions from this file, or you compile
1121+// this file and link it with other files to produce an executable, this
1122+// file does not by itself cause the resulting executable to be covered by
1123+// the GNU General Public License. This exception does not however
1124+// invalidate any other reasons why the executable file might be covered by
1125+// the GNU General Public License.
1126+
1127+//
1128+// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
1129+//
1130+
1131+// Written by Benjamin Kosnik <bkoz@redhat.com>
1132+
1133+#define _LIBC
1134+#include <locale>
1135+#undef _LIBC
1136+#include <bits/c++locale_internal.h>
1137+
1138+#ifndef __UCLIBC_HAS_XLOCALE__
1139+#define __wctype_l(S, L) wctype((S))
1140+#define __towupper_l(C, L) towupper((C))
1141+#define __towlower_l(C, L) towlower((C))
1142+#define __iswctype_l(C, M, L) iswctype((C), (M))
1143+#endif
1144+
1145+namespace std
1146+{
1147+ // NB: The other ctype<char> specializations are in src/locale.cc and
1148+ // various /config/os/* files.
1149+ template<>
1150+ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
1151+ : ctype<char>(0, false, __refs)
1152+ {
1153+ _S_destroy_c_locale(_M_c_locale_ctype);
1154+ _S_create_c_locale(_M_c_locale_ctype, __s);
1155+#ifdef __UCLIBC_HAS_XLOCALE__
1156+ _M_toupper = _M_c_locale_ctype->__ctype_toupper;
1157+ _M_tolower = _M_c_locale_ctype->__ctype_tolower;
1158+ _M_table = _M_c_locale_ctype->__ctype_b;
1159+#endif
1160+ }
1161+
1162+#ifdef _GLIBCPP_USE_WCHAR_T
1163+ ctype<wchar_t>::__wmask_type
1164+ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
1165+ {
1166+ __wmask_type __ret;
1167+ switch (__m)
1168+ {
1169+ case space:
1170+ __ret = __wctype_l("space", _M_c_locale_ctype);
1171+ break;
1172+ case print:
1173+ __ret = __wctype_l("print", _M_c_locale_ctype);
1174+ break;
1175+ case cntrl:
1176+ __ret = __wctype_l("cntrl", _M_c_locale_ctype);
1177+ break;
1178+ case upper:
1179+ __ret = __wctype_l("upper", _M_c_locale_ctype);
1180+ break;
1181+ case lower:
1182+ __ret = __wctype_l("lower", _M_c_locale_ctype);
1183+ break;
1184+ case alpha:
1185+ __ret = __wctype_l("alpha", _M_c_locale_ctype);
1186+ break;
1187+ case digit:
1188+ __ret = __wctype_l("digit", _M_c_locale_ctype);
1189+ break;
1190+ case punct:
1191+ __ret = __wctype_l("punct", _M_c_locale_ctype);
1192+ break;
1193+ case xdigit:
1194+ __ret = __wctype_l("xdigit", _M_c_locale_ctype);
1195+ break;
1196+ case alnum:
1197+ __ret = __wctype_l("alnum", _M_c_locale_ctype);
1198+ break;
1199+ case graph:
1200+ __ret = __wctype_l("graph", _M_c_locale_ctype);
1201+ break;
1202+ default:
1203+ __ret = 0;
1204+ }
1205+ return __ret;
1206+ };
1207+
1208+ wchar_t
1209+ ctype<wchar_t>::do_toupper(wchar_t __c) const
1210+ { return __towupper_l(__c, _M_c_locale_ctype); }
1211+
1212+ const wchar_t*
1213+ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
1214+ {
1215+ while (__lo < __hi)
1216+ {
1217+ *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
1218+ ++__lo;
1219+ }
1220+ return __hi;
1221+ }
1222+
1223+ wchar_t
1224+ ctype<wchar_t>::do_tolower(wchar_t __c) const
1225+ { return __towlower_l(__c, _M_c_locale_ctype); }
1226+
1227+ const wchar_t*
1228+ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
1229+ {
1230+ while (__lo < __hi)
1231+ {
1232+ *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
1233+ ++__lo;
1234+ }
1235+ return __hi;
1236+ }
1237+
1238+ bool
1239+ ctype<wchar_t>::
1240+ do_is(mask __m, wchar_t __c) const
1241+ {
1242+ // Highest bitmask in ctype_base == 10, but extra in "C"
1243+ // library for blank.
1244+ bool __ret = false;
1245+ const size_t __bitmasksize = 11;
1246+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
1247+ {
1248+ const mask __bit = static_cast<mask>(_ISbit(__bitcur));
1249+ if (__m & __bit)
1250+ __ret |= __iswctype_l(__c, _M_convert_to_wmask(__bit),
1251+ _M_c_locale_ctype);
1252+ }
1253+ return __ret;
1254+ }
1255+
1256+ const wchar_t*
1257+ ctype<wchar_t>::
1258+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
1259+ {
1260+ for (;__lo < __hi; ++__vec, ++__lo)
1261+ {
1262+ // Highest bitmask in ctype_base == 10, but extra in "C"
1263+ // library for blank.
1264+ const size_t __bitmasksize = 11;
1265+ mask __m = 0;
1266+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
1267+ {
1268+ const mask __bit = static_cast<mask>(_ISbit(__bitcur));
1269+ if (__iswctype_l(*__lo, _M_convert_to_wmask(__bit),
1270+ _M_c_locale_ctype))
1271+ __m |= __bit;
1272+ }
1273+ *__vec = __m;
1274+ }
1275+ return __hi;
1276+ }
1277+
1278+ const wchar_t*
1279+ ctype<wchar_t>::
1280+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
1281+ {
1282+ while (__lo < __hi && !this->do_is(__m, *__lo))
1283+ ++__lo;
1284+ return __lo;
1285+ }
1286+
1287+ const wchar_t*
1288+ ctype<wchar_t>::
1289+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
1290+ {
1291+ while (__lo < __hi && this->do_is(__m, *__lo) != 0)
1292+ ++__lo;
1293+ return __lo;
1294+ }
1295+
1296+ wchar_t
1297+ ctype<wchar_t>::
1298+ do_widen(char __c) const
1299+ {
1300+#ifdef __UCLIBC_HAS_XLOCALE__
1301+ __c_locale __old = __uselocale(_M_c_locale_ctype);
1302+#endif
1303+ wchar_t __ret = btowc(__c);
1304+#ifdef __UCLIBC_HAS_XLOCALE__
1305+ __uselocale(__old);
1306+#endif
1307+ return __ret;
1308+ }
1309+
1310+ const char*
1311+ ctype<wchar_t>::
1312+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
1313+ {
1314+#ifdef __UCLIBC_HAS_XLOCALE__
1315+ __c_locale __old = __uselocale(_M_c_locale_ctype);
1316+#endif
1317+ mbstate_t __state;
1318+ memset(static_cast<void*>(&__state), 0, sizeof(mbstate_t));
1319+ mbsrtowcs(__dest, &__lo, __hi - __lo, &__state);
1320+#ifdef __UCLIBC_HAS_XLOCALE__
1321+ __uselocale(__old);
1322+#endif
1323+ return __hi;
1324+ }
1325+
1326+ char
1327+ ctype<wchar_t>::
1328+ do_narrow(wchar_t __wc, char __dfault) const
1329+ {
1330+#ifdef __UCLIBC_HAS_XLOCALE__
1331+ __c_locale __old = __uselocale(_M_c_locale_ctype);
1332+#endif
1333+ int __c = wctob(__wc);
1334+#ifdef __UCLIBC_HAS_XLOCALE__
1335+ __uselocale(__old);
1336+#endif
1337+ return (__c == EOF ? __dfault : static_cast<char>(__c));
1338+ }
1339+
1340+ const wchar_t*
1341+ ctype<wchar_t>::
1342+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
1343+ char* __dest) const
1344+ {
1345+#ifdef __UCLIBC_HAS_XLOCALE__
1346+ __c_locale __old = __uselocale(_M_c_locale_ctype);
1347+#endif
1348+ size_t __offset = 0;
1349+ while (true)
1350+ {
1351+ const wchar_t* __start = __lo + __offset;
1352+ size_t __len = __hi - __start;
1353+
1354+ mbstate_t __state;
1355+ memset(static_cast<void*>(&__state), 0, sizeof(mbstate_t));
1356+ size_t __con = wcsrtombs(__dest + __offset, &__start, __len, &__state);
1357+ if (__con != __len && __start != 0)
1358+ {
1359+ __offset = __start - __lo;
1360+ __dest[__offset++] = __dfault;
1361+ }
1362+ else
1363+ break;
1364+ }
1365+#ifdef __UCLIBC_HAS_XLOCALE__
1366+ __uselocale(__old);
1367+#endif
1368+ return __hi;
1369+ }
1370+#endif // _GLIBCPP_USE_WCHAR_T
1371+}
1372diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/messages_members.cc
1373--- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/messages_members.cc 1969-12-31 18:00:00.000000000 -0600
1374+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/messages_members.cc 2004-01-09 08:46:16.000000000 -0600
1375@@ -0,0 +1,100 @@
1376+// std::messages implementation details, GNU version -*- C++ -*-
1377+
1378+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
1379+//
1380+// This file is part of the GNU ISO C++ Library. This library is free
1381+// software; you can redistribute it and/or modify it under the
1382+// terms of the GNU General Public License as published by the
1383+// Free Software Foundation; either version 2, or (at your option)
1384+// any later version.
1385+
1386+// This library is distributed in the hope that it will be useful,
1387+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1388+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1389+// GNU General Public License for more details.
1390+
1391+// You should have received a copy of the GNU General Public License along
1392+// with this library; see the file COPYING. If not, write to the Free
1393+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1394+// USA.
1395+
1396+// As a special exception, you may use this file as part of a free software
1397+// library without restriction. Specifically, if other files instantiate
1398+// templates or use macros or inline functions from this file, or you compile
1399+// this file and link it with other files to produce an executable, this
1400+// file does not by itself cause the resulting executable to be covered by
1401+// the GNU General Public License. This exception does not however
1402+// invalidate any other reasons why the executable file might be covered by
1403+// the GNU General Public License.
1404+
1405+//
1406+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
1407+//
1408+
1409+// Written by Benjamin Kosnik <bkoz@redhat.com>
1410+
1411+#include <locale>
1412+#include <bits/c++locale_internal.h>
1413+
1414+#ifdef __UCLIBC_MJN3_ONLY__
1415+#warning fix gettext stuff
1416+#endif
1417+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
1418+extern "C" char *__dcgettext(const char *domainname,
1419+ const char *msgid, int category);
1420+#undef gettext
1421+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
1422+#else
1423+#undef gettext
1424+#define gettext(msgid) (msgid)
1425+#endif
1426+
1427+namespace std
1428+{
1429+ // Specializations.
1430+ template<>
1431+ string
1432+ messages<char>::do_get(catalog, int, int, const string& __dfault) const
1433+ {
1434+#ifdef __UCLIBC_HAS_XLOCALE__
1435+ __c_locale __old = __uselocale(_M_c_locale_messages);
1436+ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
1437+ __uselocale(__old);
1438+ return string(__msg);
1439+#elif defined __UCLIBC_HAS_LOCALE__
1440+ char* __old = strdup(setlocale(LC_ALL, NULL));
1441+ setlocale(LC_ALL, _M_name_messages);
1442+ const char* __msg = gettext(__dfault.c_str());
1443+ setlocale(LC_ALL, __old);
1444+ free(__old);
1445+ return string(__msg);
1446+#else
1447+ const char* __msg = gettext(__dfault.c_str());
1448+ return string(__msg);
1449+#endif
1450+ }
1451+
1452+#ifdef _GLIBCPP_USE_WCHAR_T
1453+ template<>
1454+ wstring
1455+ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
1456+ {
1457+#ifdef __UCLIBC_HAS_XLOCALE__
1458+ __c_locale __old = __uselocale(_M_c_locale_messages);
1459+ char* __msg = gettext(_M_convert_to_char(__dfault));
1460+ __uselocale(__old);
1461+ return _M_convert_from_char(__msg);
1462+#elif defined __UCLIBC_HAS_LOCALE__
1463+ char* __old = strdup(setlocale(LC_ALL, NULL));
1464+ setlocale(LC_ALL, _M_name_messages);
1465+ char* __msg = gettext(_M_convert_to_char(__dfault));
1466+ setlocale(LC_ALL, __old);
1467+ free(__old);
1468+ return _M_convert_from_char(__msg);
1469+# else
1470+ char* __msg = gettext(_M_convert_to_char(__dfault));
1471+ return _M_convert_from_char(__msg);
1472+# endif
1473+ }
1474+#endif
1475+}
1476diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/messages_members.h
1477--- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/messages_members.h 1969-12-31 18:00:00.000000000 -0600
1478+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/messages_members.h 2004-01-09 08:52:48.000000000 -0600
1479@@ -0,0 +1,122 @@
1480+// std::messages implementation details, GNU version -*- C++ -*-
1481+
1482+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
1483+//
1484+// This file is part of the GNU ISO C++ Library. This library is free
1485+// software; you can redistribute it and/or modify it under the
1486+// terms of the GNU General Public License as published by the
1487+// Free Software Foundation; either version 2, or (at your option)
1488+// any later version.
1489+
1490+// This library is distributed in the hope that it will be useful,
1491+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1492+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1493+// GNU General Public License for more details.
1494+
1495+// You should have received a copy of the GNU General Public License along
1496+// with this library; see the file COPYING. If not, write to the Free
1497+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1498+// USA.
1499+
1500+// As a special exception, you may use this file as part of a free software
1501+// library without restriction. Specifically, if other files instantiate
1502+// templates or use macros or inline functions from this file, or you compile
1503+// this file and link it with other files to produce an executable, this
1504+// file does not by itself cause the resulting executable to be covered by
1505+// the GNU General Public License. This exception does not however
1506+// invalidate any other reasons why the executable file might be covered by
1507+// the GNU General Public License.
1508+
1509+//
1510+// ISO C++ 14882: 22.2.7.1.2 messages functions
1511+//
1512+
1513+// Written by Benjamin Kosnik <bkoz@redhat.com>
1514+
1515+#ifdef __UCLIBC_MJN3_ONLY__
1516+#warning fix prototypes for *textdomain funcs
1517+#endif
1518+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
1519+extern "C" char *__textdomain(const char *domainname);
1520+extern "C" char *__bindtextdomain(const char *domainname,
1521+ const char *dirname);
1522+#else
1523+#undef __textdomain
1524+#undef __bindtextdomain
1525+#define __textdomain(D) ((void)0)
1526+#define __bindtextdomain(D,P) ((void)0)
1527+#endif
1528+
1529+ // Non-virtual member functions.
1530+ template<typename _CharT>
1531+ messages<_CharT>::messages(size_t __refs)
1532+ : locale::facet(__refs)
1533+ {
1534+#ifndef __UCLIBC_HAS_XLOCALE__
1535+ _M_name_messages = _S_c_name;
1536+#endif
1537+ _M_c_locale_messages = _S_c_locale;
1538+ }
1539+
1540+ template<typename _CharT>
1541+ messages<_CharT>::messages(__c_locale __cloc,
1542+ const char* __s, size_t __refs)
1543+ : locale::facet(__refs)
1544+ {
1545+#ifndef __UCLIBC_HAS_XLOCALE__
1546+ _M_name_messages = new char[strlen(__s) + 1];
1547+ strcpy(_M_name_messages, __s);
1548+#endif
1549+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
1550+ }
1551+
1552+ template<typename _CharT>
1553+ typename messages<_CharT>::catalog
1554+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
1555+ const char* __dir) const
1556+ {
1557+ __bindtextdomain(__s.c_str(), __dir);
1558+ return this->do_open(__s, __loc);
1559+ }
1560+
1561+ // Virtual member functions.
1562+ template<typename _CharT>
1563+ messages<_CharT>::~messages()
1564+ {
1565+#ifndef __UCLIBC_HAS_XLOCALE__
1566+ if (_S_c_name != _M_name_messages)
1567+ delete [] _M_name_messages;
1568+#endif
1569+ _S_destroy_c_locale(_M_c_locale_messages);
1570+ }
1571+
1572+ template<typename _CharT>
1573+ typename messages<_CharT>::catalog
1574+ messages<_CharT>::do_open(const basic_string<char>& __s,
1575+ const locale&) const
1576+ {
1577+ // No error checking is done, assume the catalog exists and can
1578+ // be used.
1579+ __textdomain(__s.c_str());
1580+ return 0;
1581+ }
1582+
1583+ template<typename _CharT>
1584+ void
1585+ messages<_CharT>::do_close(catalog) const
1586+ { }
1587+
1588+ // messages_byname
1589+ template<typename _CharT>
1590+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
1591+ : messages<_CharT>(__refs)
1592+ {
1593+#ifndef __UCLIBC_HAS_XLOCALE__
1594+ if (_S_c_name != _M_name_messages)
1595+ delete [] _M_name_messages;
1596+ _M_name_messages = new char[strlen(__s) + 1];
1597+ strcpy(_M_name_messages, __s);
1598+#endif
1599+ _S_destroy_c_locale(_M_c_locale_messages);
1600+ _S_create_c_locale(_M_c_locale_messages, __s);
1601+ }
1602diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/monetary_members.cc
1603--- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/monetary_members.cc 1969-12-31 18:00:00.000000000 -0600
1604+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2004-01-09 18:20:23.000000000 -0600
1605@@ -0,0 +1,578 @@
1606+// std::moneypunct implementation details, GNU version -*- C++ -*-
1607+
1608+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
1609+//
1610+// This file is part of the GNU ISO C++ Library. This library is free
1611+// software; you can redistribute it and/or modify it under the
1612+// terms of the GNU General Public License as published by the
1613+// Free Software Foundation; either version 2, or (at your option)
1614+// any later version.
1615+
1616+// This library is distributed in the hope that it will be useful,
1617+// but WITHOUT ANY WARRANTY; without even the implied warranty of
1618+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1619+// GNU General Public License for more details.
1620+
1621+// You should have received a copy of the GNU General Public License along
1622+// with this library; see the file COPYING. If not, write to the Free
1623+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1624+// USA.
1625+
1626+// As a special exception, you may use this file as part of a free software
1627+// library without restriction. Specifically, if other files instantiate
1628+// templates or use macros or inline functions from this file, or you compile
1629+// this file and link it with other files to produce an executable, this
1630+// file does not by itself cause the resulting executable to be covered by
1631+// the GNU General Public License. This exception does not however
1632+// invalidate any other reasons why the executable file might be covered by
1633+// the GNU General Public License.
1634+
1635+//
1636+// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
1637+//
1638+
1639+// Written by Benjamin Kosnik <bkoz@redhat.com>
1640+
1641+#define _LIBC
1642+#include <locale>
1643+#undef _LIBC
1644+#include <bits/c++locale_internal.h>
1645+
1646+#ifdef __UCLIBC_MJN3_ONLY__
1647+#warning optimize this for uclibc
1648+#warning tailor for stub locale support
1649+#endif
1650+
1651+#ifndef __UCLIBC_HAS_XLOCALE__
1652+#define __nl_langinfo_l(N, L) nl_langinfo((N))
1653+#endif
1654+
1655+namespace std
1656+{
1657+ // Construct and return valid pattern consisting of some combination of:
1658+ // space none symbol sign value
1659+ money_base::pattern
1660+ money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
1661+ {
1662+ pattern __ret;
1663+
1664+ // This insanely complicated routine attempts to construct a valid
1665+ // pattern for use with monyepunct. A couple of invariants:
1666+
1667+ // if (__precedes) symbol -> value
1668+ // else value -> symbol
1669+
1670+ // if (__space) space
1671+ // else none
1672+
1673+ // none == never first
1674+ // space never first or last
1675+
1676+ // Any elegant implementations of this are welcome.
1677+ switch (__posn)
1678+ {
1679+ case 0:
1680+ case 1:
1681+ // 1 The sign precedes the value and symbol.
1682+ if (__space)
1683+ {
1684+ // Pattern starts with sign.
1685+ if (__precedes)
1686+ {
1687+ __ret.field[1] = symbol;
1688+ __ret.field[2] = space;
1689+ __ret.field[3] = value;
1690+ }
1691+ else
1692+ {
1693+ __ret.field[1] = value;
1694+ __ret.field[2] = space;
1695+ __ret.field[3] = symbol;
1696+ }
1697+ __ret.field[0] = sign;
1698+ }
1699+ else
1700+ {
1701+ // Pattern starts with sign and ends with none.
1702+ if (__precedes)
1703+ {
1704+ __ret.field[1] = symbol;
1705+ __ret.field[2] = value;
1706+ }
1707+ else
1708+ {
1709+ __ret.field[1] = value;
1710+ __ret.field[2] = symbol;
1711+ }
1712+ __ret.field[0] = sign;
1713+ __ret.field[3] = none;
1714+ }
1715+ break;
1716+ case 2:
1717+ // 2 The sign follows the value and symbol.
1718+ if (__space)
1719+ {
1720+ // Pattern either ends with sign.
1721+ if (__precedes)
1722+ {
1723+ __ret.field[0] = symbol;
1724+ __ret.field[1] = space;
1725+ __ret.field[2] = value;
1726+ }
1727+ else
1728+ {
1729+ __ret.field[0] = value;
1730+ __ret.field[1] = space;
1731+ __ret.field[2] = symbol;
1732+ }
1733+ __ret.field[3] = sign;
1734+ }
1735+ else
1736+ {
1737+ // Pattern ends with sign then none.
1738+ if (__precedes)
1739+ {
1740+ __ret.field[0] = symbol;
1741+ __ret.field[1] = value;
1742+ }
1743+ else
1744+ {
1745+ __ret.field[0] = value;
1746+ __ret.field[1] = symbol;
1747+ }
1748+ __ret.field[2] = sign;
1749+ __ret.field[3] = none;
1750+ }
1751+ break;
1752+ case 3:
1753+ // 3 The sign immediately precedes the symbol.
1754+ if (__space)
1755+ {
1756+ // Have space.
1757+ if (__precedes)
1758+ {
1759+ __ret.field[0] = sign;
1760+ __ret.field[1] = symbol;
1761+ __ret.field[2] = space;
1762+ __ret.field[3] = value;
1763+ }
1764+ else
1765+ {
1766+ __ret.field[0] = value;
1767+ __ret.field[1] = space;
1768+ __ret.field[2] = sign;
1769+ __ret.field[3] = symbol;
1770+ }
1771+ }
1772+ else
1773+ {
1774+ // Have none.
1775+ if (__precedes)
1776+ {
1777+ __ret.field[0] = sign;
1778+ __ret.field[1] = symbol;
1779+ __ret.field[2] = value;
1780+ }
1781+ else
1782+ {
1783+ __ret.field[0] = value;
1784+ __ret.field[1] = sign;
1785+ __ret.field[2] = symbol;
1786+ }
1787+ __ret.field[3] = none;
1788+ }
1789+ break;
1790+ case 4:
1791+ // 4 The sign immediately follows the symbol.
1792+ if (__space)
1793+ {
1794+ // Have space.
1795+ if (__precedes)
1796+ {
1797+ __ret.field[0] = symbol;
1798+ __ret.field[1] = sign;
1799+ __ret.field[2] = space;
1800+ __ret.field[3] = value;
1801+ }
1802+ else
1803+ {
1804+ __ret.field[0] = value;
1805+ __ret.field[1] = space;
1806+ __ret.field[2] = symbol;
1807+ __ret.field[3] = sign;
1808+ }
1809+ }
1810+ else
1811+ {
1812+ // Have none.
1813+ if (__precedes)
1814+ {
1815+ __ret.field[0] = symbol;
1816+ __ret.field[1] = sign;
1817+ __ret.field[2] = value;
1818+ }
1819+ else
1820+ {
1821+ __ret.field[0] = value;
1822+ __ret.field[1] = symbol;
1823+ __ret.field[2] = sign;
1824+ }
1825+ __ret.field[3] = none;
1826+ }
1827+ break;
1828+ default:
1829+ ;
1830+ }
1831+ return __ret;
1832+ }
1833+
1834+ template<>
1835+ void
1836+ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
1837+ const char*)
1838+ {
1839+ if (!__cloc)
1840+ {
1841+ // "C" locale
1842+ _M_decimal_point = '.';
1843+ _M_thousands_sep = ',';
1844+ _M_grouping = "";
1845+ _M_curr_symbol = "";
1846+ _M_positive_sign = "";
1847+ _M_negative_sign = "";
1848+ _M_frac_digits = 0;
1849+ _M_pos_format = money_base::_S_default_pattern;
1850+ _M_neg_format = money_base::_S_default_pattern;
1851+ }
1852+ else
1853+ {
1854+ // Named locale.
1855+ _M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, __cloc));
1856+ _M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, __cloc));
1857+ _M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1858+ _M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1859+
1860+ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
1861+ if (!__nposn)
1862+ _M_negative_sign = "()";
1863+ else
1864+ _M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
1865+
1866+ // _Intl == true
1867+ _M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
1868+ _M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, __cloc));
1869+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
1870+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
1871+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
1872+ _M_pos_format = _S_construct_pattern(__pprecedes, __pspace, __pposn);
1873+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
1874+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
1875+ _M_neg_format = _S_construct_pattern(__nprecedes, __nspace, __nposn);
1876+ }
1877+ }
1878+
1879+ template<>
1880+ void
1881+ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
1882+ const char*)
1883+ {
1884+ if (!__cloc)
1885+ {
1886+ // "C" locale
1887+ _M_decimal_point = '.';
1888+ _M_thousands_sep = ',';
1889+ _M_grouping = "";
1890+ _M_curr_symbol = "";
1891+ _M_positive_sign = "";
1892+ _M_negative_sign = "";
1893+ _M_frac_digits = 0;
1894+ _M_pos_format = money_base::_S_default_pattern;
1895+ _M_neg_format = money_base::_S_default_pattern;
1896+ }
1897+ else
1898+ {
1899+ // Named locale.
1900+ _M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, __cloc));
1901+ _M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, __cloc));
1902+ _M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
1903+ _M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1904+
1905+ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
1906+ if (!__nposn)
1907+ _M_negative_sign = "()";
1908+ else
1909+ _M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
1910+
1911+ // _Intl == false
1912+ _M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
1913+ _M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
1914+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
1915+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
1916+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
1917+ _M_pos_format = _S_construct_pattern(__pprecedes, __pspace, __pposn);
1918+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
1919+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
1920+ _M_neg_format = _S_construct_pattern(__nprecedes, __nspace, __nposn);
1921+ }
1922+ }
1923+
1924+ template<>
1925+ moneypunct<char, true>::~moneypunct()
1926+ { }
1927+
1928+ template<>
1929+ moneypunct<char, false>::~moneypunct()
1930+ { }
1931+
1932+#ifdef _GLIBCPP_USE_WCHAR_T
1933+ template<>
1934+ void
1935+ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
1936+#ifdef __UCLIBC_HAS_XLOCALE__
1937+ const char*)
1938+#else
1939+ const char* __name)
1940+#endif
1941+ {
1942+ if (!__cloc)
1943+ {
1944+ // "C" locale
1945+ _M_decimal_point = L'.';
1946+ _M_thousands_sep = L',';
1947+ _M_grouping = "";
1948+ _M_curr_symbol = L"";
1949+ _M_positive_sign = L"";
1950+ _M_negative_sign = L"";
1951+ _M_frac_digits = 0;
1952+ _M_pos_format = money_base::_S_default_pattern;
1953+ _M_neg_format = money_base::_S_default_pattern;
1954+ }
1955+ else
1956+ {
1957+ // Named locale.
1958+#ifdef __UCLIBC_HAS_XLOCALE__
1959+ __c_locale __old = __uselocale(__cloc);
1960+#else
1961+ // Switch to named locale so that mbsrtowcs will work.
1962+ char* __old = strdup(setlocale(LC_ALL, NULL));
1963+ setlocale(LC_ALL, __name);
1964+#endif
1965+
1966+#ifdef __UCLIBC_MJN3_ONLY__
1967+#warning fix this
1968+#endif
1969+#ifdef __UCLIBC__
1970+# ifdef __UCLIBC_HAS_XLOCALE__
1971+ _M_decimal_point = __cloc->decimal_point_wc;
1972+ _M_thousands_sep = __cloc->thousands_sep_wc;
1973+# else
1974+ _M_decimal_point = __global_locale->decimal_point_wc;
1975+ _M_thousands_sep = __global_locale->thousands_sep_wc;
1976+# endif
1977+#else
1978+ _M_decimal_point = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc)}).__w);
1979+
1980+ _M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
1981+#endif
1982+ _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
1983+
1984+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
1985+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
1986+ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
1987+
1988+ mbstate_t __state;
1989+ size_t __len = strlen(__cpossign);
1990+ if (__len)
1991+ {
1992+ ++__len;
1993+ memset(&__state, 0, sizeof(mbstate_t));
1994+ wchar_t* __wcs = new wchar_t[__len];
1995+ mbsrtowcs(__wcs, &__cpossign, __len, &__state);
1996+ _M_positive_sign = __wcs;
1997+ }
1998+ else
1999+ _M_positive_sign = L"";
2000+
2001+ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
2002+ __len = strlen(__cnegsign);
2003+ if (!__nposn)
2004+ _M_negative_sign = L"()";
2005+ else if (__len)
2006+ {
2007+ ++__len;
2008+ memset(&__state, 0, sizeof(mbstate_t));
2009+ wchar_t* __wcs = new wchar_t[__len];
2010+ mbsrtowcs(__wcs, &__cnegsign, __len, &__state);
2011+ _M_negative_sign = __wcs;
2012+ }
2013+ else
2014+ _M_negative_sign = L"";
2015+
2016+ // _Intl == true.
2017+ __len = strlen(__ccurr);
2018+ if (__len)
2019+ {
2020+ ++__len;
2021+ memset(&__state, 0, sizeof(mbstate_t));
2022+ wchar_t* __wcs = new wchar_t[__len];
2023+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
2024+ _M_curr_symbol = __wcs;
2025+ }
2026+ else
2027+ _M_curr_symbol = L"";
2028+
2029+ _M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, __cloc));
2030+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
2031+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
2032+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
2033+ _M_pos_format = _S_construct_pattern(__pprecedes, __pspace, __pposn);
2034+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
2035+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
2036+ _M_neg_format = _S_construct_pattern(__nprecedes, __nspace, __nposn);
2037+
2038+#ifdef __UCLIBC_HAS_XLOCALE__
2039+ __uselocale(__old);
2040+#else
2041+ setlocale(LC_ALL, __old);
2042+ free(__old);
2043+#endif
2044+ }
2045+ }
2046+
2047+ template<>
2048+ void
2049+ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
2050+#ifdef __UCLIBC_HAS_XLOCALE__
2051+ const char*)
2052+#else
2053+ const char* __name)
2054+#endif
2055+ {
2056+ if (!__cloc)
2057+ {
2058+ // "C" locale
2059+ _M_decimal_point = L'.';
2060+ _M_thousands_sep = L',';
2061+ _M_grouping = "";
2062+ _M_curr_symbol = L"";
2063+ _M_positive_sign = L"";
2064+ _M_negative_sign = L"";
2065+ _M_frac_digits = 0;
2066+ _M_pos_format = money_base::_S_default_pattern;
2067+ _M_neg_format = money_base::_S_default_pattern;
2068+ }
2069+ else
2070+ {
2071+ // Named locale.
2072+#ifdef __UCLIBC_HAS_XLOCALE__
2073+ __c_locale __old = __uselocale(__cloc);
2074+#else
2075+ // Switch to named locale so that mbsrtowcs will work.
2076+ char* __old = strdup(setlocale(LC_ALL, NULL));
2077+ setlocale(LC_ALL, __name);
2078+#endif
2079+
2080+#ifdef __UCLIBC_MJN3_ONLY__
2081+#warning fix this
2082+#endif
2083+#ifdef __UCLIBC__
2084+# ifdef __UCLIBC_HAS_XLOCALE__
2085+ _M_decimal_point = __cloc->decimal_point_wc;
2086+ _M_thousands_sep = __cloc->thousands_sep_wc;
2087+# else
2088+ _M_decimal_point = __global_locale->decimal_point_wc;
2089+ _M_thousands_sep = __global_locale->thousands_sep_wc;
2090+# endif
2091+#else
2092+ _M_decimal_point = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc)}).__w);
2093+ _M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
2094+#endif
2095+ _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
2096+
2097+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
2098+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
2099+ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
2100+
2101+ mbstate_t __state;
2102+ size_t __len;
2103+ __len = strlen(__cpossign);
2104+ if (__len)
2105+ {
2106+ ++__len;
2107+ memset(&__state, 0, sizeof(mbstate_t));
2108+ wchar_t* __wcs = new wchar_t[__len];
2109+ mbsrtowcs(__wcs, &__cpossign, __len, &__state);
2110+ _M_positive_sign = __wcs;
2111+ }
2112+ else
2113+ _M_positive_sign = L"";
2114+
2115+ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
2116+ __len = strlen(__cnegsign);
2117+ if (!__nposn)
2118+ _M_negative_sign = L"()";
2119+ else if (__len)
2120+ {
2121+ ++__len;
2122+ memset(&__state, 0, sizeof(mbstate_t));
2123+ wchar_t* __wcs = new wchar_t[__len];
2124+ mbsrtowcs(__wcs, &__cnegsign, __len, &__state);
2125+ _M_negative_sign = __wcs;
2126+ }
2127+ else
2128+ _M_negative_sign = L"";
2129+
2130+ // _Intl == true.
2131+ __len = strlen(__ccurr);
2132+ if (__len)
2133+ {
2134+ ++__len;
2135+ memset(&__state, 0, sizeof(mbstate_t));
2136+ wchar_t* __wcs = new wchar_t[__len];
2137+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
2138+ _M_curr_symbol = __wcs;
2139+ }
2140+ else
2141+ _M_curr_symbol = L"";
2142+
2143+ _M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
2144+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
2145+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
2146+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
2147+ _M_pos_format = _S_construct_pattern(__pprecedes, __pspace, __pposn);
2148+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
2149+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
2150+ _M_neg_format = _S_construct_pattern(__nprecedes, __nspace, __nposn);
2151+
2152+#ifdef __UCLIBC_HAS_XLOCALE__
2153+ __uselocale(__old);
2154+#else
2155+ setlocale(LC_ALL, __old);
2156+ free(__old);
2157+#endif
2158+ }
2159+ }
2160+
2161+ template<>
2162+ moneypunct<wchar_t, true>::~moneypunct()
2163+ {
2164+ if (wcslen(_M_positive_sign))
2165+ delete [] _M_positive_sign;
2166+ if (wcslen(_M_negative_sign) && (wcscmp(_M_negative_sign, L"()") != 0))
2167+ delete [] _M_negative_sign;
2168+ if (wcslen(_M_curr_symbol))
2169+ delete [] _M_curr_symbol;
2170+ }
2171+
2172+ template<>
2173+ moneypunct<wchar_t, false>::~moneypunct()
2174+ {
2175+ if (wcslen(_M_positive_sign))
2176+ delete [] _M_positive_sign;
2177+ if (wcslen(_M_negative_sign) && (wcscmp(_M_negative_sign, L"()") != 0))
2178+ delete [] _M_negative_sign;
2179+ if (wcslen(_M_curr_symbol))
2180+ delete [] _M_curr_symbol;
2181+ }
2182+#endif
2183+}
2184diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/numeric_members.cc
2185--- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/numeric_members.cc 1969-12-31 18:00:00.000000000 -0600
2186+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2004-01-09 18:20:59.000000000 -0600
2187@@ -0,0 +1,129 @@
2188+// std::numpunct implementation details, GNU version -*- C++ -*-
2189+
2190+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
2191+//
2192+// This file is part of the GNU ISO C++ Library. This library is free
2193+// software; you can redistribute it and/or modify it under the
2194+// terms of the GNU General Public License as published by the
2195+// Free Software Foundation; either version 2, or (at your option)
2196+// any later version.
2197+
2198+// This library is distributed in the hope that it will be useful,
2199+// but WITHOUT ANY WARRANTY; without even the implied warranty of
2200+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2201+// GNU General Public License for more details.
2202+
2203+// You should have received a copy of the GNU General Public License along
2204+// with this library; see the file COPYING. If not, write to the Free
2205+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2206+// USA.
2207+
2208+// As a special exception, you may use this file as part of a free software
2209+// library without restriction. Specifically, if other files instantiate
2210+// templates or use macros or inline functions from this file, or you compile
2211+// this file and link it with other files to produce an executable, this
2212+// file does not by itself cause the resulting executable to be covered by
2213+// the GNU General Public License. This exception does not however
2214+// invalidate any other reasons why the executable file might be covered by
2215+// the GNU General Public License.
2216+
2217+//
2218+// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
2219+//
2220+
2221+// Written by Benjamin Kosnik <bkoz@redhat.com>
2222+
2223+#define _LIBC
2224+#include <locale>
2225+#undef _LIBC
2226+#include <bits/c++locale_internal.h>
2227+
2228+#ifdef __UCLIBC_MJN3_ONLY__
2229+#warning tailor for stub locale support
2230+#endif
2231+#ifndef __UCLIBC_HAS_XLOCALE__
2232+#define __nl_langinfo_l(N, L) nl_langinfo((N))
2233+#endif
2234+
2235+namespace std
2236+{
2237+ template<>
2238+ void
2239+ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
2240+ {
2241+ if (!__cloc)
2242+ {
2243+ // "C" locale
2244+ _M_decimal_point = '.';
2245+ _M_thousands_sep = ',';
2246+ _M_grouping = "";
2247+ }
2248+ else
2249+ {
2250+ // Named locale.
2251+ _M_decimal_point = *(__nl_langinfo_l(RADIXCHAR, __cloc));
2252+ _M_thousands_sep = *(__nl_langinfo_l(THOUSEP, __cloc));
2253+ // Check for NUL, which implies no grouping.
2254+ if (_M_thousands_sep == '\0')
2255+ _M_grouping = "";
2256+ else
2257+ _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
2258+ }
2259+ // NB: There is no way to extact this info from posix locales.
2260+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
2261+ _M_truename = "true";
2262+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
2263+ _M_falsename = "false";
2264+ }
2265+
2266+ template<>
2267+ numpunct<char>::~numpunct()
2268+ { }
2269+
2270+#ifdef _GLIBCPP_USE_WCHAR_T
2271+ template<>
2272+ void
2273+ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
2274+ {
2275+ if (!__cloc)
2276+ {
2277+ // "C" locale
2278+ _M_decimal_point = L'.';
2279+ _M_thousands_sep = L',';
2280+ _M_grouping = "";
2281+ }
2282+ else
2283+ {
2284+ // Named locale.
2285+#ifdef __UCLIBC_MJN3_ONLY__
2286+#warning fix this
2287+#endif
2288+#ifdef __UCLIBC__
2289+# ifdef __UCLIBC_HAS_XLOCALE__
2290+ _M_decimal_point = __cloc->decimal_point_wc;
2291+ _M_thousands_sep = __cloc->thousands_sep_wc;
2292+# else
2293+ _M_decimal_point = __global_locale->decimal_point_wc;
2294+ _M_thousands_sep = __global_locale->thousands_sep_wc;
2295+# endif
2296+#else
2297+ _M_decimal_point = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc)}).__w);
2298+ _M_thousands_sep = static_cast<wchar_t>(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
2299+#endif
2300+ if (_M_thousands_sep == L'\0')
2301+ _M_grouping = "";
2302+ else
2303+ _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
2304+ }
2305+ // NB: There is no way to extact this info from posix locales.
2306+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
2307+ _M_truename = L"true";
2308+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
2309+ _M_falsename = L"false";
2310+ }
2311+
2312+ template<>
2313+ numpunct<wchar_t>::~numpunct()
2314+ { }
2315+ #endif
2316+}
2317diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/time_members.cc
2318--- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/time_members.cc 1969-12-31 18:00:00.000000000 -0600
2319+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/time_members.cc 2004-01-09 08:25:03.000000000 -0600
2320@@ -0,0 +1,341 @@
2321+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
2322+
2323+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
2324+//
2325+// This file is part of the GNU ISO C++ Library. This library is free
2326+// software; you can redistribute it and/or modify it under the
2327+// terms of the GNU General Public License as published by the
2328+// Free Software Foundation; either version 2, or (at your option)
2329+// any later version.
2330+
2331+// This library is distributed in the hope that it will be useful,
2332+// but WITHOUT ANY WARRANTY; without even the implied warranty of
2333+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2334+// GNU General Public License for more details.
2335+
2336+// You should have received a copy of the GNU General Public License along
2337+// with this library; see the file COPYING. If not, write to the Free
2338+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2339+// USA.
2340+
2341+// As a special exception, you may use this file as part of a free software
2342+// library without restriction. Specifically, if other files instantiate
2343+// templates or use macros or inline functions from this file, or you compile
2344+// this file and link it with other files to produce an executable, this
2345+// file does not by itself cause the resulting executable to be covered by
2346+// the GNU General Public License. This exception does not however
2347+// invalidate any other reasons why the executable file might be covered by
2348+// the GNU General Public License.
2349+
2350+//
2351+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
2352+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
2353+//
2354+
2355+// Written by Benjamin Kosnik <bkoz@redhat.com>
2356+
2357+#include <locale>
2358+#include <bits/c++locale_internal.h>
2359+
2360+#ifdef __UCLIBC_MJN3_ONLY__
2361+#warning tailor for stub locale support
2362+#endif
2363+#ifndef __UCLIBC_HAS_XLOCALE__
2364+#define __nl_langinfo_l(N, L) nl_langinfo((N))
2365+#endif
2366+
2367+namespace std
2368+{
2369+ template<>
2370+ void
2371+ __timepunct<char>::
2372+ _M_put(char* __s, size_t __maxlen, const char* __format,
2373+ const tm* __tm) const
2374+ {
2375+#ifdef __UCLIBC_HAS_XLOCALE__
2376+ __strftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
2377+#else
2378+ char* __old = strdup(setlocale(LC_ALL, NULL));
2379+ setlocale(LC_ALL, _M_name_timepunct);
2380+ strftime(__s, __maxlen, __format, __tm);
2381+ setlocale(LC_ALL, __old);
2382+ free(__old);
2383+#endif
2384+ }
2385+
2386+ template<>
2387+ void
2388+ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
2389+ {
2390+ if (!__cloc)
2391+ {
2392+ // "C" locale
2393+ _M_c_locale_timepunct = _S_c_locale;
2394+
2395+ _M_date_format = "%m/%d/%y";
2396+ _M_date_era_format = "%m/%d/%y";
2397+ _M_time_format = "%H:%M:%S";
2398+ _M_time_era_format = "%H:%M:%S";
2399+ _M_date_time_format = "";
2400+ _M_date_time_era_format = "";
2401+ _M_am = "AM";
2402+ _M_pm = "PM";
2403+ _M_am_pm_format = "";
2404+
2405+ // Day names, starting with "C"'s Sunday.
2406+ _M_day1 = "Sunday";
2407+ _M_day2 = "Monday";
2408+ _M_day3 = "Tuesday";
2409+ _M_day4 = "Wednesday";
2410+ _M_day5 = "Thursday";
2411+ _M_day6 = "Friday";
2412+ _M_day7 = "Saturday";
2413+
2414+ // Abbreviated day names, starting with "C"'s Sun.
2415+ _M_day_a1 = "Sun";
2416+ _M_day_a2 = "Mon";
2417+ _M_day_a3 = "Tue";
2418+ _M_day_a4 = "Wed";
2419+ _M_day_a5 = "Thu";
2420+ _M_day_a6 = "Fri";
2421+ _M_day_a7 = "Sat";
2422+
2423+ // Month names, starting with "C"'s January.
2424+ _M_month01 = "January";
2425+ _M_month02 = "February";
2426+ _M_month03 = "March";
2427+ _M_month04 = "April";
2428+ _M_month05 = "May";
2429+ _M_month06 = "June";
2430+ _M_month07 = "July";
2431+ _M_month08 = "August";
2432+ _M_month09 = "September";
2433+ _M_month10 = "October";
2434+ _M_month11 = "November";
2435+ _M_month12 = "December";
2436+
2437+ // Abbreviated month names, starting with "C"'s Jan.
2438+ _M_month_a01 = "Jan";
2439+ _M_month_a02 = "Feb";
2440+ _M_month_a03 = "Mar";
2441+ _M_month_a04 = "Apr";
2442+ _M_month_a05 = "May";
2443+ _M_month_a06 = "Jun";
2444+ _M_month_a07 = "July";
2445+ _M_month_a08 = "Aug";
2446+ _M_month_a09 = "Sep";
2447+ _M_month_a10 = "Oct";
2448+ _M_month_a11 = "Nov";
2449+ _M_month_a12 = "Dec";
2450+ }
2451+ else
2452+ {
2453+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
2454+
2455+ _M_date_format = __nl_langinfo_l(D_FMT, __cloc);
2456+ _M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
2457+ _M_time_format = __nl_langinfo_l(T_FMT, __cloc);
2458+ _M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
2459+ _M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
2460+ _M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, __cloc);
2461+ _M_am = __nl_langinfo_l(AM_STR, __cloc);
2462+ _M_pm = __nl_langinfo_l(PM_STR, __cloc);
2463+ _M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
2464+
2465+ // Day names, starting with "C"'s Sunday.
2466+ _M_day1 = __nl_langinfo_l(DAY_1, __cloc);
2467+ _M_day2 = __nl_langinfo_l(DAY_2, __cloc);
2468+ _M_day3 = __nl_langinfo_l(DAY_3, __cloc);
2469+ _M_day4 = __nl_langinfo_l(DAY_4, __cloc);
2470+ _M_day5 = __nl_langinfo_l(DAY_5, __cloc);
2471+ _M_day6 = __nl_langinfo_l(DAY_6, __cloc);
2472+ _M_day7 = __nl_langinfo_l(DAY_7, __cloc);
2473+
2474+ // Abbreviated day names, starting with "C"'s Sun.
2475+ _M_day_a1 = __nl_langinfo_l(ABDAY_1, __cloc);
2476+ _M_day_a2 = __nl_langinfo_l(ABDAY_2, __cloc);
2477+ _M_day_a3 = __nl_langinfo_l(ABDAY_3, __cloc);
2478+ _M_day_a4 = __nl_langinfo_l(ABDAY_4, __cloc);
2479+ _M_day_a5 = __nl_langinfo_l(ABDAY_5, __cloc);
2480+ _M_day_a6 = __nl_langinfo_l(ABDAY_6, __cloc);
2481+ _M_day_a7 = __nl_langinfo_l(ABDAY_7, __cloc);
2482+
2483+ // Month names, starting with "C"'s January.
2484+ _M_month01 = __nl_langinfo_l(MON_1, __cloc);
2485+ _M_month02 = __nl_langinfo_l(MON_2, __cloc);
2486+ _M_month03 = __nl_langinfo_l(MON_3, __cloc);
2487+ _M_month04 = __nl_langinfo_l(MON_4, __cloc);
2488+ _M_month05 = __nl_langinfo_l(MON_5, __cloc);
2489+ _M_month06 = __nl_langinfo_l(MON_6, __cloc);
2490+ _M_month07 = __nl_langinfo_l(MON_7, __cloc);
2491+ _M_month08 = __nl_langinfo_l(MON_8, __cloc);
2492+ _M_month09 = __nl_langinfo_l(MON_9, __cloc);
2493+ _M_month10 = __nl_langinfo_l(MON_10, __cloc);
2494+ _M_month11 = __nl_langinfo_l(MON_11, __cloc);
2495+ _M_month12 = __nl_langinfo_l(MON_12, __cloc);
2496+
2497+ // Abbreviated month names, starting with "C"'s Jan.
2498+ _M_month_a01 = __nl_langinfo_l(ABMON_1, __cloc);
2499+ _M_month_a02 = __nl_langinfo_l(ABMON_2, __cloc);
2500+ _M_month_a03 = __nl_langinfo_l(ABMON_3, __cloc);
2501+ _M_month_a04 = __nl_langinfo_l(ABMON_4, __cloc);
2502+ _M_month_a05 = __nl_langinfo_l(ABMON_5, __cloc);
2503+ _M_month_a06 = __nl_langinfo_l(ABMON_6, __cloc);
2504+ _M_month_a07 = __nl_langinfo_l(ABMON_7, __cloc);
2505+ _M_month_a08 = __nl_langinfo_l(ABMON_8, __cloc);
2506+ _M_month_a09 = __nl_langinfo_l(ABMON_9, __cloc);
2507+ _M_month_a10 = __nl_langinfo_l(ABMON_10, __cloc);
2508+ _M_month_a11 = __nl_langinfo_l(ABMON_11, __cloc);
2509+ _M_month_a12 = __nl_langinfo_l(ABMON_12, __cloc);
2510+ }
2511+ }
2512+
2513+#ifdef _GLIBCPP_USE_WCHAR_T
2514+ template<>
2515+ void
2516+ __timepunct<wchar_t>::
2517+ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
2518+ const tm* __tm) const
2519+ {
2520+#ifdef __UCLIBC_HAS_XLOCALE__
2521+ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
2522+#else
2523+ char* __old = strdup(setlocale(LC_ALL, NULL));
2524+ setlocale(LC_ALL, _M_name_timepunct);
2525+ wcsftime(__s, __maxlen, __format, __tm);
2526+ setlocale(LC_ALL, __old);
2527+ free(__old);
2528+#endif
2529+ }
2530+
2531+ template<>
2532+ void
2533+ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
2534+ {
2535+#warning wide time stuff
2536+// if (!__cloc)
2537+ {
2538+ // "C" locale
2539+ _M_c_locale_timepunct = _S_c_locale;
2540+
2541+ _M_date_format = L"%m/%d/%y";
2542+ _M_date_era_format = L"%m/%d/%y";
2543+ _M_time_format = L"%H:%M:%S";
2544+ _M_time_era_format = L"%H:%M:%S";
2545+ _M_date_time_format = L"";
2546+ _M_date_time_era_format = L"";
2547+ _M_am = L"AM";
2548+ _M_pm = L"PM";
2549+ _M_am_pm_format = L"";
2550+
2551+ // Day names, starting with "C"'s Sunday.
2552+ _M_day1 = L"Sunday";
2553+ _M_day2 = L"Monday";
2554+ _M_day3 = L"Tuesday";
2555+ _M_day4 = L"Wednesday";
2556+ _M_day5 = L"Thursday";
2557+ _M_day6 = L"Friday";
2558+ _M_day7 = L"Saturday";
2559+
2560+ // Abbreviated day names, starting with "C"'s Sun.
2561+ _M_day_a1 = L"Sun";
2562+ _M_day_a2 = L"Mon";
2563+ _M_day_a3 = L"Tue";
2564+ _M_day_a4 = L"Wed";
2565+ _M_day_a5 = L"Thu";
2566+ _M_day_a6 = L"Fri";
2567+ _M_day_a7 = L"Sat";
2568+
2569+ // Month names, starting with "C"'s January.
2570+ _M_month01 = L"January";
2571+ _M_month02 = L"February";
2572+ _M_month03 = L"March";
2573+ _M_month04 = L"April";
2574+ _M_month05 = L"May";
2575+ _M_month06 = L"June";
2576+ _M_month07 = L"July";
2577+ _M_month08 = L"August";
2578+ _M_month09 = L"September";
2579+ _M_month10 = L"October";
2580+ _M_month11 = L"November";
2581+ _M_month12 = L"December";
2582+
2583+ // Abbreviated month names, starting with "C"'s Jan.
2584+ _M_month_a01 = L"Jan";
2585+ _M_month_a02 = L"Feb";
2586+ _M_month_a03 = L"Mar";
2587+ _M_month_a04 = L"Apr";
2588+ _M_month_a05 = L"May";
2589+ _M_month_a06 = L"Jun";
2590+ _M_month_a07 = L"July";
2591+ _M_month_a08 = L"Aug";
2592+ _M_month_a09 = L"Sep";
2593+ _M_month_a10 = L"Oct";
2594+ _M_month_a11 = L"Nov";
2595+ _M_month_a12 = L"Dec";
2596+ }
2597+#if 0
2598+ else
2599+ {
2600+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
2601+
2602+ _M_date_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_FMT, __cloc));
2603+ _M_date_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_FMT, __cloc));
2604+ _M_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT, __cloc));
2605+ _M_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_T_FMT, __cloc));
2606+ _M_date_time_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WD_T_FMT, __cloc));
2607+ _M_date_time_era_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc));
2608+ _M_am = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WAM_STR, __cloc));
2609+ _M_pm = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WPM_STR, __cloc));
2610+ _M_am_pm_format = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc));
2611+
2612+ // Day names, starting with "C"'s Sunday.
2613+ _M_day1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_1, __cloc));
2614+ _M_day2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_2, __cloc));
2615+ _M_day3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_3, __cloc));
2616+ _M_day4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_4, __cloc));
2617+ _M_day5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_5, __cloc));
2618+ _M_day6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_6, __cloc));
2619+ _M_day7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WDAY_7, __cloc));
2620+
2621+ // Abbreviated day names, starting with "C"'s Sun.
2622+ _M_day_a1 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_1, __cloc));
2623+ _M_day_a2 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_2, __cloc));
2624+ _M_day_a3 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_3, __cloc));
2625+ _M_day_a4 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_4, __cloc));
2626+ _M_day_a5 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_5, __cloc));
2627+ _M_day_a6 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_6, __cloc));
2628+ _M_day_a7 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABDAY_7, __cloc));
2629+
2630+ // Month names, starting with "C"'s January.
2631+ _M_month01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_1, __cloc));
2632+ _M_month02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_2, __cloc));
2633+ _M_month03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_3, __cloc));
2634+ _M_month04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_4, __cloc));
2635+ _M_month05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_5, __cloc));
2636+ _M_month06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_6, __cloc));
2637+ _M_month07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_7, __cloc));
2638+ _M_month08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_8, __cloc));
2639+ _M_month09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_9, __cloc));
2640+ _M_month10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_10, __cloc));
2641+ _M_month11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_11, __cloc));
2642+ _M_month12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WMON_12, __cloc));
2643+
2644+ // Abbreviated month names, starting with "C"'s Jan.
2645+ _M_month_a01 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_1, __cloc));
2646+ _M_month_a02 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_2, __cloc));
2647+ _M_month_a03 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_3, __cloc));
2648+ _M_month_a04 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_4, __cloc));
2649+ _M_month_a05 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_5, __cloc));
2650+ _M_month_a06 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_6, __cloc));
2651+ _M_month_a07 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_7, __cloc));
2652+ _M_month_a08 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_8, __cloc));
2653+ _M_month_a09 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_9, __cloc));
2654+ _M_month_a10 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_10, __cloc));
2655+ _M_month_a11 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_11, __cloc));
2656+ _M_month_a12 = reinterpret_cast<wchar_t*>(__nl_langinfo_l(_NL_WABMON_12, __cloc));
2657+ }
2658+#endif // 0
2659+ }
2660+#endif
2661+}
2662diff -urN gcc-3.3.2/libstdc++-v3/config/locale/uclibc/time_members.h gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/time_members.h
2663--- gcc-3.3.2/libstdc++-v3/config/locale/uclibc/time_members.h 1969-12-31 18:00:00.000000000 -0600
2664+++ gcc-3.3.2-uClibc/libstdc++-v3/config/locale/uclibc/time_members.h 2004-01-09 04:26:21.000000000 -0600
2665@@ -0,0 +1,68 @@
2666+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
2667+
2668+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
2669+//
2670+// This file is part of the GNU ISO C++ Library. This library is free
2671+// software; you can redistribute it and/or modify it under the
2672+// terms of the GNU General Public License as published by the
2673+// Free Software Foundation; either version 2, or (at your option)
2674+// any later version.
2675+
2676+// This library is distributed in the hope that it will be useful,
2677+// but WITHOUT ANY WARRANTY; without even the implied warranty of
2678+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2679+// GNU General Public License for more details.
2680+
2681+// You should have received a copy of the GNU General Public License along
2682+// with this library; see the file COPYING. If not, write to the Free
2683+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2684+// USA.
2685+
2686+// As a special exception, you may use this file as part of a free software
2687+// library without restriction. Specifically, if other files instantiate
2688+// templates or use macros or inline functions from this file, or you compile
2689+// this file and link it with other files to produce an executable, this
2690+// file does not by itself cause the resulting executable to be covered by
2691+// the GNU General Public License. This exception does not however
2692+// invalidate any other reasons why the executable file might be covered by
2693+// the GNU General Public License.
2694+
2695+//
2696+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
2697+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
2698+//
2699+
2700+// Written by Benjamin Kosnik <bkoz@redhat.com>
2701+
2702+ template<typename _CharT>
2703+ __timepunct<_CharT>::__timepunct(size_t __refs)
2704+ : locale::facet(__refs)
2705+ {
2706+#ifndef __UCLIBC_HAS_XLOCALE__
2707+ _M_name_timepunct = _S_c_name;
2708+#endif
2709+ _M_initialize_timepunct();
2710+ }
2711+
2712+ template<typename _CharT>
2713+ __timepunct<_CharT>::__timepunct(__c_locale __cloc,
2714+ const char* __s,
2715+ size_t __refs)
2716+ : locale::facet(__refs)
2717+ {
2718+#ifndef __UCLIBC_HAS_XLOCALE__
2719+ _M_name_timepunct = new char[strlen(__s) + 1];
2720+ strcpy(_M_name_timepunct, __s);
2721+#endif
2722+ _M_initialize_timepunct(__cloc);
2723+ }
2724+
2725+ template<typename _CharT>
2726+ __timepunct<_CharT>::~__timepunct()
2727+ {
2728+#ifndef __UCLIBC_HAS_XLOCALE__
2729+ if (_S_c_name != _M_name_timepunct)
2730+ delete [] _M_name_timepunct;
2731+#endif
2732+ _S_destroy_c_locale(_M_c_locale_timepunct);
2733+ }
2734diff -urN gcc-3.3.2/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-3.3.2-uClibc/libstdc++-v3/config/os/uclibc/ctype_base.h
2735--- gcc-3.3.2/libstdc++-v3/config/os/uclibc/ctype_base.h 1969-12-31 18:00:00.000000000 -0600
2736+++ gcc-3.3.2-uClibc/libstdc++-v3/config/os/uclibc/ctype_base.h 2004-01-09 02:54:54.000000000 -0600
2737@@ -0,0 +1,57 @@
2738+// Locale support -*- C++ -*-
2739+
2740+// Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
2741+//
2742+// This file is part of the GNU ISO C++ Library. This library is free
2743+// software; you can redistribute it and/or modify it under the
2744+// terms of the GNU General Public License as published by the
2745+// Free Software Foundation; either version 2, or (at your option)
2746+// any later version.
2747+
2748+// This library is distributed in the hope that it will be useful,
2749+// but WITHOUT ANY WARRANTY; without even the implied warranty of
2750+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2751+// GNU General Public License for more details.
2752+
2753+// You should have received a copy of the GNU General Public License along
2754+// with this library; see the file COPYING. If not, write to the Free
2755+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2756+// USA.
2757+
2758+// As a special exception, you may use this file as part of a free software
2759+// library without restriction. Specifically, if other files instantiate
2760+// templates or use macros or inline functions from this file, or you compile
2761+// this file and link it with other files to produce an executable, this
2762+// file does not by itself cause the resulting executable to be covered by
2763+// the GNU General Public License. This exception does not however
2764+// invalidate any other reasons why the executable file might be covered by
2765+// the GNU General Public License.
2766+
2767+//
2768+// ISO C++ 14882: 22.1 Locales
2769+//
2770+
2771+// Information as gleaned from /usr/include/ctype.h
2772+
2773+ struct ctype_base
2774+ {
2775+ // Note: In uClibc, the following two types depend on configuration.
2776+
2777+ // Non-standard typedefs.
2778+ typedef const __ctype_touplow_t* __to_type;
2779+ // NB: Offsets into ctype<char>::_M_table force a particular size
2780+ // on the mask type. Because of this, we don't use an enum.
2781+ typedef __ctype_mask_t mask;
2782+
2783+ static const mask upper = _ISupper;
2784+ static const mask lower = _ISlower;
2785+ static const mask alpha = _ISalpha;
2786+ static const mask digit = _ISdigit;
2787+ static const mask xdigit = _ISxdigit;
2788+ static const mask space = _ISspace;
2789+ static const mask print = _ISprint;
2790+ static const mask graph = _ISgraph;
2791+ static const mask cntrl = _IScntrl;
2792+ static const mask punct = _ISpunct;
2793+ static const mask alnum = _ISalnum;
2794+ };
2795diff -urN gcc-3.3.2/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-3.3.2-uClibc/libstdc++-v3/config/os/uclibc/ctype_inline.h
2796--- gcc-3.3.2/libstdc++-v3/config/os/uclibc/ctype_inline.h 1969-12-31 18:00:00.000000000 -0600
2797+++ gcc-3.3.2-uClibc/libstdc++-v3/config/os/uclibc/ctype_inline.h 2002-06-24 00:49:19.000000000 -0500
2798@@ -0,0 +1,69 @@
2799+// Locale support -*- C++ -*-
2800+
2801+// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
2802+//
2803+// This file is part of the GNU ISO C++ Library. This library is free
2804+// software; you can redistribute it and/or modify it under the
2805+// terms of the GNU General Public License as published by the
2806+// Free Software Foundation; either version 2, or (at your option)
2807+// any later version.
2808+
2809+// This library is distributed in the hope that it will be useful,
2810+// but WITHOUT ANY WARRANTY; without even the implied warranty of
2811+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2812+// GNU General Public License for more details.
2813+
2814+// You should have received a copy of the GNU General Public License along
2815+// with this library; see the file COPYING. If not, write to the Free
2816+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2817+// USA.
2818+
2819+// As a special exception, you may use this file as part of a free software
2820+// library without restriction. Specifically, if other files instantiate
2821+// templates or use macros or inline functions from this file, or you compile
2822+// this file and link it with other files to produce an executable, this
2823+// file does not by itself cause the resulting executable to be covered by
2824+// the GNU General Public License. This exception does not however
2825+// invalidate any other reasons why the executable file might be covered by
2826+// the GNU General Public License.
2827+
2828+//
2829+// ISO C++ 14882: 22.1 Locales
2830+//
2831+
2832+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
2833+// functions go in ctype.cc
2834+
2835+ bool
2836+ ctype<char>::
2837+ is(mask __m, char __c) const
2838+ { return _M_table[static_cast<unsigned char>(__c)] & __m; }
2839+
2840+ const char*
2841+ ctype<char>::
2842+ is(const char* __low, const char* __high, mask* __vec) const
2843+ {
2844+ while (__low < __high)
2845+ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
2846+ return __high;
2847+ }
2848+
2849+ const char*
2850+ ctype<char>::
2851+ scan_is(mask __m, const char* __low, const char* __high) const
2852+ {
2853+ while (__low < __high
2854+ && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
2855+ ++__low;
2856+ return __low;
2857+ }
2858+
2859+ const char*
2860+ ctype<char>::
2861+ scan_not(mask __m, const char* __low, const char* __high) const
2862+ {
2863+ while (__low < __high
2864+ && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
2865+ ++__low;
2866+ return __low;
2867+ }
2868diff -urN gcc-3.3.2/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-3.3.2-uClibc/libstdc++-v3/config/os/uclibc/ctype_noninline.h
2869--- gcc-3.3.2/libstdc++-v3/config/os/uclibc/ctype_noninline.h 1969-12-31 18:00:00.000000000 -0600
2870+++ gcc-3.3.2-uClibc/libstdc++-v3/config/os/uclibc/ctype_noninline.h 2004-01-09 03:34:53.000000000 -0600
2871@@ -0,0 +1,90 @@
2872+// Locale support -*- C++ -*-
2873+
2874+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
2875+// Free Software Foundation, Inc.
2876+//
2877+// This file is part of the GNU ISO C++ Library. This library is free
2878+// software; you can redistribute it and/or modify it under the
2879+// terms of the GNU General Public License as published by the
2880+// Free Software Foundation; either version 2, or (at your option)
2881+// any later version.
2882+
2883+// This library is distributed in the hope that it will be useful,
2884+// but WITHOUT ANY WARRANTY; without even the implied warranty of
2885+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2886+// GNU General Public License for more details.
2887+
2888+// You should have received a copy of the GNU General Public License along
2889+// with this library; see the file COPYING. If not, write to the Free
2890+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2891+// USA.
2892+
2893+// As a special exception, you may use this file as part of a free software
2894+// library without restriction. Specifically, if other files instantiate
2895+// templates or use macros or inline functions from this file, or you compile
2896+// this file and link it with other files to produce an executable, this
2897+// file does not by itself cause the resulting executable to be covered by
2898+// the GNU General Public License. This exception does not however
2899+// invalidate any other reasons why the executable file might be covered by
2900+// the GNU General Public License.
2901+
2902+//
2903+// ISO C++ 14882: 22.1 Locales
2904+//
2905+
2906+// Information as gleaned from /usr/include/ctype.h
2907+
2908+ const ctype_base::mask*
2909+ ctype<char>::classic_table() throw()
2910+ {
2911+ return __C_ctype_b;
2912+ }
2913+
2914+ ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
2915+ size_t __refs)
2916+ : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
2917+ {
2918+ _M_toupper = __C_ctype_toupper;
2919+ _M_tolower = __C_ctype_tolower;
2920+ _M_table = __table ? __table : __C_ctype_b;
2921+ _M_c_locale_ctype = _S_c_locale;
2922+ }
2923+
2924+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) :
2925+ __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
2926+ {
2927+ _M_toupper = __C_ctype_toupper;
2928+ _M_tolower = __C_ctype_tolower;
2929+ _M_table = __table ? __table : __C_ctype_b;
2930+ _M_c_locale_ctype = _S_c_locale;
2931+ }
2932+
2933+ char
2934+ ctype<char>::do_toupper(char __c) const
2935+ { return _M_toupper[static_cast<unsigned char>(__c)]; }
2936+
2937+ const char*
2938+ ctype<char>::do_toupper(char* __low, const char* __high) const
2939+ {
2940+ while (__low < __high)
2941+ {
2942+ *__low = _M_toupper[static_cast<unsigned char>(*__low)];
2943+ ++__low;
2944+ }
2945+ return __high;
2946+ }
2947+
2948+ char
2949+ ctype<char>::do_tolower(char __c) const
2950+ { return _M_tolower[static_cast<unsigned char>(__c)]; }
2951+
2952+ const char*
2953+ ctype<char>::do_tolower(char* __low, const char* __high) const
2954+ {
2955+ while (__low < __high)
2956+ {
2957+ *__low = _M_tolower[static_cast<unsigned char>(*__low)];
2958+ ++__low;
2959+ }
2960+ return __high;
2961+ }
2962diff -urN gcc-3.3.2/libstdc++-v3/config/os/uclibc/os_defines.h gcc-3.3.2-uClibc/libstdc++-v3/config/os/uclibc/os_defines.h
2963--- gcc-3.3.2/libstdc++-v3/config/os/uclibc/os_defines.h 1969-12-31 18:00:00.000000000 -0600
2964+++ gcc-3.3.2-uClibc/libstdc++-v3/config/os/uclibc/os_defines.h 2004-01-09 04:56:13.000000000 -0600
2965@@ -0,0 +1,56 @@
2966+// Specific definitions for GNU/Linux -*- C++ -*-
2967+
2968+// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
2969+//
2970+// This file is part of the GNU ISO C++ Library. This library is free
2971+// software; you can redistribute it and/or modify it under the
2972+// terms of the GNU General Public License as published by the
2973+// Free Software Foundation; either version 2, or (at your option)
2974+// any later version.
2975+
2976+// This library is distributed in the hope that it will be useful,
2977+// but WITHOUT ANY WARRANTY; without even the implied warranty of
2978+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2979+// GNU General Public License for more details.
2980+
2981+// You should have received a copy of the GNU General Public License along
2982+// with this library; see the file COPYING. If not, write to the Free
2983+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
2984+// USA.
2985+
2986+// As a special exception, you may use this file as part of a free software
2987+// library without restriction. Specifically, if other files instantiate
2988+// templates or use macros or inline functions from this file, or you compile
2989+// this file and link it with other files to produce an executable, this
2990+// file does not by itself cause the resulting executable to be covered by
2991+// the GNU General Public License. This exception does not however
2992+// invalidate any other reasons why the executable file might be covered by
2993+// the GNU General Public License.
2994+
2995+#ifndef _GLIBCPP_OS_DEFINES
2996+#define _GLIBCPP_OS_DEFINES 1
2997+
2998+// System-specific #define, typedefs, corrections, etc, go here. This
2999+// file will come before all others.
3000+
3001+// This keeps isanum, et al from being propagated as macros.
3002+#define __NO_CTYPE 1
3003+
3004+#include <features.h>
3005+
3006+// These systems have declarations mismatching those in libio.h by
3007+// omitting throw qualifiers. Cleanest way out is to not provide
3008+// throw-qualifiers at all. Defining it as empty here will make libio.h
3009+// not define it.
3010+#undef __THROW
3011+#define __THROW
3012+
3013+// Tell Glibc not to try to provide its own inline versions of
3014+// some math functions. Those cause assembly-time clashes with
3015+// our definitions.
3016+#define __NO_MATH_INLINES
3017+
3018+// We must not see the optimized string functions GNU libc defines.
3019+#define __NO_STRING_INLINES
3020+
3021+#endif
diff --git a/meta/packages/gcc/gcc-3.3.4/gcc34-15089.patch b/meta/packages/gcc/gcc-3.3.4/gcc34-15089.patch
deleted file mode 100644
index 3b7a056e63..0000000000
--- a/meta/packages/gcc/gcc-3.3.4/gcc34-15089.patch
+++ /dev/null
@@ -1,19 +0,0 @@
12004-04-29 Philip Blundell <philb@gnu.org>
2
3 * loop.c (scan_loop): Don't delete SET of a hard register.
4
5Index: loop.c
6===================================================================
7RCS file: /cvs/gcc/gcc/gcc/loop.c,v
8retrieving revision 1.488.2.3
9diff -u -r1.488.2.3 loop.c
10--- gcc/gcc/loop.c 14 Feb 2004 14:46:03 -0000 1.488.2.3
11+++ gcc/gcc/loop.c 28 Apr 2004 22:02:53 -0000
12@@ -929,6 +929,7 @@
13 || (! (GET_CODE (SET_SRC (set)) == REG
14 && (REGNO (SET_SRC (set))
15 < FIRST_PSEUDO_REGISTER))))
16+ && regno >= FIRST_PSEUDO_REGISTER
17 /* This test is not redundant; SET_SRC (set) might be
18 a call-clobbered register and the life of REGNO
19 might span a call. */
diff --git a/meta/packages/gcc/gcc-3.3.4/libibery-crosstool.patch b/meta/packages/gcc/gcc-3.3.4/libibery-crosstool.patch
deleted file mode 100644
index 2898cf18ff..0000000000
--- a/meta/packages/gcc/gcc-3.3.4/libibery-crosstool.patch
+++ /dev/null
@@ -1,683 +0,0 @@
1diff -urN gcc-3.3.3.orig/libiberty/configure gcc-3.3.3/libiberty/configure
2--- gcc-3.3.3.orig/libiberty/configure 2003-11-12 12:32:29.000000000 -0500
3+++ gcc-3.3.3/libiberty/configure 2004-04-09 23:04:23.000000000 -0400
4@@ -1000,13 +1000,60 @@
5 fi
6
7
8+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
9+echo "configure:1005: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
10+
11+ac_ext=c
12+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
13+ac_cpp='$CPP $CPPFLAGS'
14+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
15+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
16+cross_compiling=$ac_cv_prog_cc_cross
17+
18+cat > conftest.$ac_ext << EOF
19+
20+#line 1016 "configure"
21+#include "confdefs.h"
22+
23+main(){return(0);}
24+EOF
25+if { (eval echo configure:1021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
26+ ac_cv_prog_cc_works=yes
27+ # If we can't run a trivial program, we are probably using a cross compiler.
28+ if (./conftest; exit) 2>/dev/null; then
29+ ac_cv_prog_cc_cross=no
30+ else
31+ ac_cv_prog_cc_cross=yes
32+ fi
33+else
34+ echo "configure: failed program was:" >&5
35+ cat conftest.$ac_ext >&5
36+ ac_cv_prog_cc_works=no
37+fi
38+rm -fr conftest*
39+ac_ext=c
40+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
41+ac_cpp='$CPP $CPPFLAGS'
42+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
43+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
44+cross_compiling=$ac_cv_prog_cc_cross
45+
46+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
47+if test $ac_cv_prog_cc_works = no; then
48+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
49+fi
50+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
51+echo "configure:1047: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
52+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
53+cross_compiling=$ac_cv_prog_cc_cross
54+
55
56 if test "x$CC" != xcc; then
57 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
58-echo "configure:1007: checking whether $CC and cc understand -c and -o together" >&5
59+echo "configure:1054: checking whether $CC and cc understand -c and -o together" >&5
60 else
61 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
62-echo "configure:1010: checking whether cc understands -c and -o together" >&5
63+echo "configure:1057: checking whether cc understands -c and -o together" >&5
64 fi
65 set dummy $CC; ac_cc="`echo $2 |
66 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
67@@ -1018,16 +1065,16 @@
68 # We do the test twice because some compilers refuse to overwrite an
69 # existing .o file with -o, though they will create one.
70 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
71-if { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
72- test -f conftest.o && { (eval echo configure:1023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
73+if { (eval echo configure:1069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
74+ test -f conftest.o && { (eval echo configure:1070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
75 then
76 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
77 if test "x$CC" != xcc; then
78 # Test first that cc exists at all.
79- if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
80+ if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
81 ac_try='cc -c conftest.c -o conftest.o 1>&5'
82- if { (eval echo configure:1030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
83- test -f conftest.o && { (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
84+ if { (eval echo configure:1077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
85+ test -f conftest.o && { (eval echo configure:1078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
86 then
87 # cc works too.
88 :
89@@ -1063,7 +1110,7 @@
90
91
92 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
93-echo "configure:1067: checking for POSIXized ISC" >&5
94+echo "configure:1114: checking for POSIXized ISC" >&5
95 if test -d /etc/conf/kconfig.d &&
96 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
97 then
98@@ -1084,12 +1131,12 @@
99 fi
100
101 echo $ac_n "checking for working const""... $ac_c" 1>&6
102-echo "configure:1088: checking for working const" >&5
103+echo "configure:1135: checking for working const" >&5
104 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
105 echo $ac_n "(cached) $ac_c" 1>&6
106 else
107 cat > conftest.$ac_ext <<EOF
108-#line 1093 "configure"
109+#line 1140 "configure"
110 #include "confdefs.h"
111
112 int main() {
113@@ -1138,7 +1185,7 @@
114
115 ; return 0; }
116 EOF
117-if { (eval echo configure:1142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
118+if { (eval echo configure:1189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
119 rm -rf conftest*
120 ac_cv_c_const=yes
121 else
122@@ -1159,21 +1206,21 @@
123 fi
124
125 echo $ac_n "checking for inline""... $ac_c" 1>&6
126-echo "configure:1163: checking for inline" >&5
127+echo "configure:1210: checking for inline" >&5
128 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
129 echo $ac_n "(cached) $ac_c" 1>&6
130 else
131 ac_cv_c_inline=no
132 for ac_kw in inline __inline__ __inline; do
133 cat > conftest.$ac_ext <<EOF
134-#line 1170 "configure"
135+#line 1217 "configure"
136 #include "confdefs.h"
137
138 int main() {
139 } $ac_kw foo() {
140 ; return 0; }
141 EOF
142-if { (eval echo configure:1177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
143+if { (eval echo configure:1224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
144 rm -rf conftest*
145 ac_cv_c_inline=$ac_kw; break
146 else
147@@ -1216,7 +1263,7 @@
148 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
149 # ./install, which can be erroneously created by make from ./install.sh.
150 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
151-echo "configure:1220: checking for a BSD compatible install" >&5
152+echo "configure:1267: checking for a BSD compatible install" >&5
153 if test -z "$INSTALL"; then
154 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
155 echo $ac_n "(cached) $ac_c" 1>&6
156@@ -1277,7 +1324,7 @@
157 # able to link anything, it had better be able to at least compile
158 # something.
159 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
160-echo "configure:1281: checking how to run the C preprocessor" >&5
161+echo "configure:1328: checking how to run the C preprocessor" >&5
162 # On Suns, sometimes $CPP names a directory.
163 if test -n "$CPP" && test -d "$CPP"; then
164 CPP=
165@@ -1292,13 +1339,13 @@
166 # On the NeXT, cc -E runs the code through the compiler's parser,
167 # not just through cpp.
168 cat > conftest.$ac_ext <<EOF
169-#line 1296 "configure"
170+#line 1343 "configure"
171 #include "confdefs.h"
172 #include <assert.h>
173 Syntax Error
174 EOF
175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
176-{ (eval echo configure:1302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
177+{ (eval echo configure:1349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
179 if test -z "$ac_err"; then
180 :
181@@ -1309,13 +1356,13 @@
182 rm -rf conftest*
183 CPP="${CC-cc} -E -traditional-cpp"
184 cat > conftest.$ac_ext <<EOF
185-#line 1313 "configure"
186+#line 1360 "configure"
187 #include "confdefs.h"
188 #include <assert.h>
189 Syntax Error
190 EOF
191 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
192-{ (eval echo configure:1319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
193+{ (eval echo configure:1366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
195 if test -z "$ac_err"; then
196 :
197@@ -1326,13 +1373,13 @@
198 rm -rf conftest*
199 CPP="${CC-cc} -nologo -E"
200 cat > conftest.$ac_ext <<EOF
201-#line 1330 "configure"
202+#line 1377 "configure"
203 #include "confdefs.h"
204 #include <assert.h>
205 Syntax Error
206 EOF
207 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
208-{ (eval echo configure:1336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
209+{ (eval echo configure:1383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
211 if test -z "$ac_err"; then
212 :
213@@ -1360,17 +1407,17 @@
214 do
215 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
216 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
217-echo "configure:1364: checking for $ac_hdr" >&5
218+echo "configure:1411: checking for $ac_hdr" >&5
219 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
220 echo $ac_n "(cached) $ac_c" 1>&6
221 else
222 cat > conftest.$ac_ext <<EOF
223-#line 1369 "configure"
224+#line 1416 "configure"
225 #include "confdefs.h"
226 #include <$ac_hdr>
227 EOF
228 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
229-{ (eval echo configure:1374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
230+{ (eval echo configure:1421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
232 if test -z "$ac_err"; then
233 rm -rf conftest*
234@@ -1397,12 +1444,12 @@
235 done
236
237 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
238-echo "configure:1401: checking for sys/wait.h that is POSIX.1 compatible" >&5
239+echo "configure:1448: checking for sys/wait.h that is POSIX.1 compatible" >&5
240 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
241 echo $ac_n "(cached) $ac_c" 1>&6
242 else
243 cat > conftest.$ac_ext <<EOF
244-#line 1406 "configure"
245+#line 1453 "configure"
246 #include "confdefs.h"
247 #include <sys/types.h>
248 #include <sys/wait.h>
249@@ -1418,7 +1465,7 @@
250 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
251 ; return 0; }
252 EOF
253-if { (eval echo configure:1422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
254+if { (eval echo configure:1469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
255 rm -rf conftest*
256 ac_cv_header_sys_wait_h=yes
257 else
258@@ -1439,12 +1486,12 @@
259 fi
260
261 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
262-echo "configure:1443: checking whether time.h and sys/time.h may both be included" >&5
263+echo "configure:1490: checking whether time.h and sys/time.h may both be included" >&5
264 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
265 echo $ac_n "(cached) $ac_c" 1>&6
266 else
267 cat > conftest.$ac_ext <<EOF
268-#line 1448 "configure"
269+#line 1495 "configure"
270 #include "confdefs.h"
271 #include <sys/types.h>
272 #include <sys/time.h>
273@@ -1453,7 +1500,7 @@
274 struct tm *tp;
275 ; return 0; }
276 EOF
277-if { (eval echo configure:1457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
278+if { (eval echo configure:1504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
279 rm -rf conftest*
280 ac_cv_header_time=yes
281 else
282@@ -1475,19 +1522,19 @@
283
284
285 echo $ac_n "checking whether errno must be declared""... $ac_c" 1>&6
286-echo "configure:1479: checking whether errno must be declared" >&5
287+echo "configure:1526: checking whether errno must be declared" >&5
288 if eval "test \"`echo '$''{'libiberty_cv_declare_errno'+set}'`\" = set"; then
289 echo $ac_n "(cached) $ac_c" 1>&6
290 else
291 cat > conftest.$ac_ext <<EOF
292-#line 1484 "configure"
293+#line 1531 "configure"
294 #include "confdefs.h"
295 #include <errno.h>
296 int main() {
297 int x = errno;
298 ; return 0; }
299 EOF
300-if { (eval echo configure:1491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
301+if { (eval echo configure:1538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
302 rm -rf conftest*
303 libiberty_cv_declare_errno=no
304 else
305@@ -1509,12 +1556,12 @@
306
307
308 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
309-echo "configure:1513: checking for ANSI C header files" >&5
310+echo "configure:1560: checking for ANSI C header files" >&5
311 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
312 echo $ac_n "(cached) $ac_c" 1>&6
313 else
314 cat > conftest.$ac_ext <<EOF
315-#line 1518 "configure"
316+#line 1565 "configure"
317 #include "confdefs.h"
318 #include <stdlib.h>
319 #include <stdarg.h>
320@@ -1522,7 +1569,7 @@
321 #include <float.h>
322 EOF
323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
324-{ (eval echo configure:1526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
325+{ (eval echo configure:1573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
327 if test -z "$ac_err"; then
328 rm -rf conftest*
329@@ -1539,7 +1586,7 @@
330 if test $ac_cv_header_stdc = yes; then
331 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
332 cat > conftest.$ac_ext <<EOF
333-#line 1543 "configure"
334+#line 1590 "configure"
335 #include "confdefs.h"
336 #include <string.h>
337 EOF
338@@ -1557,7 +1604,7 @@
339 if test $ac_cv_header_stdc = yes; then
340 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
341 cat > conftest.$ac_ext <<EOF
342-#line 1561 "configure"
343+#line 1608 "configure"
344 #include "confdefs.h"
345 #include <stdlib.h>
346 EOF
347@@ -1578,7 +1625,7 @@
348 :
349 else
350 cat > conftest.$ac_ext <<EOF
351-#line 1582 "configure"
352+#line 1629 "configure"
353 #include "confdefs.h"
354 #include <ctype.h>
355 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
356@@ -1589,7 +1636,7 @@
357 exit (0); }
358
359 EOF
360-if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
361+if { (eval echo configure:1640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
362 then
363 :
364 else
365@@ -1613,12 +1660,12 @@
366 fi
367
368 echo $ac_n "checking for uintptr_t""... $ac_c" 1>&6
369-echo "configure:1617: checking for uintptr_t" >&5
370+echo "configure:1664: checking for uintptr_t" >&5
371 if eval "test \"`echo '$''{'ac_cv_type_uintptr_t'+set}'`\" = set"; then
372 echo $ac_n "(cached) $ac_c" 1>&6
373 else
374 cat > conftest.$ac_ext <<EOF
375-#line 1622 "configure"
376+#line 1669 "configure"
377 #include "confdefs.h"
378 #include <sys/types.h>
379 #if STDC_HEADERS
380@@ -1654,12 +1701,12 @@
381
382
383 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
384-echo "configure:1658: checking for pid_t" >&5
385+echo "configure:1705: checking for pid_t" >&5
386 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
387 echo $ac_n "(cached) $ac_c" 1>&6
388 else
389 cat > conftest.$ac_ext <<EOF
390-#line 1663 "configure"
391+#line 1710 "configure"
392 #include "confdefs.h"
393 #include <sys/types.h>
394 #if STDC_HEADERS
395@@ -1746,12 +1793,12 @@
396 for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock
397 do
398 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
399-echo "configure:1750: checking for $ac_func" >&5
400+echo "configure:1797: checking for $ac_func" >&5
401 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
402 echo $ac_n "(cached) $ac_c" 1>&6
403 else
404 cat > conftest.$ac_ext <<EOF
405-#line 1755 "configure"
406+#line 1802 "configure"
407 #include "confdefs.h"
408 /* System header to define __stub macros and hopefully few prototypes,
409 which can conflict with char $ac_func(); below. */
410@@ -1774,7 +1821,7 @@
411
412 ; return 0; }
413 EOF
414-if { (eval echo configure:1778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
415+if { (eval echo configure:1825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
416 rm -rf conftest*
417 eval "ac_cv_func_$ac_func=yes"
418 else
419@@ -1801,12 +1848,12 @@
420 for ac_func in getcwd getpagesize index insque mkstemps memchr memcmp memcpy
421 do
422 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
423-echo "configure:1805: checking for $ac_func" >&5
424+echo "configure:1852: checking for $ac_func" >&5
425 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
426 echo $ac_n "(cached) $ac_c" 1>&6
427 else
428 cat > conftest.$ac_ext <<EOF
429-#line 1810 "configure"
430+#line 1857 "configure"
431 #include "confdefs.h"
432 /* System header to define __stub macros and hopefully few prototypes,
433 which can conflict with char $ac_func(); below. */
434@@ -1829,7 +1876,7 @@
435
436 ; return 0; }
437 EOF
438-if { (eval echo configure:1833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
439+if { (eval echo configure:1880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
440 rm -rf conftest*
441 eval "ac_cv_func_$ac_func=yes"
442 else
443@@ -1856,12 +1903,12 @@
444 for ac_func in memmove memset putenv random rename rindex sigsetmask
445 do
446 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
447-echo "configure:1860: checking for $ac_func" >&5
448+echo "configure:1907: checking for $ac_func" >&5
449 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
450 echo $ac_n "(cached) $ac_c" 1>&6
451 else
452 cat > conftest.$ac_ext <<EOF
453-#line 1865 "configure"
454+#line 1912 "configure"
455 #include "confdefs.h"
456 /* System header to define __stub macros and hopefully few prototypes,
457 which can conflict with char $ac_func(); below. */
458@@ -1884,7 +1931,7 @@
459
460 ; return 0; }
461 EOF
462-if { (eval echo configure:1888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
463+if { (eval echo configure:1935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
464 rm -rf conftest*
465 eval "ac_cv_func_$ac_func=yes"
466 else
467@@ -1911,12 +1958,12 @@
468 for ac_func in strcasecmp setenv strchr strdup strncasecmp strrchr strstr
469 do
470 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
471-echo "configure:1915: checking for $ac_func" >&5
472+echo "configure:1962: checking for $ac_func" >&5
473 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
474 echo $ac_n "(cached) $ac_c" 1>&6
475 else
476 cat > conftest.$ac_ext <<EOF
477-#line 1920 "configure"
478+#line 1967 "configure"
479 #include "confdefs.h"
480 /* System header to define __stub macros and hopefully few prototypes,
481 which can conflict with char $ac_func(); below. */
482@@ -1939,7 +1986,7 @@
483
484 ; return 0; }
485 EOF
486-if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
487+if { (eval echo configure:1990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
488 rm -rf conftest*
489 eval "ac_cv_func_$ac_func=yes"
490 else
491@@ -1966,12 +2013,12 @@
492 for ac_func in strtod strtol strtoul tmpnam vasprintf vfprintf vprintf
493 do
494 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
495-echo "configure:1970: checking for $ac_func" >&5
496+echo "configure:2017: checking for $ac_func" >&5
497 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
498 echo $ac_n "(cached) $ac_c" 1>&6
499 else
500 cat > conftest.$ac_ext <<EOF
501-#line 1975 "configure"
502+#line 2022 "configure"
503 #include "confdefs.h"
504 /* System header to define __stub macros and hopefully few prototypes,
505 which can conflict with char $ac_func(); below. */
506@@ -1994,7 +2041,7 @@
507
508 ; return 0; }
509 EOF
510-if { (eval echo configure:1998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
511+if { (eval echo configure:2045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
512 rm -rf conftest*
513 eval "ac_cv_func_$ac_func=yes"
514 else
515@@ -2021,12 +2068,12 @@
516 for ac_func in vsprintf waitpid getrusage on_exit psignal strerror strsignal
517 do
518 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
519-echo "configure:2025: checking for $ac_func" >&5
520+echo "configure:2072: checking for $ac_func" >&5
521 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
522 echo $ac_n "(cached) $ac_c" 1>&6
523 else
524 cat > conftest.$ac_ext <<EOF
525-#line 2030 "configure"
526+#line 2077 "configure"
527 #include "confdefs.h"
528 /* System header to define __stub macros and hopefully few prototypes,
529 which can conflict with char $ac_func(); below. */
530@@ -2049,7 +2096,7 @@
531
532 ; return 0; }
533 EOF
534-if { (eval echo configure:2053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
535+if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
536 rm -rf conftest*
537 eval "ac_cv_func_$ac_func=yes"
538 else
539@@ -2076,12 +2123,12 @@
540 for ac_func in sysconf times sbrk gettimeofday ffs
541 do
542 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
543-echo "configure:2080: checking for $ac_func" >&5
544+echo "configure:2127: checking for $ac_func" >&5
545 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
546 echo $ac_n "(cached) $ac_c" 1>&6
547 else
548 cat > conftest.$ac_ext <<EOF
549-#line 2085 "configure"
550+#line 2132 "configure"
551 #include "confdefs.h"
552 /* System header to define __stub macros and hopefully few prototypes,
553 which can conflict with char $ac_func(); below. */
554@@ -2104,7 +2151,7 @@
555
556 ; return 0; }
557 EOF
558-if { (eval echo configure:2108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
559+if { (eval echo configure:2155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
560 rm -rf conftest*
561 eval "ac_cv_func_$ac_func=yes"
562 else
563@@ -2131,12 +2178,12 @@
564 for ac_func in realpath canonicalize_file_name
565 do
566 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
567-echo "configure:2135: checking for $ac_func" >&5
568+echo "configure:2182: checking for $ac_func" >&5
569 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
570 echo $ac_n "(cached) $ac_c" 1>&6
571 else
572 cat > conftest.$ac_ext <<EOF
573-#line 2140 "configure"
574+#line 2187 "configure"
575 #include "confdefs.h"
576 /* System header to define __stub macros and hopefully few prototypes,
577 which can conflict with char $ac_func(); below. */
578@@ -2159,7 +2206,7 @@
579
580 ; return 0; }
581 EOF
582-if { (eval echo configure:2163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
583+if { (eval echo configure:2210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
584 rm -rf conftest*
585 eval "ac_cv_func_$ac_func=yes"
586 else
587@@ -2186,12 +2233,12 @@
588 for ac_func in pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl
589 do
590 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
591-echo "configure:2190: checking for $ac_func" >&5
592+echo "configure:2237: checking for $ac_func" >&5
593 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
594 echo $ac_n "(cached) $ac_c" 1>&6
595 else
596 cat > conftest.$ac_ext <<EOF
597-#line 2195 "configure"
598+#line 2242 "configure"
599 #include "confdefs.h"
600 /* System header to define __stub macros and hopefully few prototypes,
601 which can conflict with char $ac_func(); below. */
602@@ -2214,7 +2261,7 @@
603
604 ; return 0; }
605 EOF
606-if { (eval echo configure:2218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
607+if { (eval echo configure:2265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
608 rm -rf conftest*
609 eval "ac_cv_func_$ac_func=yes"
610 else
611@@ -2443,53 +2490,6 @@
612
613 # We haven't set the list of objects yet. Use the standard autoconf
614 # tests. This will only work if the compiler works.
615- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
616-echo "configure:2448: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
617-
618-ac_ext=c
619-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
620-ac_cpp='$CPP $CPPFLAGS'
621-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
622-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
623-cross_compiling=$ac_cv_prog_cc_cross
624-
625-cat > conftest.$ac_ext << EOF
626-
627-#line 2459 "configure"
628-#include "confdefs.h"
629-
630-main(){return(0);}
631-EOF
632-if { (eval echo configure:2464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
633- ac_cv_prog_cc_works=yes
634- # If we can't run a trivial program, we are probably using a cross compiler.
635- if (./conftest; exit) 2>/dev/null; then
636- ac_cv_prog_cc_cross=no
637- else
638- ac_cv_prog_cc_cross=yes
639- fi
640-else
641- echo "configure: failed program was:" >&5
642- cat conftest.$ac_ext >&5
643- ac_cv_prog_cc_works=no
644-fi
645-rm -fr conftest*
646-ac_ext=c
647-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
648-ac_cpp='$CPP $CPPFLAGS'
649-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
650-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
651-cross_compiling=$ac_cv_prog_cc_cross
652-
653-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
654-if test $ac_cv_prog_cc_works = no; then
655- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
656-fi
657-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
658-echo "configure:2490: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
659-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
660-cross_compiling=$ac_cv_prog_cc_cross
661-
662 for ac_func in $funcs
663 do
664 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
665diff -urN gcc-3.3.3.orig/libiberty/configure.in gcc-3.3.3/libiberty/configure.in
666--- gcc-3.3.3.orig/libiberty/configure.in 2003-11-12 12:32:30.000000000 -0500
667+++ gcc-3.3.3/libiberty/configure.in 2004-04-09 23:04:05.000000000 -0400
668@@ -100,6 +100,7 @@
669 AC_CHECK_TOOL(RANLIB, ranlib, :)
670
671 LIB_AC_PROG_CC
672+AC_PROG_CC_WORKS
673
674 AC_PROG_CC_C_O
675 # autoconf is lame and doesn't give us any substitution variable for this.
676@@ -396,7 +397,6 @@
677
678 # We haven't set the list of objects yet. Use the standard autoconf
679 # tests. This will only work if the compiler works.
680- AC_PROG_CC_WORKS
681 AC_REPLACE_FUNCS($funcs)
682 libiberty_AC_FUNC_C_ALLOCA
683 AC_FUNC_VFORK
diff --git a/meta/packages/gcc/gcc-3.3.4/reverse-compare.patch b/meta/packages/gcc/gcc-3.3.4/reverse-compare.patch
deleted file mode 100644
index 7b6c1b6425..0000000000
--- a/meta/packages/gcc/gcc-3.3.4/reverse-compare.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1--- gcc-3.3.3/gcc/flow.c~ 2003-07-30 01:57:24.000000000 +0100
2+++ gcc-3.3.3/gcc/flow.c 2004-04-23 19:23:43.000000000 +0100
3@@ -1904,6 +1904,7 @@
4 regset diff = INITIALIZE_REG_SET (diff_head);
5 basic_block bb_true, bb_false;
6 rtx cond_true, cond_false, set_src;
7+ enum rtx_code reversed_code;
8 int i;
9
10 /* Identify the successor blocks. */
11@@ -1934,7 +1935,11 @@
12 /* Extract the condition from the branch. */
13 set_src = SET_SRC (pc_set (bb->end));
14 cond_true = XEXP (set_src, 0);
15- cond_false = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond_true)),
16+ reversed_code = reverse_condition (GET_CODE (cond_true));
17+ if (reversed_code == UNKNOWN)
18+ goto skip;
19+
20+ cond_false = gen_rtx_fmt_ee (reversed_code,
21 GET_MODE (cond_true), XEXP (cond_true, 0),
22 XEXP (cond_true, 1));
23 if (GET_CODE (XEXP (set_src, 1)) == PC)
24@@ -1980,6 +1985,7 @@
25 });
26 }
27
28+ skip:
29 FREE_REG_SET (diff);
30 }
31 #endif
diff --git a/meta/packages/gcc/gcc-3.3.4/sdk-libstdc++-includes.patch b/meta/packages/gcc/gcc-3.3.4/sdk-libstdc++-includes.patch
deleted file mode 100644
index 9eb7d01fce..0000000000
--- a/meta/packages/gcc/gcc-3.3.4/sdk-libstdc++-includes.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1--- gcc-3.3.4/libstdc++-v3/testsuite/Makefile.am~ 2003-12-10 21:53:55.000000000 +0000
2+++ gcc-3.3.4/libstdc++-v3/testsuite/Makefile.am 2004-08-22 11:43:54.676189984 +0100
3@@ -53,7 +53,8 @@
4
5 INCLUDES = \
6 -nostdinc++ \
7- @GLIBCPP_INCLUDES@ @LIBSUPCXX_INCLUDES@ @TOPLEVEL_INCLUDES@
8+ @GLIBCPP_INCLUDES@ @LIBSUPCXX_INCLUDES@ @TOPLEVEL_INCLUDES@ \
9+ -I$(toplevel_srcdir)/include
10
11 ## Build support library.
12 noinst_LIBRARIES = libv3test.a
13--- gcc-3.3.4/libstdc++-v3/src/Makefile.am~ 2004-01-12 23:00:30.000000000 +0000
14+++ gcc-3.3.4/libstdc++-v3/src/Makefile.am 2004-08-22 11:12:34.838968680 +0100
15@@ -191,7 +191,8 @@
16 $(LIBSUPCXX_CXXFLAGS) \
17 $(WARN_CXXFLAGS) \
18 $(OPTIMIZE_CXXFLAGS) \
19- $(CONFIG_CXXFLAGS)
20+ $(CONFIG_CXXFLAGS) \
21+ -I$(toplevel_srcdir)/include
22
23
24 # libstdc++ libtool notes
25--- gcc-3.3.4/libstdc++-v3/testsuite/Makefile.in~ 2003-12-10 21:53:55.000000000 +0000
26+++ gcc-3.3.4/libstdc++-v3/testsuite/Makefile.in 2004-08-22 11:44:09.634915912 +0100
27@@ -175,7 +175,8 @@
28
29 INCLUDES = \
30 -nostdinc++ \
31- @GLIBCPP_INCLUDES@ @LIBSUPCXX_INCLUDES@ @TOPLEVEL_INCLUDES@
32+ @GLIBCPP_INCLUDES@ @LIBSUPCXX_INCLUDES@ @TOPLEVEL_INCLUDES@ \
33+ -I$(toplevel_srcdir)/include
34
35
36 noinst_LIBRARIES = libv3test.a
37--- gcc-3.3.4/libstdc++-v3/src/Makefile.in~ 2004-01-12 23:00:29.000000000 +0000
38+++ gcc-3.3.4/libstdc++-v3/src/Makefile.in 2004-08-22 11:27:29.380977624 +0100
39@@ -263,7 +263,8 @@
40 $(LIBSUPCXX_CXXFLAGS) \
41 $(WARN_CXXFLAGS) \
42 $(OPTIMIZE_CXXFLAGS) \
43- $(CONFIG_CXXFLAGS)
44+ $(CONFIG_CXXFLAGS) \
45+ -I$(toplevel_srcdir)/include
46
47
48 # libstdc++ libtool notes
diff --git a/meta/packages/gcc/gcc-cross-initial_3.3.4.bb b/meta/packages/gcc/gcc-cross-initial_3.3.4.bb
deleted file mode 100644
index 1639511362..0000000000
--- a/meta/packages/gcc/gcc-cross-initial_3.3.4.bb
+++ /dev/null
@@ -1,2 +0,0 @@
1require gcc-cross_${PV}.bb
2require gcc-cross-initial.inc
diff --git a/meta/packages/gcc/gcc-cross_3.3.4.bb b/meta/packages/gcc/gcc-cross_3.3.4.bb
deleted file mode 100644
index f7a2cded51..0000000000
--- a/meta/packages/gcc/gcc-cross_3.3.4.bb
+++ /dev/null
@@ -1,13 +0,0 @@
1SECTION = "devel"
2require gcc_${PV}.bb
3require gcc-paths-cross.inc
4inherit cross
5FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
6
7PR="r3"
8
9DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
10PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
11
12require gcc3-build-cross.inc
13require gcc-package-cross.inc \ No newline at end of file
diff --git a/meta/packages/gcc/gcc_3.3.4.bb b/meta/packages/gcc/gcc_3.3.4.bb
deleted file mode 100644
index 00adcac3ec..0000000000
--- a/meta/packages/gcc/gcc_3.3.4.bb
+++ /dev/null
@@ -1,169 +0,0 @@
1SECTION = "devel"
2PR = "r2"
3inherit autotools gettext
4
5DESCRIPTION = "The GNU cc and gcc C compilers."
6HOMEPAGE = "http://www.gnu.org/software/gcc/"
7LICENSE = "GPL"
8
9# libgcc libstdc++ libg2c are listed in our FILES_*, but are actually
10# packaged in the respective cross packages.
11PACKAGES = "${PN} ${PN}-symlinks \
12 ${PN}-c++ ${PN}-c++-symlinks \
13 ${PN}-f77 ${PN}-f77-symlinks \
14 libstdc++-dev libg2c-dev \
15 ${PN}-doc"
16
17FILES_${PN} = "${bindir}/${TARGET_PREFIX}gcc \
18 ${bindir}/${TARGET_PREFIX}cpp \
19 ${bindir}/${TARGET_PREFIX}gcov \
20 ${bindir}/${TARGET_PREFIX}gccbug \
21 ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/cc1 \
22 ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/collect2 \
23 ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/crt* \
24 ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/specs \
25 ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/lib* \
26 ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/include"
27
28FILES_${PN}-symlinks = "${bindir}/cc \
29 ${bindir}/gcc \
30 ${bindir}/cpp \
31 ${bindir}/gcov \
32 ${bindir}/gccbug"
33
34FILES_${PN}-c++ = "${bindir}/${TARGET_PREFIX}g++ \
35 ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/cc1plus"
36
37FILES_${PN}-c++-symlinks = "${bindir}/c++ \
38 ${bindir}/g++"
39
40FILES_libgcc = "/lib/libgcc_s.so.*"
41
42# Called from within gcc-cross, so libdir is set wrong
43#FILES_libstdc++ = "${libdir}/libstdc++.so.*"
44FILES_libstdc++ = "${libdir}/libstdc++.so.*"
45
46FILES_libstdc++-dev = "${includedir}/c++/${PV} \
47 ${libdir}/libstdc++.so \
48 ${libdir}/libstdc++.la \
49 ${libdir}/libstdc++.a \
50 ${libdir}/libsupc++.la \
51 ${libdir}/libsupc++.a"
52
53FILES_${PN}-doc = "${infodir} \
54 ${mandir} \
55 ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/include/README"
56
57SRC_URI = "${GNU_MIRROR}/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2 \
58 file://arm-gotoff.dpatch;patch=1;pnum=0 \
59 file://arm-ldm.dpatch;patch=1;pnum=0 \
60 file://arm-tune.patch;patch=1;pnum=0 \
61 file://arm-ldm-peephole.patch;patch=1;pnum=0 \
62 file://libibery-crosstool.patch;patch=1;pnum=1 \
63 file://reverse-compare.patch;patch=1 \
64 file://gcc34-15089.patch;patch=1 \
65 file://gcc-uclibc-3.3-100-conf.patch;patch=1 \
66 file://gcc-uclibc-3.3-110-conf.patch;patch=1 \
67 file://gcc-uclibc-3.3-120-softfloat.patch;patch=1 \
68 file://gcc-uclibc-3.3-200-code.patch;patch=1 \
69 file://bash3.patch;patch=1"
70
71PREMIRRORS_prepend () {
72${GNU_MIRROR}/gcc/releases/ ftp://gcc.gnu.org/pub/gcc/releases/
73${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
74}
75
76S = "${WORKDIR}/gcc-${PV}"
77B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
78
79EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \
80 --with-gnu-ld \
81 --enable-shared \
82 --enable-multilib \
83 --enable-target-optspace \
84 --enable-languages=c,c++,f77 \
85 --enable-threads=posix \
86 --enable-c99 \
87 --enable-long-long \
88 --enable-symvers=gnu \
89 --program-prefix=${TARGET_PREFIX} \
90 ${EXTRA_OECONF_PATHS} \
91 ${EXTRA_OECONF_DEP}"
92
93EXTRA_OECONF_PATHS = "--with-local-prefix=${prefix}/local \
94 --with-gxx-include-dir=${includedir}/c++/${PV}"
95
96EXTRA_OECONF_DEP = ""
97EXTRA_OECONF_uclibc = "--disable-__cxa_atexit"
98EXTRA_OECONF_glibc = "--enable-__cxa_atexit"
99EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}"
100
101require gcc-fpu.inc
102
103python __anonymous () {
104 import bb, re
105 if (re.match('linux-uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None):
106 bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_uclibc}', d)
107 elif (re.match('linux$', bb.data.getVar('TARGET_OS', d, 1)) != None):
108 bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_glibc}', d)
109}
110
111do_configure () {
112 # Setup these vars for cross building only
113 if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
114 export CC_FOR_TARGET="${CCACHE} ${HOST_PREFIX}gcc"
115 export GCC_FOR_TARGET="${CCACHE} ${HOST_PREFIX}gcc"
116 export CXX_FOR_TARGET="${CCACHE} ${HOST_PREFIX}g++"
117 export AS_FOR_TARGET="${HOST_PREFIX}as"
118 export LD_FOR_TARGET="${HOST_PREFIX}ld"
119 export NM_FOR_TARGET="${HOST_PREFIX}nm"
120 export AR_FOR_TARGET="${HOST_PREFIX}ar"
121 export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
122 fi
123 (cd ${S} && gnu-configize) || die "failure running gnu-configize"
124 oe_runconf
125}
126
127do_install () {
128 autotools_do_install
129
130 # Cleanup some of the gcc-lib stuff
131 rm -rf ${D}${libdir}/gcc-lib/${TARGET_SYS}/${PV}/install-tools
132
133 # Move libgcc_s into /lib
134 mkdir -p ${D}${base_libdir}
135 mv -f ${D}${libdir}/libgcc_s.so.* ${D}${base_libdir}
136 rm -f ${D}${libdir}/libgcc_s.so
137 ln -sf `echo ${libdir}/gcc-lib/${TARGET_SYS}/${PV} | tr -s / |
138 sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.? \
139 ${D}${libdir}/gcc-lib/${TARGET_SYS}/${PV}/libgcc_s.so
140
141 # Cleanup manpages..
142 rm -rf ${D}${mandir}/man7
143 mv ${D}${mandir}/man1/cpp.1 \
144 ${D}${mandir}/man1/${TARGET_SYS}-cpp.1
145 mv ${D}${mandir}/man1/gcov.1 \
146 ${D}${mandir}/man1/${TARGET_SYS}-gcov.1
147
148 # We use libiberty from binutils
149 rm -f ${D}${libdir}/libiberty.a
150
151 cd ${D}${bindir}
152
153 # We care about g++ not c++
154 rm -f *c++
155
156 # We don't care about the gcc-<version> ones for this
157 rm -f *gcc-?.?*
158
159 # These sometimes show up, they are strange, we remove them
160 rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-*
161
162 # Symlinks so we can use these trivially on the target
163 ln -sf ${TARGET_SYS}-g77 g77
164 ln -sf ${TARGET_SYS}-g++ g++
165 ln -sf ${TARGET_SYS}-gcc gcc
166 ln -sf g77 f77
167 ln -sf g++ c++
168 ln -sf gcc cc
169}