summaryrefslogtreecommitdiff
path: root/packages/gcc/gcc-4.1.1/ppc-gcc-41-20060515.patch
blob: 166e79c7e9e3719669845ecf3a88fc5d60a2e904 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/ChangeLog gcc-41-20060515/gcc/ChangeLog
--- gcc-41-20060515.orig/gcc/ChangeLog	2006-05-15 11:14:20.000000000 -0500
+++ gcc-41-20060515/gcc/ChangeLog	2006-05-15 14:00:27.693964000 -0500
@@ -724,6 +724,51 @@
 	* reload1.c (choose_reload_regs): Added call of regno_clobbered_p 
 	with new meaning of SETS.
 
+2006-02-14  Jakub Jelinek  <jakub@redhat.com>
+	    Aldy Hernandez  <aldyh@redhat.com>
+
+	PR target/25864
+	* configure.ac: Add --with{out}-long-double-128 configure option.
+	(TARGET_DEFAULT_LONG_DOUBLE_128): New test.
+	* configure: Rebuilt.
+	* config.in: Rebuilt.
+	* doc/install.texi (Options specification): Document
+	--with-long-double-128.
+
+	* config.gcc (sparc-*-linux*): Add sparc/t-linux to tmake_file.
+	(sparc64-*-linux*): Likewise.
+	* config/sparc/t-linux64 (SHLIB_MAPFILES): Removed.
+	* config/sparc/t-linux: New file.
+	* config/sparc/libgcc-sparc-glibc.ver (__fixtfdi, __fixunstfdi,
+	__floatditf): Export at GCC_LDBL_3.0 if -m32 -mlong-double-128.
+	(__divtc3, __multc3, __powitf2): Export at GCC_LDBL_4.0.0 if
+	-m32 -mlong-double-128.
+
+	* config.gcc (alpha*-*-linux*): Add alpha/t-linux to tmake_file.
+	* config/alpha/t-linux: New file.
+	* config/alpha/libgcc-alpha-ldbl.ver: New file.
+
+	* config/sparc/linux.h (TARGET_OS_CPP_BUILTINS): Define
+	__LONG_DOUBLE_128__ if TARGET_LONG_DOUBLE_128.
+	(CPP_SUBTARGET_SPEC): Don't add -D__LONG_DOUBLE_128__ here.
+	* config/sparc/linux64.h (TARGET_OS_CPP_BUILTINS): Define
+	__LONG_DOUBLE_128__ if TARGET_LONG_DOUBLE_128 and TARGET_ARCH32.
+	(CPP_ARCH32_SPEC): Remove.
+
+	* config/s390/s390.c (override_options): Handle
+	TARGET_DEFAULT_LONG_DOUBLE_128.
+
+	* config/alpha/alpha.c (override_options): Handle
+	TARGET_DEFAULT_LONG_DOUBLE_128.
+
+	* config/sparc/sparc.c (sparc_override_options): Handle
+	TARGET_DEFAULT_LONG_DOUBLE_128.
+
+	* config/rs6000/linux.h [TARGET_DEFAULT_LONG_DOUBLE_128]
+	(RS6000_DEFAULT_LONG_DOUBLE_SIZE): Define to 128.
+	* config/rs6000/linux64.h [TARGET_DEFAULT_LONG_DOUBLE_128]
+	(RS6000_DEFAULT_LONG_DOUBLE_SIZE): Define to 128.
+
 2006-02-19  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
 	* doc/install.texi: Add missing `@samp'.
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/alpha/alpha.c gcc-41-20060515/gcc/config/alpha/alpha.c
--- gcc-41-20060515.orig/gcc/config/alpha/alpha.c	2006-05-15 11:13:49.000000000 -0500
+++ gcc-41-20060515/gcc/config/alpha/alpha.c	2006-05-15 13:47:27.566272961 -0500
@@ -516,6 +516,11 @@ override_options (void)
       REAL_MODE_FORMAT (DFmode) = &vax_g_format;
       REAL_MODE_FORMAT (TFmode) = NULL;
     }
+
+#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
+  if (!(target_flags_explicit & MASK_LONG_DOUBLE_128))
+    target_flags |= MASK_LONG_DOUBLE_128;
+#endif
 }
 
 /* Returns 1 if VALUE is a mask that contains full bytes of zero or ones.  */
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/alpha/libgcc-alpha-ldbl.ver gcc-41-20060515/gcc/config/alpha/libgcc-alpha-ldbl.ver
--- gcc-41-20060515.orig/gcc/config/alpha/libgcc-alpha-ldbl.ver	1969-12-31 18:00:00.000000000 -0600
+++ gcc-41-20060515/gcc/config/alpha/libgcc-alpha-ldbl.ver	2006-05-15 13:47:27.566272961 -0500
@@ -0,0 +1,32 @@
+%ifdef __LONG_DOUBLE_128__
+
+# long double 128 bit support in libgcc_s.so.1 is only available
+# when configured with --with-long-double-128.  Make sure all the
+# symbols are available at @@GCC_LDBL_* versions to make it clear
+# there is a configurable symbol set.
+
+%exclude {
+  __fixtfdi
+  __fixunstfdi
+  __floatditf
+
+  __divtc3
+  __multc3
+  __powitf2
+}
+
+%inherit GCC_LDBL_3.0 GCC_3.0
+GCC_LDBL_3.0 {
+  __fixtfdi
+  __fixunstfdi
+  __floatditf
+}
+
+%inherit GCC_LDBL_4.0.0 GCC_4.0.0
+GCC_LDBL_4.0.0 {
+  __divtc3
+  __multc3
+  __powitf2
+}
+
+%endif
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/alpha/t-linux gcc-41-20060515/gcc/config/alpha/t-linux
--- gcc-41-20060515.orig/gcc/config/alpha/t-linux	1969-12-31 18:00:00.000000000 -0600
+++ gcc-41-20060515/gcc/config/alpha/t-linux	2006-05-15 13:47:27.567272807 -0500
@@ -0,0 +1 @@
+SHLIB_MAPFILES += $(srcdir)/config/alpha/libgcc-alpha-ldbl.ver
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/rs6000/linux64.h gcc-41-20060515/gcc/config/rs6000/linux64.h
--- gcc-41-20060515.orig/gcc/config/rs6000/linux64.h	2006-05-15 11:14:02.000000000 -0500
+++ gcc-41-20060515/gcc/config/rs6000/linux64.h	2006-05-15 13:47:27.568272653 -0500
@@ -570,3 +570,8 @@ while (0)
 #endif
 
 #define POWERPC_LINUX
+
+/* ppc{32,64} linux has 128-bit long double support in glibc 2.4 and later.  */
+#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
+#define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
+#endif
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/rs6000/linux.h gcc-41-20060515/gcc/config/rs6000/linux.h
--- gcc-41-20060515.orig/gcc/config/rs6000/linux.h	2006-05-15 11:14:02.000000000 -0500
+++ gcc-41-20060515/gcc/config/rs6000/linux.h	2006-05-15 13:47:27.567272807 -0500
@@ -120,3 +120,8 @@
 #endif
 
 #define POWERPC_LINUX
+
+/* ppc linux has 128-bit long double support in glibc 2.4 and later.  */
+#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
+#define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
+#endif
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/s390/s390.c gcc-41-20060515/gcc/config/s390/s390.c
--- gcc-41-20060515.orig/gcc/config/s390/s390.c	2006-05-15 11:13:50.000000000 -0500
+++ gcc-41-20060515/gcc/config/s390/s390.c	2006-05-15 13:47:27.574271730 -0500
@@ -1415,6 +1415,11 @@ override_options (void)
     }
   else if (s390_stack_guard)
     error ("-mstack-guard implies use of -mstack-size"); 
+
+#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
+  if (!(target_flags_explicit & MASK_LONG_DOUBLE_128))
+    target_flags |= MASK_LONG_DOUBLE_128;
+#endif
 }
 
 /* Map for smallest class containing reg regno.  */
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/sparc/libgcc-sparc-glibc.ver gcc-41-20060515/gcc/config/sparc/libgcc-sparc-glibc.ver
--- gcc-41-20060515.orig/gcc/config/sparc/libgcc-sparc-glibc.ver	2006-05-15 11:13:55.000000000 -0500
+++ gcc-41-20060515/gcc/config/sparc/libgcc-sparc-glibc.ver	2006-05-15 13:47:27.574271730 -0500
@@ -26,3 +26,36 @@ GLIBC_VER {
   __frame_state_for
   __register_frame_info_table
 }
+
+%if !defined (__arch64__) && defined (__LONG_DOUBLE_128__)
+
+# long double 128 bit support from 32-bit libgcc_s.so.1 is only available
+# when configured with --with-long-double-128.  Make sure all the
+# symbols are available at @@GCC_LDBL_* versions to make it clear
+# there is a configurable symbol set.
+
+%exclude {
+  __fixtfdi
+  __fixunstfdi
+  __floatditf
+
+  __divtc3
+  __multc3
+  __powitf2
+}
+
+%inherit GCC_LDBL_3.0 GCC_3.0
+GCC_LDBL_3.0 {
+  __fixtfdi
+  __fixunstfdi
+  __floatditf
+}
+
+%inherit GCC_LDBL_4.0.0 GCC_4.0.0
+GCC_LDBL_4.0.0 {
+  __divtc3
+  __multc3
+  __powitf2
+}
+
+%endif
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/sparc/linux64.h gcc-41-20060515/gcc/config/sparc/linux64.h
--- gcc-41-20060515.orig/gcc/config/sparc/linux64.h	2006-05-15 11:13:55.000000000 -0500
+++ gcc-41-20060515/gcc/config/sparc/linux64.h	2006-05-15 13:47:27.576271422 -0500
@@ -20,22 +20,24 @@ along with GCC; see the file COPYING.  I
 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
 Boston, MA 02110-1301, USA.  */
 
-#define TARGET_OS_CPP_BUILTINS()		\
-  do						\
-    {						\
-	builtin_define_std ("unix");		\
-	builtin_define_std ("linux");		\
-	builtin_define ("_LONGLONG");		\
-	builtin_define ("__gnu_linux__");	\
-	builtin_assert ("system=linux");	\
-	builtin_assert ("system=unix");		\
-	builtin_assert ("system=posix");	\
-	if (flag_pic)				\
-	  {					\
-		builtin_define ("__PIC__");	\
-		builtin_define ("__pic__");	\
-	  }					\
-    }						\
+#define TARGET_OS_CPP_BUILTINS()			\
+  do							\
+    {							\
+      builtin_define_std ("unix");			\
+      builtin_define_std ("linux");			\
+      builtin_define ("_LONGLONG");			\
+      builtin_define ("__gnu_linux__");			\
+      builtin_assert ("system=linux");			\
+      builtin_assert ("system=unix");			\
+      builtin_assert ("system=posix");			\
+      if (flag_pic)					\
+	{						\
+	  builtin_define ("__PIC__");			\
+	  builtin_define ("__pic__");			\
+	}						\
+      if (TARGET_ARCH32 && TARGET_LONG_DOUBLE_128)	\
+	builtin_define ("__LONG_DOUBLE_128__");		\
+    }							\
   while (0)
 
 /* Don't assume anything about the header files.  */
@@ -59,13 +61,6 @@ Boston, MA 02110-1301, USA.  */
 #undef ASM_CPU_DEFAULT_SPEC
 #define ASM_CPU_DEFAULT_SPEC "-Av9a"
 
-#ifdef SPARC_BI_ARCH
-
-#undef CPP_ARCH32_SPEC
-#define CPP_ARCH32_SPEC "%{mlong-double-128:-D__LONG_DOUBLE_128__}"
-
-#endif
-
 /* Provide a STARTFILE_SPEC appropriate for GNU/Linux.  Here we add
    the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
    provides part of the support for getting C++ file-scope static
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/sparc/linux.h gcc-41-20060515/gcc/config/sparc/linux.h
--- gcc-41-20060515.orig/gcc/config/sparc/linux.h	2006-05-15 11:13:55.000000000 -0500
+++ gcc-41-20060515/gcc/config/sparc/linux.h	2006-05-15 13:47:27.575271576 -0500
@@ -23,17 +23,19 @@ Boston, MA 02110-1301, USA.  */
 #define TARGET_OS_CPP_BUILTINS()		\
   do						\
     {						\
-	builtin_define_std ("unix");		\
-	builtin_define_std ("linux");		\
-	builtin_define ("__gnu_linux__");	\
-	builtin_assert ("system=linux");	\
-	builtin_assert ("system=unix");		\
-	builtin_assert ("system=posix");	\
-	if (flag_pic)				\
-	  {					\
-		builtin_define ("__PIC__");	\
-		builtin_define ("__pic__");	\
-	  }					\
+      builtin_define_std ("unix");		\
+      builtin_define_std ("linux");		\
+      builtin_define ("__gnu_linux__");		\
+      builtin_assert ("system=linux");		\
+      builtin_assert ("system=unix");		\
+      builtin_assert ("system=posix");		\
+      if (flag_pic)				\
+	{					\
+	  builtin_define ("__PIC__");		\
+	  builtin_define ("__pic__");		\
+	}					\
+      if (TARGET_LONG_DOUBLE_128)		\
+	builtin_define ("__LONG_DOUBLE_128__");	\
     }						\
   while (0)
 
@@ -100,8 +102,7 @@ Boston, MA 02110-1301, USA.  */
 
 #undef CPP_SUBTARGET_SPEC
 #define CPP_SUBTARGET_SPEC \
-"%{posix:-D_POSIX_SOURCE} \
-%{pthread:-D_REENTRANT} %{mlong-double-128:-D__LONG_DOUBLE_128__}"
+"%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
 
 #undef LIB_SPEC
 #define LIB_SPEC \
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/sparc/sparc.c gcc-41-20060515/gcc/config/sparc/sparc.c
--- gcc-41-20060515.orig/gcc/config/sparc/sparc.c	2006-05-15 11:13:55.000000000 -0500
+++ gcc-41-20060515/gcc/config/sparc/sparc.c	2006-05-15 13:47:27.581270653 -0500
@@ -790,6 +790,11 @@ sparc_override_options (void)
       sparc_costs = &ultrasparc3_costs;
       break;
     };
+
+#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
+  if (!(target_flags_explicit & MASK_LONG_DOUBLE_128))
+    target_flags |= MASK_LONG_DOUBLE_128;
+#endif
 }
 
 #ifdef SUBTARGET_ATTRIBUTE_TABLE
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/sparc/t-linux gcc-41-20060515/gcc/config/sparc/t-linux
--- gcc-41-20060515.orig/gcc/config/sparc/t-linux	1969-12-31 18:00:00.000000000 -0600
+++ gcc-41-20060515/gcc/config/sparc/t-linux	2006-05-15 13:47:27.582270499 -0500
@@ -0,0 +1,5 @@
+# Override t-slibgcc-elf-ver to export some libgcc symbols with
+# the symbol versions that glibc used.
+# Avoid the t-linux version file.
+SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver \
+		 $(srcdir)/config/sparc/libgcc-sparc-glibc.ver
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config/sparc/t-linux64 gcc-41-20060515/gcc/config/sparc/t-linux64
--- gcc-41-20060515.orig/gcc/config/sparc/t-linux64	2006-05-15 11:13:55.000000000 -0500
+++ gcc-41-20060515/gcc/config/sparc/t-linux64	2006-05-15 13:47:27.582270499 -0500
@@ -8,12 +8,6 @@ INSTALL_LIBGCC = install-multilib
 EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o \
 	crtfastmath.o
 
-# Override t-slibgcc-elf-ver to export some libgcc symbols with
-# the symbol versions that glibc used.
-# Avoid the t-linux version file.
-SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver \
-		 $(srcdir)/config/sparc/libgcc-sparc-glibc.ver
-
 CRTSTUFF_T_CFLAGS = `if test x$$($(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) \
 				 -print-multi-os-directory) \
 			= x../lib64; then echo -mcmodel=medany; fi`
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config.gcc gcc-41-20060515/gcc/config.gcc
--- gcc-41-20060515.orig/gcc/config.gcc	2006-05-15 11:14:20.000000000 -0500
+++ gcc-41-20060515/gcc/config.gcc	2006-05-15 13:47:27.555274654 -0500
@@ -568,7 +568,7 @@ alpha*-*-unicosmk*)
 alpha*-*-linux*)
 	tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
 	target_cpu_default="MASK_GAS"
-	tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
+	tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee alpha/t-linux"
 	;;
 alpha*-*-gnu*)
 	target_cpu_default="MASK_GAS"
@@ -2056,7 +2056,7 @@ sparc-*-elf*)
 sparc-*-linux*)		# SPARC's running GNU/Linux, libc6
 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux.h"
 	extra_options="${extra_options} sparc/long-double-switch.opt"
-	tmake_file="${tmake_file} sparc/t-crtfm"
+	tmake_file="${tmake_file} sparc/t-linux sparc/t-crtfm"
 	;;
 sparc-*-rtems*)
 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h"
@@ -2175,7 +2175,7 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd*
 sparc64-*-linux*)		# 64-bit SPARC's running GNU/Linux
 	tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux64.h"
 	extra_options="${extra_options} sparc/long-double-switch.opt"
-	tmake_file="${tmake_file} sparc/t-linux64 sparc/t-crtfm"
+	tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm"
 	;;
 sparc64-*-netbsd*)
 	tm_file="sparc/biarch64.h ${tm_file}"
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/config.in gcc-41-20060515/gcc/config.in
--- gcc-41-20060515.orig/gcc/config.in	2006-05-15 11:14:20.000000000 -0500
+++ gcc-41-20060515/gcc/config.in	2006-05-15 13:47:27.559274038 -0500
@@ -1277,6 +1277,12 @@
 #endif
 
 
+/* Define if TFmode long double should be the default */
+#ifndef USED_FOR_TARGET
+#undef TARGET_DEFAULT_LONG_DOUBLE_128
+#endif
+
+
 /* Define if your target C library provides stack protector support */
 #ifndef USED_FOR_TARGET
 #undef TARGET_LIBC_PROVIDES_SSP
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/configure gcc-41-20060515/gcc/configure
--- gcc-41-20060515.orig/gcc/configure	2006-05-15 11:14:19.000000000 -0500
+++ gcc-41-20060515/gcc/configure	2006-05-15 13:47:27.594268652 -0500
@@ -931,6 +931,7 @@ Optional Packages:
   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
   --with-system-libunwind use installed libunwind
+  --with-long-double-128  Use 128-bit long double by default.
   --with-gc={page,zone}   choose the garbage collection mechanism to use
                           with the compiler
   --with-system-zlib      use installed libz
@@ -7492,7 +7493,7 @@ if test "${gcc_cv_prog_makeinfo_modern+s
 else
     ac_prog_version=`$MAKEINFO --version 2>&1 |
                    sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
-  echo "configure:7495: version of makeinfo is $ac_prog_version" >&5
+  echo "configure:7496: version of makeinfo is $ac_prog_version" >&5
   case $ac_prog_version in
     '')     gcc_cv_prog_makeinfo_modern=no;;
     4.[2-9]*)
@@ -16213,6 +16214,46 @@ _ACEOF
 
 fi
 
+# Check if TFmode long double should be used by default or not.
+# Some glibc targets used DFmode long double, but with glibc 2.4
+# and later they can use TFmode.
+case "$target" in
+  powerpc*-*-*gnu* | \
+  sparc*-*-linux* | \
+  s390*-*-linux* | \
+  alpha*-*-linux*)
+
+# Check whether --with-long-double-128 or --without-long-double-128 was given.
+if test "${with_long_double_128+set}" = set; then
+  withval="$with_long_double_128"
+  gcc_cv_target_ldbl128="$with_long_double_128"
+else
+  gcc_cv_target_ldbl128=no
+      if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
+	if test "x$with_sysroot" = x; then
+	  glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
+	elif test "x$with_sysroot" = xyes; then
+	  glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
+	else
+	  glibc_header_dir="${with_sysroot}/usr/include"
+	fi
+      else
+	glibc_header_dir=/usr/include
+      fi
+      grep '^ 	*#[ 	]*define[ 	][ 	]*__LONG_DOUBLE_MATH_OPTIONAL' \
+        $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
+      && gcc_cv_target_ldbl128=yes
+fi;
+    ;;
+esac
+if test x$gcc_cv_target_ldbl128 = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TARGET_DEFAULT_LONG_DOUBLE_128 1
+_ACEOF
+
+fi
+
 # Find out what GC implementation we want, or may, use.
 
 # Check whether --with-gc or --without-gc was given.
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/configure.ac gcc-41-20060515/gcc/configure.ac
--- gcc-41-20060515.orig/gcc/configure.ac	2006-05-15 11:14:20.000000000 -0500
+++ gcc-41-20060515/gcc/configure.ac	2006-05-15 13:47:27.597400000 -0500
@@ -3130,6 +3130,39 @@ if test x$gcc_cv_libc_provides_ssp = xye
 	    [Define if your target C library provides stack protector support])
 fi
 
+# Check if TFmode long double should be used by default or not.
+# Some glibc targets used DFmode long double, but with glibc 2.4
+# and later they can use TFmode.
+case "$target" in
+  powerpc*-*-*gnu* | \
+  sparc*-*-linux* | \
+  s390*-*-linux* | \
+  alpha*-*-linux*)
+    AC_ARG_WITH(long-double-128,
+[  --with-long-double-128  Use 128-bit long double by default.],
+      gcc_cv_target_ldbl128="$with_long_double_128",
+      [gcc_cv_target_ldbl128=no
+      if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
+	if test "x$with_sysroot" = x; then
+	  glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
+	elif test "x$with_sysroot" = xyes; then
+	  glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
+	else
+	  glibc_header_dir="${with_sysroot}/usr/include"
+	fi
+      else
+	glibc_header_dir=/usr/include
+      fi
+      grep '^[ 	]*#[ 	]*define[ 	][ 	]*__LONG_DOUBLE_MATH_OPTIONAL' \
+        $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \
+      && gcc_cv_target_ldbl128=yes])
+    ;;
+esac
+if test x$gcc_cv_target_ldbl128 = xyes; then
+  AC_DEFINE(TARGET_DEFAULT_LONG_DOUBLE_128, 1,
+	    [Define if TFmode long double should be the default])
+fi
+
 # Find out what GC implementation we want, or may, use.
 AC_ARG_WITH(gc,
 [  --with-gc={page,zone}   choose the garbage collection mechanism to use
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/gcc/doc/install.texi gcc-41-20060515/gcc/doc/install.texi
--- gcc-41-20060515.orig/gcc/doc/install.texi	2006-05-15 11:10:10.000000000 -0500
+++ gcc-41-20060515/gcc/doc/install.texi	2006-05-15 13:47:27.600399538 -0500
@@ -1224,6 +1224,14 @@ error message.
 All support for systems which have been obsoleted in one release of GCC
 is removed entirely in the next major release, unless someone steps
 forward to maintain the port.
+
+@item --with-long-double-128
+Specify if @code{long double} type should be 128-bit by default on selected
+GNU/Linux architectures.  If using @code{--without-long-double-128},
+@code{long double} will be by default 64-bit, the same as @code{double} type.
+When neither of these configure options are used, the default will be
+128-bit @code{long double} when built against GNU C Library 2.4 and later,
+64-bit @code{long double} otherwise.
 @end table
 
 @subheading Cross-Compiler-Specific Options
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/ChangeLog gcc-41-20060515/libstdc++-v3/ChangeLog
--- gcc-41-20060515.orig/libstdc++-v3/ChangeLog	2006-05-15 11:15:42.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/ChangeLog	2006-05-15 14:02:07.401662657 -0500
@@ -153,6 +153,64 @@
 	Likewise.
 	* docs/html/ext/pb_assoc/tree_assoc_cntnr_node_iterator.html: Likewise.
 
+2006-02-07  Jakub Jelinek  <jakub@redhat.com>
+	    Benjamin Kosnik  <bkoz@redhat.com>
+
+	PR target/25864
+	* configure.ac (_GLIBCXX_LONG_DOUBLE_COMPAT): New check.
+	If true, set also port_specific_symbol_files and create
+	as_symver_specs.
+	(GLIBCXX_LDBL_COMPAT): New GLIBCXX_CONDITIONAL.
+	* configure: Rebuilt.
+	* config.h.in: Rebuilt.
+	* config/os/gnu-linux/ldbl-extra.ver: New file.
+	* config/linker-map.gnu: Make sure no __float128 symbols are
+	exported.
+	* include/bits/c++config (_GLIBCXX_LONG_DOUBLE_COMPAT,
+	_GLIBCXX_LDBL_NAMESPACE, _GLIBCXX_BEGIN_LDBL_NAMESPACE,
+	_GLIBCXX_END_LDBL_NAMESPACE): Define.
+	* include/bits/localefwd.h: Use them to conditionally scope facets.
+	* include/bits/locale_facets.h: Surround std::{money,num}_{get,put}
+	with _GLIBCXX_BEGIN_LDBL_NAMESPACE and _GLIBCXX_END_LDBL_NAMESPACE.
+	[_GLIBCXX_LONG_DOUBLE_COMPAT] (std::money_get): Add __do_get method.
+	[_GLIBCXX_LONG_DOUBLE_COMPAT] (std::money_put): Add __do_put method.
+	[_GLIBCXX_LONG_DOUBLE_COMPAT] (std::num_get): Add __do_get method.
+	[_GLIBCXX_LONG_DOUBLE_COMPAT] (std::num_put): Add __do_put method.
+	* include/bits/locale_facets.tcc: Surround std::{money,num}_{get,put}
+	with _GLIBCXX_BEGIN_LDBL_NAMESPACE and _GLIBCXX_END_LDBL_NAMESPACE.
+	(std::money_get::__do_get, std::money_put::__do_put,
+	std::num_get::__do_get, std::num_put::__do_put): New
+	specializations.
+	* include/Makefile.am: Conditionally define
+	_GLIBCXX_LONG_DOUBLE_COMPAT in c++config.
+	* include/Makefile.in: Regenerate.
+	* src/locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT] (_GLIBCXX_LOC_ID,
+	_GLIBCXX_SYNC_ID): Define, use them.
+	* src/compatibility-ldbl.cc: New file.
+	* src/complex_io.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Add compatibility
+	symbols.
+	* src/limits.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
+	* src/locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
+	* src/locale-inst.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.	
+	* src/locale-misc-inst.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
+	* src/istream-inst.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
+	* src/ostream-inst.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
+	* src/locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
+	* src/wlocale-inst.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
+	* src/compatibility.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Likewise.
+	* config/locale/generic/c_locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]:
+	Likewise.
+	* config/locale/gnu/c_locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]:
+	Likewise.
+	* src/Makefile.am (libstdc++-symbol.ver): Append instead of
+	insert in the middle if port specific symbol file requests it.
+	(ldbl_compat_sources): New variable.
+	(sources): Use it.
+	(compatibility-ldbl.lo, compatibility-ldbl.o): New rules.
+	* src/Makefile.in: Rebuilt.
+	* testsuite/testsuite_abi.cc: Recognize GLIBCXX_LDBL_3.4,
+	GLIBCXX_LDBL_3.4.7, CXXABI_LDBL_1.3.	
+
 2006-02-07  Paolo Carlini  <pcarlini@suse.de>	
 
 	* include/tr1/hashtable: Trivial formatting fixes.
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/config/linker-map.gnu gcc-41-20060515/libstdc++-v3/config/linker-map.gnu
--- gcc-41-20060515.orig/libstdc++-v3/config/linker-map.gnu	2006-05-15 11:15:41.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/config/linker-map.gnu	2006-05-15 13:47:27.603399076 -0500
@@ -1,6 +1,6 @@
 ## Linker script for GNU ld 2.13.91+ only.
 ##
-## Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+## Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 ##
 ## This file is part of the libstdc++ version 3 distribution.
 ##
@@ -44,7 +44,10 @@ GLIBCXX_3.4 {
       std::basic_[j-n]*;
       std::basic_o[a-e]*;
 #     std::basic_ofstream;
-      std::basic_o[g-z]*;
+#     std::basic_o[g-z]*;
+      std::basic_o[g-r]*;
+      std::basic_ostr[a-d]*;
+      std::basic_ostr[f-z]*;
       std::basic_[p-r]*;
       std::basic_streambuf*;
 #     std::basic_string
@@ -88,7 +91,14 @@ GLIBCXX_3.4 {
       std::locale::_[J-Ra-z]*;
       std::locale::_S_normalize_category*;
       std::locale::_[T-Za-z]*;
-      std::[A-Zm-r]*;
+#     std::[A-Zm-r]*;
+      std::[A-Zmp-r]*;
+      std::n[^u]*;
+      std::nu[^m]*;
+      std::num[^e]*;
+      std::ostrstream*;
+      std::out_of_range*;
+      std::overflow_error*;
       std::set_new_handler*;
       std::set_terminate*;
       std::set_unexpected*;
@@ -256,7 +266,7 @@ GLIBCXX_3.4 {
     _ZNSi[0-9][a-h]*;
     _ZNSi[0-9][j-z]*;
     _ZNSi6ignoreE[il][il];
-    _ZNSirsE*;
+    _ZNSirsE*[^g];
 
     # std::basic_istream<wchar_t>
     _ZNSt13basic_istreamIwSt11char_traitsIwEEC*;
@@ -265,7 +275,7 @@ GLIBCXX_3.4 {
     _ZNSt13basic_istreamIwSt11char_traitsIwEE[0-9][a-h]*;
     _ZNSt13basic_istreamIwSt11char_traitsIwEE[0-9][j-z]*;
     _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreE[il][ijlm];
-    _ZNSt13basic_istreamIwSt11char_traitsIwEErsE*;
+    _ZNSt13basic_istreamIwSt11char_traitsIwEErsE*[^g];
 
     # std::istream operators and inserters
     _ZSt7getlineI[cw]St11char_traitsI[cw]ESaI[cw]EERSt13basic_istream*;
@@ -277,6 +287,37 @@ GLIBCXX_3.4 {
     _ZStrsIe[cw]St11char_traitsI[cw]EERSt13basic_istream*;
     _ZStrsIf[cw]St11char_traitsI[cw]EERSt13basic_istream*;
 
+    # std::basic_ostream<char>
+    _ZNSoC*;
+    _ZNSoD*;
+    _ZNKSo6sentrycvbEv;
+    _ZNSo8_M_write*;
+    _ZNSo[0-9][a-z]*;
+    _ZNSolsE*[^g];
+
+    # std::basic_ostream<wchar_t>
+    _ZNSt13basic_ostreamIwSt11char_traitsIwEEC*;
+    _ZNSt13basic_ostreamIwSt11char_traitsIwEED*;
+    _ZNKSt13basic_ostreamIwSt11char_traitsIwEE[0-9][a-z]*;
+    _ZNSt13basic_ostreamIwSt11char_traitsIwEE3putEw;
+    _ZNSt13basic_ostreamIwSt11char_traitsIwEE5flushEv;
+    _ZNSt13basic_ostreamIwSt11char_traitsIwEE5seekpE*;
+    _ZNSt13basic_ostreamIwSt11char_traitsIwEE5tellpEv;
+    _ZNSt13basic_ostreamIwSt11char_traitsIwEE5writeEPKw*;
+    _ZNSt13basic_ostreamIwSt11char_traitsIwEE6sentry*;
+    _ZNSt13basic_ostreamIwSt11char_traitsIwEE8_M_write*;
+    _ZNSt13basic_ostreamIwSt11char_traitsIwEElsE*[^g];
+
+    # std::ostream operators and inserters
+    _ZSt4end[ls]I[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
+    _ZSt5flushI[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
+    _ZStlsI[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
+    _ZStlsI[cw]St11char_traitsI[cw]ESaI[cw]EERSt13basic_ostream*;
+    _ZStlsISt11char_traitsI[cw]EERSt13basic_ostream*;
+    _ZStlsId[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
+    _ZStlsIe[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
+    _ZStlsIf[cw]St11char_traitsI[cw]EERSt13basic_ostream*;
+
     # std::locale destructors
     _ZNSt6localeD*;
 	
@@ -292,14 +333,23 @@ GLIBCXX_3.4 {
     _ZNSt8ios_base4InitD*;
 
     # bool std::has_facet 
-    _ZSt9has_facet*;
+    _ZSt9has_facetIS*;
 
     # std::num_get
     _ZNKSt7num_getI[cw]St19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEE*;
 
+    # std::num_put
+    _ZNKSt7num_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE*;
+
     # std::money_get
     _ZNKSt9money_getI[cw]St19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEE*;
 
+    # std::money_put
+    _ZNKSt9money_putI[cw]St19ostreambuf_iteratorI[cw]St11char_traitsI[cw]EEE*;
+
+    # std::numeric_limits
+    _ZNSt14numeric_limitsI[^g]*;
+
     # std::_Rb_tree
     _ZSt18_Rb_tree_decrementPKSt18_Rb_tree_node_base;
     _ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base;
@@ -327,7 +377,7 @@ GLIBCXX_3.4 {
     _ZNSt12__basic_fileIcED*;
 
     # std::__convert_to_v
-    _ZSt14__convert_to_v*;
+    _ZSt14__convert_to_vI[^g]*;
 
     # __gnu_cxx::stdio_sync_filebuf
     _ZTVN9__gnu_cxx18stdio_sync_filebufI[cw]St11char_traitsI[cw]EEE;
@@ -399,7 +449,8 @@ GLIBCXX_3.4 {
     _ZTSN9__gnu_cxx13stdio_filebufI[cw]St11char_traitsI[cw]EEE;
 
     # function-scope static objects requires a guard variable.
-    _ZGVNSt*;
+    _ZGVNSt[^1]*;
+    _ZGVNSt1[^7]*;
 
     # virtual function thunks
     _ZThn8_NS*;
@@ -665,9 +716,9 @@ CXXABI_1.3 {
     _ZTVN10__cxxabiv121__vmi_class_type_infoE;
 
     # typeinfo structure (and some names)
-    _ZTI[a-z];
-    _ZTIP[a-z];
-    _ZTIPK[a-z];
+    _ZTI[a-fh-z];
+    _ZTIP[a-fh-z];
+    _ZTIPK[a-fh-z];
     _ZTIN10__cxxabiv117__array_type_infoE;
     _ZTIN10__cxxabiv117__class_type_infoE;
     _ZTIN10__cxxabiv116__enum_type_infoE;
@@ -680,9 +731,9 @@ CXXABI_1.3 {
     _ZTIN10__cxxabiv121__vmi_class_type_infoE;
 
     # typeinfo name
-    _ZTS[a-z];
-    _ZTSP[a-z];
-    _ZTSPK[a-z];
+    _ZTS[a-fh-z];
+    _ZTSP[a-fh-z];
+    _ZTSPK[a-fh-z];
     _ZTSN10__cxxabiv117__array_type_infoE;
     _ZTSN10__cxxabiv117__class_type_infoE;
     _ZTSN10__cxxabiv116__enum_type_infoE;
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/config/locale/generic/c_locale.cc gcc-41-20060515/libstdc++-v3/config/locale/generic/c_locale.cc
--- gcc-41-20060515.orig/libstdc++-v3/config/locale/generic/c_locale.cc	2006-05-15 11:15:39.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/config/locale/generic/c_locale.cc	2006-05-15 13:47:27.605398768 -0500
@@ -1,6 +1,6 @@
 // Wrapper for underlying C-language localization -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2003, 2004, 2005
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -168,3 +168,10 @@ namespace std
 {
   const char* const* const locale::_S_categories = __gnu_cxx::category_names;
 }  // namespace std
+
+// XXX GLIBCXX_ABI Deprecated
+#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
+  extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
+_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
+#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/config/locale/gnu/c_locale.cc gcc-41-20060515/libstdc++-v3/config/locale/gnu/c_locale.cc
--- gcc-41-20060515.orig/libstdc++-v3/config/locale/gnu/c_locale.cc	2006-05-15 11:15:39.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/config/locale/gnu/c_locale.cc	2006-05-15 13:47:27.606398615 -0500
@@ -1,6 +1,6 @@
 // Wrapper for underlying C-language localization -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2003, 2004, 2005 
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -132,3 +132,10 @@ namespace std
 {
   const char* const* const locale::_S_categories = __gnu_cxx::category_names;
 }  // namespace std
+
+// XXX GLIBCXX_ABI Deprecated
+#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
+  extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
+_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKP15__locale_struct, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKP15__locale_struct);
+#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/config/os/gnu-linux/ldbl-extra.ver gcc-41-20060515/libstdc++-v3/config/os/gnu-linux/ldbl-extra.ver
--- gcc-41-20060515.orig/libstdc++-v3/config/os/gnu-linux/ldbl-extra.ver	1969-12-31 18:00:00.000000000 -0600
+++ gcc-41-20060515/libstdc++-v3/config/os/gnu-linux/ldbl-extra.ver	2006-05-15 13:47:27.606398615 -0500
@@ -0,0 +1,19 @@
+# Appended to version file.
+
+GLIBCXX_LDBL_3.4 {
+  _ZNSt14numeric_limitsIg*;
+  _ZNSirsERg;
+  _ZNSolsEg;
+  _ZNSt13basic_istreamIwSt11char_traitsIwEErsERg;
+  _ZNSt13basic_ostreamIwSt11char_traitsIwEElsEg;
+  _ZSt14__convert_to_vIgEvPKcRT_RSt12_Ios_IostateRKP*;
+  _ZStlsIg[cw]St11char_traitsI[cw]EERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E;
+  _ZStrsIg[cw]St11char_traitsI[cw]EERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E;
+  *__gnu_cxx_ldbl128*;
+};
+
+CXXABI_LDBL_1.3 {
+  _ZT[IS]g;
+  _ZT[IS]Pg;
+  _ZT[IS]PKg;
+};
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/config.h.in gcc-41-20060515/libstdc++-v3/config.h.in
--- gcc-41-20060515.orig/libstdc++-v3/config.h.in	2006-05-15 11:15:42.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/config.h.in	2006-05-15 13:47:27.601399384 -0500
@@ -658,6 +658,9 @@
 /* Define to 1 if a full hosted library is built, or 0 if freestanding. */
 #undef _GLIBCXX_HOSTED
 
+/* Define if compatibility should be provided for -mlong-double-64. */
+#undef _GLIBCXX_LONG_DOUBLE_COMPAT
+
 /* Define if ptrdiff_t is int. */
 #undef _GLIBCXX_PTRDIFF_T_IS_INT
 
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/configure gcc-41-20060515/libstdc++-v3/configure
--- gcc-41-20060515.orig/libstdc++-v3/configure	2006-05-15 11:15:42.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/configure	2006-05-15 13:47:27.664389689 -0500
@@ -309,7 +309,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOL CXXCPP CPPFLAGS enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC CPP EGREP check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS glibcxx_thread_h WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV SYMVER_MAP port_specific_symbol_files ENABLE_SYMVERS_GNU_TRUE ENABLE_SYMVERS_GNU_FALSE ENABLE_SYMVERS_DARWIN_EXPORT_TRUE ENABLE_SYMVERS_DARWIN_EXPORT_FALSE baseline_dir ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR CPU_DEFINES_SRCDIR ABI_TWEAKS_SRCDIR OS_INC_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOL CXXCPP CPPFLAGS enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC CPP EGREP check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS glibcxx_thread_h WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV SYMVER_MAP port_specific_symbol_files ENABLE_SYMVERS_GNU_TRUE ENABLE_SYMVERS_GNU_FALSE ENABLE_SYMVERS_DARWIN_EXPORT_TRUE ENABLE_SYMVERS_DARWIN_EXPORT_FALSE GLIBCXX_LDBL_COMPAT_TRUE GLIBCXX_LDBL_COMPAT_FALSE baseline_dir ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR CPU_DEFINES_SRCDIR ABI_TWEAKS_SRCDIR OS_INC_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -87959,6 +87959,72 @@ echo "${ECHO_T}$glibcxx_ptrdiff_t_is_i" 
 echo "$as_me: versioning on shared library symbols is $enable_symvers" >&6;}
 
 
+ac_ldbl_compat=no
+case "$target" in
+  powerpc*-*-*gnu* | \
+  sparc*-*-linux* | \
+  s390*-*-linux* | \
+  alpha*-*-linux*)
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+#if !defined __LONG_DOUBLE_128__ || (defined(__sparc__) && defined(__arch64__))
+#error no need for long double compatibility
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_ldbl_compat=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_ldbl_compat=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  if test "$ac_ldbl_compat" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_LONG_DOUBLE_COMPAT 1
+_ACEOF
+
+    port_specific_symbol_files="\$(top_srcdir)/config/os/gnu-linux/ldbl-extra.ver"
+  fi
+esac
+
+
 # This depends on GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE.
 
   if $GLIBCXX_IS_NATIVE ; then
@@ -88811,6 +88877,17 @@ fi
 
 
 
+if test $ac_ldbl_compat = yes; then
+  GLIBCXX_LDBL_COMPAT_TRUE=
+  GLIBCXX_LDBL_COMPAT_FALSE='#'
+else
+  GLIBCXX_LDBL_COMPAT_TRUE='#'
+  GLIBCXX_LDBL_COMPAT_FALSE=
+fi
+
+
+
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -89166,6 +89243,13 @@ echo "$as_me: error: conditional \"ENABL
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${GLIBCXX_LDBL_COMPAT_TRUE}" && test -z "${GLIBCXX_LDBL_COMPAT_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"GLIBCXX_LDBL_COMPAT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GLIBCXX_LDBL_COMPAT\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
@@ -89836,6 +89920,8 @@ s,@ENABLE_SYMVERS_GNU_TRUE@,$ENABLE_SYMV
 s,@ENABLE_SYMVERS_GNU_FALSE@,$ENABLE_SYMVERS_GNU_FALSE,;t t
 s,@ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@,$ENABLE_SYMVERS_DARWIN_EXPORT_TRUE,;t t
 s,@ENABLE_SYMVERS_DARWIN_EXPORT_FALSE@,$ENABLE_SYMVERS_DARWIN_EXPORT_FALSE,;t t
+s,@GLIBCXX_LDBL_COMPAT_TRUE@,$GLIBCXX_LDBL_COMPAT_TRUE,;t t
+s,@GLIBCXX_LDBL_COMPAT_FALSE@,$GLIBCXX_LDBL_COMPAT_FALSE,;t t
 s,@baseline_dir@,$baseline_dir,;t t
 s,@ATOMICITY_SRCDIR@,$ATOMICITY_SRCDIR,;t t
 s,@ATOMIC_WORD_SRCDIR@,$ATOMIC_WORD_SRCDIR,;t t
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/configure.ac gcc-41-20060515/libstdc++-v3/configure.ac
--- gcc-41-20060515.orig/libstdc++-v3/configure.ac	2006-05-15 11:15:42.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/configure.ac	2006-05-15 13:47:27.665389535 -0500
@@ -281,6 +281,25 @@ fi
 # This depends on GLIBCXX CHECK_LINKER_FEATURES, but without it assumes no.
 GLIBCXX_ENABLE_SYMVERS([yes])
 
+ac_ldbl_compat=no
+case "$target" in
+  powerpc*-*-*gnu* | \
+  sparc*-*-linux* | \
+  s390*-*-linux* | \
+  alpha*-*-linux*)
+  AC_TRY_COMPILE(, [
+#if !defined __LONG_DOUBLE_128__ || (defined(__sparc__) && defined(__arch64__))
+#error no need for long double compatibility
+#endif
+  ], [ac_ldbl_compat=yes], [ac_ldbl_compat=no])
+  if test "$ac_ldbl_compat" = yes; then
+    AC_DEFINE([_GLIBCXX_LONG_DOUBLE_COMPAT],1,
+	      [Define if compatibility should be provided for -mlong-double-64.])
+    port_specific_symbol_files="\$(top_srcdir)/config/os/gnu-linux/ldbl-extra.ver"
+  fi
+esac
+GLIBCXX_CONDITIONAL(GLIBCXX_LDBL_COMPAT, test $ac_ldbl_compat = yes)
+
 # This depends on GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE.
 GLIBCXX_CONFIGURE_TESTSUITE
 
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/include/bits/c++config gcc-41-20060515/libstdc++-v3/include/bits/c++config
--- gcc-41-20060515.orig/libstdc++-v3/include/bits/c++config	2006-05-15 11:14:38.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/include/bits/c++config	2006-05-15 13:47:27.668389073 -0500
@@ -1,6 +1,6 @@
 // Predefined symbols and macros -*- C++ -*-
 
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -65,6 +65,26 @@ namespace std
 # define _GLIBCXX_STD std
 #endif
 
+/* Define if compatibility should be provided for -mlong-double-64. */
+#undef _GLIBCXX_LONG_DOUBLE_COMPAT
+
+// XXX GLIBCXX_ABI Deprecated
+// Namespace associations for long double 128 mode.
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+# define _GLIBCXX_LDBL_NAMESPACE __gnu_cxx_ldbl128::
+# define _GLIBCXX_BEGIN_LDBL_NAMESPACE namespace __gnu_cxx_ldbl128 {
+# define _GLIBCXX_END_LDBL_NAMESPACE }
+namespace std
+{
+  namespace __gnu_cxx_ldbl128 { }
+  using namespace __gnu_cxx_ldbl128 __attribute__((__strong__));
+}
+#else
+# define _GLIBCXX_LDBL_NAMESPACE
+# define _GLIBCXX_BEGIN_LDBL_NAMESPACE
+# define _GLIBCXX_END_LDBL_NAMESPACE
+#endif
+
 // Allow use of "export template." This is currently not a feature
 // that g++ supports.
 // #define _GLIBCXX_EXPORT_TEMPLATE 1
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/include/bits/locale_facets.h gcc-41-20060515/libstdc++-v3/include/bits/locale_facets.h
--- gcc-41-20060515.orig/libstdc++-v3/include/bits/locale_facets.h	2006-05-15 11:14:38.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/include/bits/locale_facets.h	2006-05-15 13:47:27.673388304 -0500
@@ -1,6 +1,6 @@
 // Locale support -*- C++ -*-
 
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -1910,6 +1910,7 @@ namespace std
       ~numpunct_byname() { }
     };
 
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
   /**
    *  @brief  Facet for parsing number strings.
    *
@@ -2176,13 +2177,27 @@ namespace std
       do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
 	     double&) const;
 
+      // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+      virtual iter_type
+      __do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+	       double&) const;
+#else
       virtual iter_type
       do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
 	     long double&) const;
+#endif
 
       virtual iter_type
       do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
 	     void*&) const;
+
+      // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+      virtual iter_type
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err,
+	     long double&) const;
+#endif
       //@}
     };
 
@@ -2438,17 +2453,30 @@ namespace std
       virtual iter_type
       do_put(iter_type, ios_base&, char_type __fill, double __v) const;
 
+      // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+      virtual iter_type
+      __do_put(iter_type, ios_base&, char_type __fill, double __v) const;
+#else
       virtual iter_type
       do_put(iter_type, ios_base&, char_type __fill, long double __v) const;
+#endif
 
       virtual iter_type
       do_put(iter_type, ios_base&, char_type __fill, const void* __v) const;
+
+      // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+      virtual iter_type
+      do_put(iter_type, ios_base&, char_type __fill, long double __v) const;
+#endif
       //@}
     };
 
   template <typename _CharT, typename _OutIter>
     locale::id num_put<_CharT, _OutIter>::id;
 
+_GLIBCXX_END_LDBL_NAMESPACE
 
   /**
    *  @brief  Facet for localized string comparison.
@@ -3953,6 +3981,7 @@ namespace std
   template<typename _CharT, bool _Intl>
     const bool moneypunct_byname<_CharT, _Intl>::intl;
 
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
   /**
    *  @brief  Facet for parsing monetary amounts.
    *
@@ -4064,9 +4093,16 @@ namespace std
        *  value.  This function is a hook for derived classes to change the
        *  value returned.  @see get() for details.
        */
+      // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+      virtual iter_type
+      __do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+	       ios_base::iostate& __err, double& __units) const;
+#else
       virtual iter_type
       do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
 	     ios_base::iostate& __err, long double& __units) const;
+#endif
 
       /**
        *  @brief  Read and parse a monetary value.
@@ -4079,6 +4115,13 @@ namespace std
       do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
 	     ios_base::iostate& __err, string_type& __digits) const;
 
+      // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+      virtual iter_type
+      do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io,
+	     ios_base::iostate& __err, long double& __units) const;
+#endif
+
       template<bool _Intl>
         iter_type
         _M_extract(iter_type __s, iter_type __end, ios_base& __io,
@@ -4191,9 +4234,16 @@ namespace std
        *  @param  units  Place to store result of parsing.
        *  @return  Iterator after writing.
        */
+      // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+      virtual iter_type
+      __do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+	       double __units) const;
+#else
       virtual iter_type
       do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
 	     long double __units) const;
+#endif
 
       /**
        *  @brief  Format and output a monetary value.
@@ -4217,6 +4267,13 @@ namespace std
       do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
 	     const string_type& __digits) const;
 
+      // XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+      virtual iter_type
+      do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+	     long double __units) const;
+#endif
+
       template<bool _Intl>
         iter_type
         _M_insert(iter_type __s, ios_base& __io, char_type __fill,
@@ -4226,6 +4283,8 @@ namespace std
   template<typename _CharT, typename _OutIter>
     locale::id money_put<_CharT, _OutIter>::id;
 
+_GLIBCXX_END_LDBL_NAMESPACE
+
   /**
    *  @brief  Messages facet base class providing catalog typedef.
    */
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/include/bits/locale_facets.tcc gcc-41-20060515/libstdc++-v3/include/bits/locale_facets.tcc
--- gcc-41-20060515.orig/libstdc++-v3/include/bits/locale_facets.tcc	2006-05-15 11:14:38.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/include/bits/locale_facets.tcc	2006-05-15 13:47:27.676387842 -0500
@@ -1,6 +1,6 @@
 // Locale support -*- C++ -*-
 
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -272,6 +272,8 @@ namespace std
   __verify_grouping(const char* __grouping, size_t __grouping_size,
 		    const string& __grouping_tmp);
 
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+
   template<typename _CharT, typename _InIter>
     _InIter
     num_get<_CharT, _InIter>::
@@ -446,6 +448,8 @@ namespace std
       return __beg;
     }
 
+_GLIBCXX_END_LDBL_NAMESPACE
+
   template<typename _ValueT>
     struct __to_unsigned_type
     { typedef _ValueT __type; };
@@ -460,6 +464,8 @@ namespace std
     { typedef unsigned long long __type; };
 #endif
 
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+
   template<typename _CharT, typename _InIter>
     template<typename _ValueT>
       _InIter
@@ -772,6 +778,21 @@ namespace std
       return __beg;
     }
 
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+  template<typename _CharT, typename _InIter>
+    _InIter
+    num_get<_CharT, _InIter>::
+    __do_get(iter_type __beg, iter_type __end, ios_base& __io,
+	     ios_base::iostate& __err, double& __v) const
+    {
+      string __xtrc;
+      __xtrc.reserve(32);
+      __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
+      std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale());
+      return __beg;
+    }
+#endif
+
   template<typename _CharT, typename _InIter>
     _InIter
     num_get<_CharT, _InIter>::
@@ -822,6 +843,8 @@ namespace std
       __len = static_cast<int>(__w);
     }
 
+_GLIBCXX_END_LDBL_NAMESPACE
+
   // Forwarding functions to peel signed from unsigned integer types and
   // either cast or compute the absolute value for the former, depending
   // on __basefield.
@@ -911,6 +934,8 @@ namespace std
       return __bufend - __buf;
     }
 
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
+
   template<typename _CharT, typename _OutIter>
     void
     num_put<_CharT, _OutIter>::
@@ -1233,6 +1258,14 @@ namespace std
     do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const
     { return _M_insert_float(__s, __io, __fill, char(), __v); }
 
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+  template<typename _CharT, typename _OutIter>
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    __do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const
+    { return _M_insert_float(__s, __io, __fill, char(), __v); }
+#endif
+
   template<typename _CharT, typename _OutIter>
     _OutIter
     num_put<_CharT, _OutIter>::
@@ -1474,6 +1507,23 @@ namespace std
 	return __beg;
       }
 
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+  template<typename _CharT, typename _InIter>
+    _InIter
+    money_get<_CharT, _InIter>::
+    __do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
+	     ios_base::iostate& __err, double& __units) const
+    {
+      string __str;
+      if (__intl)
+	__beg = _M_extract<true>(__beg, __end, __io, __err, __str);
+      else
+	__beg = _M_extract<false>(__beg, __end, __io, __err, __str);
+      std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale());
+      return __beg;
+    }
+#endif
+
   template<typename _CharT, typename _InIter>
     _InIter
     money_get<_CharT, _InIter>::
@@ -1678,7 +1728,18 @@ namespace std
 	__io.width(0);
 	return __s;    
       }
-  
+
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined __LONG_DOUBLE_128__
+  template<typename _CharT, typename _OutIter>
+    _OutIter
+    money_put<_CharT, _OutIter>::
+    __do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+	     double __units) const
+    {
+      return this->do_put(__s, __intl, __io, __fill, (long double) __units);
+    }
+#endif
+
   template<typename _CharT, typename _OutIter>
     _OutIter
     money_put<_CharT, _OutIter>::
@@ -1726,6 +1787,7 @@ namespace std
     { return __intl ? _M_insert<true>(__s, __io, __fill, __digits)
 	            : _M_insert<false>(__s, __io, __fill, __digits); }
 
+_GLIBCXX_END_LDBL_NAMESPACE
 
   // NB: Not especially useful. Without an ios_base object or some
   // kind of locale reference, we are left clawing at the air where
@@ -2511,12 +2573,12 @@ namespace std
   extern template class moneypunct<char, true>;
   extern template class moneypunct_byname<char, false>;
   extern template class moneypunct_byname<char, true>;
-  extern template class money_get<char>;
-  extern template class money_put<char>;
+  extern template class _GLIBCXX_LDBL_NAMESPACE money_get<char>;
+  extern template class _GLIBCXX_LDBL_NAMESPACE money_put<char>;
   extern template class numpunct<char>;
   extern template class numpunct_byname<char>;
-  extern template class num_get<char>;
-  extern template class num_put<char>;
+  extern template class _GLIBCXX_LDBL_NAMESPACE num_get<char>;
+  extern template class _GLIBCXX_LDBL_NAMESPACE num_put<char>;
   extern template class __timepunct<char>;
   extern template class time_put<char>;
   extern template class time_put_byname<char>;
@@ -2638,12 +2700,12 @@ namespace std
   extern template class moneypunct<wchar_t, true>;
   extern template class moneypunct_byname<wchar_t, false>;
   extern template class moneypunct_byname<wchar_t, true>;
-  extern template class money_get<wchar_t>;
-  extern template class money_put<wchar_t>;
+  extern template class _GLIBCXX_LDBL_NAMESPACE money_get<wchar_t>;
+  extern template class _GLIBCXX_LDBL_NAMESPACE money_put<wchar_t>;
   extern template class numpunct<wchar_t>;
   extern template class numpunct_byname<wchar_t>;
-  extern template class num_get<wchar_t>;
-  extern template class num_put<wchar_t>;
+  extern template class _GLIBCXX_LDBL_NAMESPACE num_get<wchar_t>;
+  extern template class _GLIBCXX_LDBL_NAMESPACE num_put<wchar_t>;
   extern template class __timepunct<wchar_t>;
   extern template class time_put<wchar_t>;
   extern template class time_put_byname<wchar_t>;
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/include/bits/localefwd.h gcc-41-20060515/libstdc++-v3/include/bits/localefwd.h
--- gcc-41-20060515.orig/libstdc++-v3/include/bits/localefwd.h	2006-05-15 11:14:38.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/include/bits/localefwd.h	2006-05-15 13:47:27.676387842 -0500
@@ -129,10 +129,12 @@ namespace std
     class codecvt_byname;
 
   // 22.2.2 and 22.2.3 numeric
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
   template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
     class num_get;
   template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
     class num_put;
+_GLIBCXX_END_LDBL_NAMESPACE
   template<typename _CharT> class numpunct;
   template<typename _CharT> class numpunct_byname;
 
@@ -155,10 +157,12 @@ namespace std
 
   // 22.2.6 money
   class money_base;
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
   template<typename _CharT, typename _InIter =  istreambuf_iterator<_CharT> >
     class money_get;
   template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> >
     class money_put;
+_GLIBCXX_END_LDBL_NAMESPACE
   template<typename _CharT, bool _Intl = false>
     class moneypunct;
   template<typename _CharT, bool _Intl = false>
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/include/Makefile.am gcc-41-20060515/libstdc++-v3/include/Makefile.am
--- gcc-41-20060515.orig/libstdc++-v3/include/Makefile.am	2006-05-15 11:14:39.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/include/Makefile.am	2006-05-15 13:47:27.666389381 -0500
@@ -825,13 +825,18 @@ ${host_builddir}/c++config.h: ${top_buil
 				${glibcxx_srcdir}/include/bits/c++config \
 				stamp-${host_alias} \
 				${toplevel_srcdir}/gcc/DATESTAMP
-	@cat ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
+	@ldbl_compat='' ;\
+	grep "^[ 	]*#[ 	]*define[ 	][ 	]*_GLIBCXX_LONG_DOUBLE_COMPAT[ 	][ 	]*1[ 	]*$$" \
+	${CONFIG_HEADER} > /dev/null 2>&1 \
+	&& ldbl_compat='s,^#undef _GLIBCXX_LONG_DOUBLE_COMPAT$$,#define _GLIBCXX_LONG_DOUBLE_COMPAT 1,' ;\
+	sed -e "$$ldbl_compat" ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
 	sed -e 's/^/#define __GLIBCXX__ /' \
-            < ${toplevel_srcdir}/gcc/DATESTAMP >> $@ ;\
+	    < ${toplevel_srcdir}/gcc/DATESTAMP >> $@ ;\
 	sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
 	    -e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \
 	    -e 's/VERSION/_GLIBCXX_VERSION/g' \
 	    -e 's/WORDS_/_GLIBCXX_WORDS_/g' \
+	    -e '/[ 	]_GLIBCXX_LONG_DOUBLE_COMPAT[ 	]/d' \
 	    < ${CONFIG_HEADER} >> $@ ;\
 	echo "#endif // _CXXCONFIG_" >>$@
 
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/include/Makefile.in gcc-41-20060515/libstdc++-v3/include/Makefile.in
--- gcc-41-20060515.orig/libstdc++-v3/include/Makefile.in	2006-05-15 11:14:39.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/include/Makefile.in	2006-05-15 13:47:27.668389073 -0500
@@ -1203,13 +1203,18 @@ ${host_builddir}/c++config.h: ${top_buil
 				${glibcxx_srcdir}/include/bits/c++config \
 				stamp-${host_alias} \
 				${toplevel_srcdir}/gcc/DATESTAMP
-	@cat ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
+	@ldbl_compat='' ;\
+	grep "^[ 	]*#[ 	]*define[ 	][ 	]*_GLIBCXX_LONG_DOUBLE_COMPAT[ 	][ 	]*1[ 	]*$$" \
+	${CONFIG_HEADER} > /dev/null 2>&1 \
+	&& ldbl_compat='s,^#undef _GLIBCXX_LONG_DOUBLE_COMPAT$$,#define _GLIBCXX_LONG_DOUBLE_COMPAT 1,' ;\
+	sed -e "$$ldbl_compat" ${glibcxx_srcdir}/include/bits/c++config > $@ ;\
 	sed -e 's/^/#define __GLIBCXX__ /' \
-            < ${toplevel_srcdir}/gcc/DATESTAMP >> $@ ;\
+	    < ${toplevel_srcdir}/gcc/DATESTAMP >> $@ ;\
 	sed -e 's/HAVE_/_GLIBCXX_HAVE_/g' \
 	    -e 's/PACKAGE/_GLIBCXX_PACKAGE/g' \
 	    -e 's/VERSION/_GLIBCXX_VERSION/g' \
 	    -e 's/WORDS_/_GLIBCXX_WORDS_/g' \
+	    -e '/[ 	]_GLIBCXX_LONG_DOUBLE_COMPAT[ 	]/d' \
 	    < ${CONFIG_HEADER} >> $@ ;\
 	echo "#endif // _CXXCONFIG_" >>$@
 
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/compatibility.cc gcc-41-20060515/libstdc++-v3/src/compatibility.cc
--- gcc-41-20060515.orig/libstdc++-v3/src/compatibility.cc	2006-05-15 11:14:42.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/src/compatibility.cc	2006-05-15 13:47:27.681387073 -0500
@@ -1,6 +1,6 @@
 // Compatibility symbols for previous versions -*- C++ -*-
 
-// Copyright (C) 2005
+// Copyright (C) 2005, 2006
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -49,6 +49,7 @@
 #include <istream>
 #include <fstream>
 #include <sstream>
+#include <cmath>
 
 namespace std
 {
@@ -362,6 +363,107 @@ namespace std
 
 #endif
 
+// gcc-4.1.0
+#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+#define _GLIBCXX_MATHL_WRAPPER(name, argdecl, args, ver) \
+extern "C" double						\
+__ ## name ## l_wrapper argdecl					\
+{								\
+  return name args;						\
+}								\
+asm (".symver __" #name "l_wrapper, " #name "l@" #ver)
+
+#define _GLIBCXX_MATHL_WRAPPER1(name, ver) \
+  _GLIBCXX_MATHL_WRAPPER (name, (double x), (x), ver)
+
+#define _GLIBCXX_MATHL_WRAPPER2(name, ver) \
+  _GLIBCXX_MATHL_WRAPPER (name, (double x, double y), (x, y), ver)
+
+#ifdef _GLIBCXX_HAVE_ACOSL
+_GLIBCXX_MATHL_WRAPPER1 (acos, GLIBCXX_3.4.3);
+#endif
+#ifdef _GLIBCXX_HAVE_ASINL
+_GLIBCXX_MATHL_WRAPPER1 (asin, GLIBCXX_3.4.3);
+#endif
+#ifdef _GLIBCXX_HAVE_ATAN2L
+_GLIBCXX_MATHL_WRAPPER2 (atan2, GLIBCXX_3.4);
+#endif
+#ifdef _GLIBCXX_HAVE_ATANL
+_GLIBCXX_MATHL_WRAPPER1 (atan, GLIBCXX_3.4.3);
+#endif
+#ifdef _GLIBCXX_HAVE_CEILL
+_GLIBCXX_MATHL_WRAPPER1 (ceil, GLIBCXX_3.4.3);
+#endif
+#ifdef _GLIBCXX_HAVE_COSHL
+_GLIBCXX_MATHL_WRAPPER1 (cosh, GLIBCXX_3.4);
+#endif
+#ifdef _GLIBCXX_HAVE_COSL
+_GLIBCXX_MATHL_WRAPPER1 (cos, GLIBCXX_3.4);
+#endif
+#ifdef _GLIBCXX_HAVE_EXPL
+_GLIBCXX_MATHL_WRAPPER1 (exp, GLIBCXX_3.4);
+#endif
+#ifdef _GLIBCXX_HAVE_FLOORL
+_GLIBCXX_MATHL_WRAPPER1 (floor, GLIBCXX_3.4.3);
+#endif
+#ifdef _GLIBCXX_HAVE_FMODL
+_GLIBCXX_MATHL_WRAPPER2 (fmod, GLIBCXX_3.4.3);
+#endif
+#ifdef _GLIBCXX_HAVE_FREXPL
+_GLIBCXX_MATHL_WRAPPER (frexp, (double x, int *y), (x, y), GLIBCXX_3.4.3);
+#endif
+#ifdef _GLIBCXX_HAVE_HYPOTL
+_GLIBCXX_MATHL_WRAPPER2 (hypot, GLIBCXX_3.4);
+#endif
+#ifdef _GLIBCXX_HAVE_LDEXPL
+_GLIBCXX_MATHL_WRAPPER (ldexp, (double x, int y), (x, y), GLIBCXX_3.4.3);
+#endif
+#ifdef _GLIBCXX_HAVE_LOG10L
+_GLIBCXX_MATHL_WRAPPER1 (log10, GLIBCXX_3.4);
+#endif
+#ifdef _GLIBCXX_HAVE_LOGL
+_GLIBCXX_MATHL_WRAPPER1 (log, GLIBCXX_3.4);
+#endif
+#ifdef _GLIBCXX_HAVE_MODFL
+_GLIBCXX_MATHL_WRAPPER (modf, (double x, double *y), (x, y), GLIBCXX_3.4.3);
+#endif
+#ifdef _GLIBCXX_HAVE_POWL
+_GLIBCXX_MATHL_WRAPPER2 (pow, GLIBCXX_3.4);
+#endif
+#ifdef _GLIBCXX_HAVE_SINHL
+_GLIBCXX_MATHL_WRAPPER1 (sinh, GLIBCXX_3.4);
+#endif
+#ifdef _GLIBCXX_HAVE_SINL
+_GLIBCXX_MATHL_WRAPPER1 (sin, GLIBCXX_3.4);
+#endif
+#ifdef _GLIBCXX_HAVE_SQRTL
+_GLIBCXX_MATHL_WRAPPER1 (sqrt, GLIBCXX_3.4);
+#endif
+#ifdef _GLIBCXX_HAVE_TANHL
+_GLIBCXX_MATHL_WRAPPER1 (tanh, GLIBCXX_3.4);
+#endif
+#ifdef _GLIBCXX_HAVE_TANL
+_GLIBCXX_MATHL_WRAPPER1 (tan, GLIBCXX_3.4);
+#endif
+#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
+
+#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+extern void *_ZTVN10__cxxabiv123__fundamental_type_infoE[];
+extern void *_ZTVN10__cxxabiv119__pointer_type_infoE[];
+extern __attribute__((used, weak)) const char _ZTSe[2] = "e";
+extern __attribute__((used, weak)) const char _ZTSPe[3] = "Pe";
+extern __attribute__((used, weak)) const char _ZTSPKe[4] = "PKe";
+extern __attribute__((used, weak)) const void *_ZTIe[2]
+  = { (void *) &_ZTVN10__cxxabiv123__fundamental_type_infoE[2],
+      (void *) _ZTSe };
+extern __attribute__((used, weak)) const void *_ZTIPe[4]
+  = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2],
+      (void *) _ZTSPe, (void *) 0L, (void *) _ZTIe };
+extern __attribute__((used, weak)) const void *_ZTIPKe[4]
+  = { (void *) &_ZTVN10__cxxabiv119__pointer_type_infoE[2],
+      (void *) _ZTSPKe, (void *) 1L, (void *) _ZTIe };
+#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
+
 #ifdef __APPLE__
 #if (defined(__ppc__) || defined (__ppc64__)) && defined (PIC)
 /* __eprintf shouldn't have been made visible from libstdc++, or
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/compatibility-ldbl.cc gcc-41-20060515/libstdc++-v3/src/compatibility-ldbl.cc
--- gcc-41-20060515.orig/libstdc++-v3/src/compatibility-ldbl.cc	1969-12-31 18:00:00.000000000 -0600
+++ gcc-41-20060515/libstdc++-v3/src/compatibility-ldbl.cc	2006-05-15 13:47:27.680387227 -0500
@@ -0,0 +1,73 @@
+// Compatibility symbols for -mlong-double-64 compatibility -*- C++ -*-
+
+// Copyright (C) 2006
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include <locale>
+
+#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+
+#ifdef __LONG_DOUBLE_128__
+#error "compatibility-ldbl.cc must be compiled with -mlong-double-64"
+#endif
+
+namespace std
+{
+#define C char
+  template class num_get<C, istreambuf_iterator<C> >;
+  template class num_put<C, ostreambuf_iterator<C> >;
+  template class money_get<C, istreambuf_iterator<C> >;
+  template class money_put<C, ostreambuf_iterator<C> >;
+  template const num_put<C>& use_facet<num_put<C> >(const locale&);
+  template const num_get<C>& use_facet<num_get<C> >(const locale&);
+  template const money_put<C>& use_facet<money_put<C> >(const locale&);
+  template const money_get<C>& use_facet<money_get<C> >(const locale&);
+  template bool has_facet<num_put<C> >(const locale&);
+  template bool has_facet<num_get<C> >(const locale&);
+  template bool has_facet<money_put<C> >(const locale&);
+  template bool has_facet<money_get<C> >(const locale&);
+#undef C
+#ifdef _GLIBCXX_USE_WCHAR_T
+#define C wchar_t
+  template class num_get<C, istreambuf_iterator<C> >;
+  template class num_put<C, ostreambuf_iterator<C> >;
+  template class money_get<C, istreambuf_iterator<C> >;
+  template class money_put<C, ostreambuf_iterator<C> >;
+  template const num_put<C>& use_facet<num_put<C> >(const locale&);
+  template const num_get<C>& use_facet<num_get<C> >(const locale&);
+  template const money_put<C>& use_facet<money_put<C> >(const locale&);
+  template const money_get<C>& use_facet<money_get<C> >(const locale&);
+  template bool has_facet<num_put<C> >(const locale&);
+  template bool has_facet<num_get<C> >(const locale&);
+  template bool has_facet<money_put<C> >(const locale&);
+  template bool has_facet<money_get<C> >(const locale&);
+#undef C
+#endif
+}
+
+#endif
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/complex_io.cc gcc-41-20060515/libstdc++-v3/src/complex_io.cc
--- gcc-41-20060515.orig/libstdc++-v3/src/complex_io.cc	2006-05-15 11:14:42.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/src/complex_io.cc	2006-05-15 13:47:27.681387073 -0500
@@ -1,6 +1,6 @@
 // The template and inlines for the -*- C++ -*- complex number classes.
 
-// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -91,3 +91,20 @@ namespace std
                const complex<long double>&);
 #endif //_GLIBCXX_USE_WCHAR_T
 } // namespace std
+
+// XXX GLIBCXX_ABI Deprecated
+#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+
+#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
+  extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
+
+_GLIBCXX_LDBL_COMPAT (_ZStlsIdcSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E,
+		      _ZStlsIecSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E);
+_GLIBCXX_LDBL_COMPAT (_ZStlsIdwSt11char_traitsIwEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E,
+		      _ZStlsIewSt11char_traitsIwEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E);
+_GLIBCXX_LDBL_COMPAT (_ZStrsIdcSt11char_traitsIcEERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E,
+		      _ZStrsIecSt11char_traitsIcEERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E);
+_GLIBCXX_LDBL_COMPAT (_ZStrsIdwSt11char_traitsIwEERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E,
+		      _ZStrsIewSt11char_traitsIwEERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E);
+
+#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/istream-inst.cc gcc-41-20060515/libstdc++-v3/src/istream-inst.cc
--- gcc-41-20060515.orig/libstdc++-v3/src/istream-inst.cc	2006-05-15 11:14:42.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/src/istream-inst.cc	2006-05-15 13:47:27.682386919 -0500
@@ -1,6 +1,6 @@
 // Explicit instantiation file.
 
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2006
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -68,3 +68,19 @@ namespace std
   template wistream& operator>>(wistream&, _Setw);
 #endif
 } // namespace std
+
+// XXX GLIBCXX_ABI Deprecated
+#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+
+#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
+  extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
+_GLIBCXX_LDBL_COMPAT (_ZNSirsERd, _ZNSirsERe);
+_GLIBCXX_LDBL_COMPAT (_ZNSt13basic_istreamIwSt11char_traitsIwEErsERd,
+		      _ZNSt13basic_istreamIwSt11char_traitsIwEErsERe);
+// These 2 are in GCC 4.2+ only so far
+// _GLIBCXX_LDBL_COMPAT (_ZNSi10_M_extractIdEERSiRT_,
+//			 _ZNSi10_M_extractIeEERSiRT_);
+// _GLIBCXX_LDBL_COMPAT (_ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractIdEERS2_RT_,
+//			 _ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractIeEERS2_RT_);
+
+#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/limits.cc gcc-41-20060515/libstdc++-v3/src/limits.cc
--- gcc-41-20060515.orig/libstdc++-v3/src/limits.cc	2006-05-15 11:14:42.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/src/limits.cc	2006-05-15 13:47:27.683386765 -0500
@@ -1,6 +1,6 @@
 // Static data members of -*- C++ -*- numeric_limits classes
 
-// Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -447,3 +447,34 @@ namespace std 
   const bool numeric_limits<long double>::tinyness_before;
   const float_round_style numeric_limits<long double>::round_style;
 } // namespace std
+
+// XXX GLIBCXX_ABI Deprecated
+#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+
+#define _GLIBCXX_NUM_LIM_COMPAT(type, member, len) \
+  extern "C" type _ZNSt14numeric_limitsIeE ## len ## member ## E \
+  __attribute__ ((alias ("_ZNSt14numeric_limitsIdE" #len #member "E")))
+_GLIBCXX_NUM_LIM_COMPAT (bool, is_specialized, 14);
+_GLIBCXX_NUM_LIM_COMPAT (int, digits, 6);
+_GLIBCXX_NUM_LIM_COMPAT (int, digits10, 8);
+_GLIBCXX_NUM_LIM_COMPAT (bool, is_signed, 9);
+_GLIBCXX_NUM_LIM_COMPAT (bool, is_integer, 10);
+_GLIBCXX_NUM_LIM_COMPAT (bool, is_exact, 8);
+_GLIBCXX_NUM_LIM_COMPAT (int, radix, 5);
+_GLIBCXX_NUM_LIM_COMPAT (int, min_exponent, 12);
+_GLIBCXX_NUM_LIM_COMPAT (int, min_exponent10, 14);
+_GLIBCXX_NUM_LIM_COMPAT (int, max_exponent, 12);
+_GLIBCXX_NUM_LIM_COMPAT (int, max_exponent10, 14);
+_GLIBCXX_NUM_LIM_COMPAT (bool, has_infinity, 12);
+_GLIBCXX_NUM_LIM_COMPAT (bool, has_quiet_NaN, 13);
+_GLIBCXX_NUM_LIM_COMPAT (bool, has_signaling_NaN, 17);
+_GLIBCXX_NUM_LIM_COMPAT (std::float_denorm_style, has_denorm, 10);
+_GLIBCXX_NUM_LIM_COMPAT (bool, has_denorm_loss, 15);
+_GLIBCXX_NUM_LIM_COMPAT (bool, is_iec559, 9);
+_GLIBCXX_NUM_LIM_COMPAT (bool, is_bounded, 10);
+_GLIBCXX_NUM_LIM_COMPAT (bool, is_modulo, 9);
+_GLIBCXX_NUM_LIM_COMPAT (bool, traps, 5);
+_GLIBCXX_NUM_LIM_COMPAT (bool, tinyness_before, 15);
+_GLIBCXX_NUM_LIM_COMPAT (std::float_round_style, round_style, 11);
+
+#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/locale.cc gcc-41-20060515/libstdc++-v3/src/locale.cc
--- gcc-41-20060515.orig/libstdc++-v3/src/locale.cc	2006-05-15 11:14:42.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/src/locale.cc	2006-05-15 14:06:44.932155273 -0500
@@ -41,6 +41,21 @@ namespace __gnu_internal
   static __glibcxx_mutex_define_initialized(locale_cache_mutex);
 }
 
+// XXX GLIBCXX_ABI Deprecated
+#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+# define _GLIBCXX_LOC_ID(mangled) extern std::locale::id mangled
+_GLIBCXX_LOC_ID (_ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE);
+_GLIBCXX_LOC_ID (_ZNSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE);
+_GLIBCXX_LOC_ID (_ZNSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE);
+_GLIBCXX_LOC_ID (_ZNSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE);
+# ifdef _GLIBCXX_USE_WCHAR_T
+_GLIBCXX_LOC_ID (_ZNSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE2idE);
+_GLIBCXX_LOC_ID (_ZNSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE2idE);
+_GLIBCXX_LOC_ID (_ZNSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE2idE);
+_GLIBCXX_LOC_ID (_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE2idE);
+# endif
+#endif
+
 namespace std 
 {
   // Definitions for static const data members of locale.
@@ -397,9 +412,29 @@ namespace std 
   locale::id::_M_id() const
   {
     if (!_M_index)
-      _M_index = 1 + __gnu_cxx::__exchange_and_add(&_S_refcount, 1);
+      {
+	// XXX GLIBCXX_ABI Deprecated
+#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+	locale::id *f = 0;
+# define _GLIBCXX_SYNC_ID(facet, mangled) \
+	if (this == &::mangled)				\
+	  f = &facet::id
+	_GLIBCXX_SYNC_ID (num_get<char>, _ZNSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE);
+	_GLIBCXX_SYNC_ID (num_put<char>, _ZNSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE);
+	_GLIBCXX_SYNC_ID (money_get<char>, _ZNSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE);
+	_GLIBCXX_SYNC_ID (money_put<char>, _ZNSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE);
+# ifdef _GLIBCXX_USE_WCHAR_T
+	_GLIBCXX_SYNC_ID (num_get<wchar_t>, _ZNSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE2idE);
+	_GLIBCXX_SYNC_ID (num_put<wchar_t>, _ZNSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE2idE);
+	_GLIBCXX_SYNC_ID (money_get<wchar_t>, _ZNSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE2idE);
+	_GLIBCXX_SYNC_ID (money_put<wchar_t>, _ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE2idE);
+# endif
+	if (f)
+	  _M_index = 1 + f->_M_id();
+	else
+#endif
+	  _M_index = 1 + __gnu_cxx::__exchange_and_add(&_S_refcount, 1);
+      }
     return _M_index - 1;
   }
 } // namespace std
-
-
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/locale-inst.cc gcc-41-20060515/libstdc++-v3/src/locale-inst.cc
--- gcc-41-20060515.orig/libstdc++-v3/src/locale-inst.cc	2006-05-15 11:14:42.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/src/locale-inst.cc	2006-05-15 13:47:27.684386611 -0500
@@ -1,6 +1,6 @@
 // Locale support -*- C++ -*-
 
-// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -37,6 +37,7 @@
 // Instantiation configuration.
 #ifndef C
 # define C char
+# define C_is_char
 #endif
 
 namespace std
@@ -48,6 +49,7 @@ namespace std
   template struct __moneypunct_cache<C, true>;
   template class moneypunct_byname<C, false>;
   template class moneypunct_byname<C, true>;
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
   template class money_get<C, istreambuf_iterator<C> >;
   template class money_put<C, ostreambuf_iterator<C> >;
   template
@@ -73,11 +75,13 @@ namespace std
     money_put<C, ostreambuf_iterator<C> >::
     _M_insert<false>(ostreambuf_iterator<C>, ios_base&, C, 
 		     const string_type&) const;
+_GLIBCXX_END_LDBL_NAMESPACE
 
   // numpunct, numpunct_byname, num_get, and num_put
   template class numpunct<C>;
   template struct __numpunct_cache<C>;
   template class numpunct_byname<C>;
+_GLIBCXX_BEGIN_LDBL_NAMESPACE
   template class num_get<C, istreambuf_iterator<C> >;
   template class num_put<C, ostreambuf_iterator<C> >; 
   template
@@ -161,7 +165,8 @@ namespace std
     num_put<C, ostreambuf_iterator<C> >::
     _M_insert_float(ostreambuf_iterator<C>, ios_base&, C, char, 
 		    long double) const;
-  
+_GLIBCXX_END_LDBL_NAMESPACE
+
   // time_get and time_put
   template class __timepunct<C>;
   template struct __timepunct_cache<C>;
@@ -314,3 +319,44 @@ namespace std
 		  ios_base::fmtflags, bool);
 #endif
 } // namespace std
+
+// XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT && defined C_is_char
+
+#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
+  extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
+
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIjEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+		     _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIjEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIlEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+		     _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIlEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intImEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+		     _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intImEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intItEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+		     _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intItEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIxEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+		     _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIxEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIyEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+		     _ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_intIyEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIlEES4_S4_RSt8ios_basecT_,
+		     _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIlEES3_S3_RSt8ios_basecT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intImEES4_S4_RSt8ios_basecT_,
+		     _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intImEES3_S3_RSt8ios_basecT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIxEES4_S4_RSt8ios_basecT_,
+		     _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIxEES3_S3_RSt8ios_basecT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIyEES4_S4_RSt8ios_basecT_,
+		     _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE13_M_insert_intIyEES3_S3_RSt8ios_basecT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES4_S4_RSt8ios_baseccT_,
+		     _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES3_S3_RSt8ios_baseccT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIdEES3_S3_RSt8ios_baseccT_,
+		     _ZNKSt7num_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE15_M_insert_floatIeEES3_S3_RSt8ios_baseccT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb0EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs,
+		     _ZNKSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb0EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb1EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs,
+		     _ZNKSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE10_M_extractILb1EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb0EEES4_S4_RSt8ios_basecRKSs,
+		     _ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb0EEES3_S3_RSt8ios_basecRKSs);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb1EEES4_S4_RSt8ios_basecRKSs,
+		     _ZNKSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE9_M_insertILb1EEES3_S3_RSt8ios_basecRKSs);
+
+#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/locale-misc-inst.cc gcc-41-20060515/libstdc++-v3/src/locale-misc-inst.cc
--- gcc-41-20060515.orig/libstdc++-v3/src/locale-misc-inst.cc	2006-05-15 11:14:42.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/src/locale-misc-inst.cc	2006-05-15 13:47:27.685386457 -0500
@@ -1,6 +1,7 @@
 // Locale support -*- C++ -*-
 
-// Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006
+// Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -45,3 +46,19 @@ namespace std
     __convert_from_v(char*, const int, const char*, long double, 
 		     const __c_locale&, int);
 } // namespace std
+
+// XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT
+
+#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
+  extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
+
+# if _GLIBCXX_C_LOCALE_GNU
+_GLIBCXX_LDBL_COMPAT(_ZSt16__convert_from_vIdEiPciPKcT_RKP15__locale_structi,
+		     _ZSt16__convert_from_vIeEiPciPKcT_RKP15__locale_structi);
+# else
+_GLIBCXX_LDBL_COMPAT(_ZSt16__convert_from_vIdEiPciPKcT_RKPii,
+		     _ZSt16__convert_from_vIeEiPciPKcT_RKPii);
+# endif
+
+#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/Makefile.am gcc-41-20060515/libstdc++-v3/src/Makefile.am
--- gcc-41-20060515.orig/libstdc++-v3/src/Makefile.am	2006-05-15 11:14:42.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/src/Makefile.am	2006-05-15 13:47:27.677387688 -0500
@@ -35,10 +35,15 @@ libstdc++-symbol.ver:  ${glibcxx_srcdir}
 		$(port_specific_symbol_files)
 	cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
 	if test "x$(port_specific_symbol_files)" != x; then \
-	  sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
-	  sed -n '/DO NOT DELETE/,$$p' $@ > tmp.bottom; \
-	  cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
-	  rm tmp.top tmp.bottom; \
+	  if grep '^# Appended to version file.' \
+	       $(port_specific_symbol_files) /dev/null > /dev/null 2>&1; then \
+	    cat $(port_specific_symbol_files) >> $@; \
+	  else \
+	    sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
+	    sed -n '/DO NOT DELETE/,$$p' $@ > tmp.bottom; \
+	    cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
+	    rm tmp.top tmp.bottom; \
+	  fi; \
 	fi
 
 if ENABLE_SYMVERS_GNU
@@ -113,6 +118,12 @@ c++locale.cc: ${glibcxx_srcdir}/$(CLOCAL
 basic_file.cc: ${glibcxx_srcdir}/$(BASIC_FILE_CC)
 	$(LN_S) ${glibcxx_srcdir}/$(BASIC_FILE_CC) ./$@ || true
 
+if GLIBCXX_LDBL_COMPAT
+ldbl_compat_sources = compatibility-ldbl.cc
+else
+ldbl_compat_sources =
+endif
+
 # Sources present in the src directory.
 sources = \
 	bitmap_allocator.cc \
@@ -160,7 +171,8 @@ sources = \
 	wlocale-inst.cc \
 	wstring-inst.cc \
 	${host_sources} \
-	${host_sources_extra}
+	${host_sources_extra} \
+	${ldbl_compat_sources}
 
 VPATH = $(top_srcdir)/src:$(top_srcdir)
 
@@ -191,6 +203,15 @@ concept-inst.lo: concept-inst.cc
 concept-inst.o: concept-inst.cc
 	$(CXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $<
 
+if GLIBCXX_LDBL_COMPAT
+# Use special rules for compatibility-ldbl.cc compilation, as we need to
+# pass -mlong-double-64.
+compatibility-ldbl.lo: compatibility-ldbl.cc
+	$(LTCXXCOMPILE) -mlong-double-64 -c $<
+compatibility-ldbl.o: compatibility-ldbl.cc
+	$(CXXCOMPILE) -mlong-double-64 -c $<
+endif
+
 # AM_CXXFLAGS needs to be in each subdirectory so that it can be
 # modified in a per-library or per-sub-library way.  Need to manually
 # set this option because CONFIG_CXXFLAGS has to be after
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/Makefile.in gcc-41-20060515/libstdc++-v3/src/Makefile.in
--- gcc-41-20060515.orig/libstdc++-v3/src/Makefile.in	2006-05-15 11:14:42.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/src/Makefile.in	2006-05-15 13:47:27.679387380 -0500
@@ -59,11 +59,27 @@ am__strip_dir = `echo $$p | sed -e 's|^.
 am__installdirs = "$(DESTDIR)$(toolexeclibdir)"
 toolexeclibLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
+am__libstdc___la_SOURCES_DIST = bitmap_allocator.cc pool_allocator.cc \
+	mt_allocator.cc codecvt.cc compatibility.cc complex_io.cc \
+	ctype.cc debug.cc debug_list.cc functexcept.cc \
+	globals_locale.cc globals_io.cc ios.cc ios_failure.cc \
+	ios_init.cc ios_locale.cc limits.cc list.cc locale.cc \
+	locale_init.cc locale_facets.cc localename.cc stdexcept.cc \
+	strstream.cc tree.cc allocator-inst.cc concept-inst.cc \
+	fstream-inst.cc ext-inst.cc ios-inst.cc iostream-inst.cc \
+	istream-inst.cc istream.cc locale-inst.cc locale-misc-inst.cc \
+	misc-inst.cc ostream-inst.cc sstream-inst.cc streambuf-inst.cc \
+	streambuf.cc string-inst.cc valarray-inst.cc wlocale-inst.cc \
+	wstring-inst.cc atomicity.cc codecvt_members.cc \
+	collate_members.cc ctype_members.cc messages_members.cc \
+	monetary_members.cc numeric_members.cc time_members.cc \
+	basic_file.cc c++locale.cc compatibility-ldbl.cc
 am__objects_1 = atomicity.lo codecvt_members.lo collate_members.lo \
 	ctype_members.lo messages_members.lo monetary_members.lo \
 	numeric_members.lo time_members.lo
 am__objects_2 = basic_file.lo c++locale.lo
-am__objects_3 = bitmap_allocator.lo pool_allocator.lo mt_allocator.lo \
+@GLIBCXX_LDBL_COMPAT_TRUE@am__objects_3 = compatibility-ldbl.lo
+am__objects_4 = bitmap_allocator.lo pool_allocator.lo mt_allocator.lo \
 	codecvt.lo compatibility.lo complex_io.lo ctype.lo debug.lo \
 	debug_list.lo functexcept.lo globals_locale.lo globals_io.lo \
 	ios.lo ios_failure.lo ios_init.lo ios_locale.lo limits.lo \
@@ -74,8 +90,9 @@ am__objects_3 = bitmap_allocator.lo pool
 	locale-inst.lo locale-misc-inst.lo misc-inst.lo \
 	ostream-inst.lo sstream-inst.lo streambuf-inst.lo streambuf.lo \
 	string-inst.lo valarray-inst.lo wlocale-inst.lo \
-	wstring-inst.lo $(am__objects_1) $(am__objects_2)
-am_libstdc___la_OBJECTS = $(am__objects_3)
+	wstring-inst.lo $(am__objects_1) $(am__objects_2) \
+	$(am__objects_3)
+am_libstdc___la_OBJECTS = $(am__objects_4)
 libstdc___la_OBJECTS = $(am_libstdc___la_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp =
@@ -84,7 +101,7 @@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_IN
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
 CXXLD = $(CXX)
 SOURCES = $(libstdc___la_SOURCES)
-DIST_SOURCES = $(libstdc___la_SOURCES)
+DIST_SOURCES = $(am__libstdc___la_SOURCES_DIST)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -152,6 +169,8 @@ GLIBCXX_C_HEADERS_C_TRUE = @GLIBCXX_C_HE
 GLIBCXX_HOSTED_FALSE = @GLIBCXX_HOSTED_FALSE@
 GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@
 GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
+GLIBCXX_LDBL_COMPAT_FALSE = @GLIBCXX_LDBL_COMPAT_FALSE@
+GLIBCXX_LDBL_COMPAT_TRUE = @GLIBCXX_LDBL_COMPAT_TRUE@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -302,6 +321,8 @@ host_sources_extra = \
 	basic_file.cc \
 	c++locale.cc
 
+@GLIBCXX_LDBL_COMPAT_FALSE@ldbl_compat_sources = 
+@GLIBCXX_LDBL_COMPAT_TRUE@ldbl_compat_sources = compatibility-ldbl.cc
 
 # Sources present in the src directory.
 sources = \
@@ -350,7 +371,8 @@ sources = \
 	wlocale-inst.cc \
 	wstring-inst.cc \
 	${host_sources} \
-	${host_sources_extra}
+	${host_sources_extra} \
+	${ldbl_compat_sources}
 
 libstdc___la_SOURCES = $(sources)
 libstdc___la_LIBADD = \
@@ -677,10 +699,15 @@ libstdc++-symbol.ver:  ${glibcxx_srcdir}
 		$(port_specific_symbol_files)
 	cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
 	if test "x$(port_specific_symbol_files)" != x; then \
-	  sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
-	  sed -n '/DO NOT DELETE/,$$p' $@ > tmp.bottom; \
-	  cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
-	  rm tmp.top tmp.bottom; \
+	  if grep '^# Appended to version file.' \
+	       $(port_specific_symbol_files) /dev/null > /dev/null 2>&1; then \
+	    cat $(port_specific_symbol_files) >> $@; \
+	  else \
+	    sed -n '1,/DO NOT DELETE/p' $@ > tmp.top; \
+	    sed -n '/DO NOT DELETE/,$$p' $@ > tmp.bottom; \
+	    cat tmp.top $(port_specific_symbol_files) tmp.bottom > $@; \
+	    rm tmp.top tmp.bottom; \
+	  fi; \
 	fi
 @ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@@ENABLE_SYMVERS_GNU_FALSE@libstdc++-symbol.explist : libstdc++-symbol.ver \
 @ENABLE_SYMVERS_DARWIN_EXPORT_TRUE@@ENABLE_SYMVERS_GNU_FALSE@		${glibcxx_srcdir}/scripts/make_exports.pl \
@@ -733,6 +760,13 @@ concept-inst.lo: concept-inst.cc
 concept-inst.o: concept-inst.cc
 	$(CXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -c $<
 
+# Use special rules for compatibility-ldbl.cc compilation, as we need to
+# pass -mlong-double-64.
+@GLIBCXX_LDBL_COMPAT_TRUE@compatibility-ldbl.lo: compatibility-ldbl.cc
+@GLIBCXX_LDBL_COMPAT_TRUE@	$(LTCXXCOMPILE) -mlong-double-64 -c $<
+@GLIBCXX_LDBL_COMPAT_TRUE@compatibility-ldbl.o: compatibility-ldbl.cc
+@GLIBCXX_LDBL_COMPAT_TRUE@	$(CXXCOMPILE) -mlong-double-64 -c $<
+
 # Added bits to build debug library.
 @GLIBCXX_BUILD_DEBUG_TRUE@all-local: build_debug
 @GLIBCXX_BUILD_DEBUG_TRUE@install-data-local: install_debug
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/ostream-inst.cc gcc-41-20060515/libstdc++-v3/src/ostream-inst.cc
--- gcc-41-20060515.orig/libstdc++-v3/src/ostream-inst.cc	2006-05-15 11:14:42.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/src/ostream-inst.cc	2006-05-15 13:47:27.685386457 -0500
@@ -1,6 +1,6 @@
 // Explicit instantiation file.
 
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2006
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -74,3 +74,19 @@ namespace std
   template wostream& operator<<(wostream&, _Setw);
 #endif
 } // namespace std
+
+// XXX GLIBCXX_ABI Deprecated
+#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+
+#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
+  extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
+_GLIBCXX_LDBL_COMPAT (_ZNSolsEd, _ZNSolsEe);
+_GLIBCXX_LDBL_COMPAT (_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEd,
+		      _ZNSt13basic_ostreamIwSt11char_traitsIwEElsEe);
+// These 2 are in GCC 4.2+ only so far
+// _GLIBCXX_LDBL_COMPAT (_ZNSo9_M_insertIdEERSoT_,
+//			 _ZNSo9_M_insertIeEERSoT_);
+// _GLIBCXX_LDBL_COMPAT (_ZNSt13basic_ostreamIwSt11char_traitsIwEE9_M_insertIdEERS2_T_,
+//			 _ZNSt13basic_ostreamIwSt11char_traitsIwEE9_M_insertIeEERS2_T_);
+
+#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/src/wlocale-inst.cc gcc-41-20060515/libstdc++-v3/src/wlocale-inst.cc
--- gcc-41-20060515.orig/libstdc++-v3/src/wlocale-inst.cc	2006-05-15 11:14:42.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/src/wlocale-inst.cc	2006-05-15 13:47:27.686386303 -0500
@@ -1,6 +1,7 @@
 // Locale support -*- C++ -*-
 
-// Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006
+// Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -36,4 +37,45 @@
 #ifdef _GLIBCXX_USE_WCHAR_T
 #define C wchar_t
 #include "locale-inst.cc"
+
+// XXX GLIBCXX_ABI Deprecated
+#if defined _GLIBCXX_LONG_DOUBLE_COMPAT
+
+#define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
+  extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
+
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIjEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+		     _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIjEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIlEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+		     _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIlEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intImEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+		     _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intImEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intItEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+		     _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intItEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIxEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+		     _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIxEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIyEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRT_,
+		     _ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE14_M_extract_intIyEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIlEES4_S4_RSt8ios_basewT_,
+		     _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIlEES3_S3_RSt8ios_basewT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intImEES4_S4_RSt8ios_basewT_,
+		     _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intImEES3_S3_RSt8ios_basewT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIxEES4_S4_RSt8ios_basewT_,
+		     _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIxEES3_S3_RSt8ios_basewT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIyEES4_S4_RSt8ios_basewT_,
+		     _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE13_M_insert_intIyEES3_S3_RSt8ios_basewT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1287num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIdEES4_S4_RSt8ios_basewcT_,
+		     _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIdEES3_S3_RSt8ios_basewcT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIdEES3_S3_RSt8ios_basewcT_,
+		     _ZNKSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE15_M_insert_floatIeEES3_S3_RSt8ios_basewcT_);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE10_M_extractILb0EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs,
+		     _ZNKSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE10_M_extractILb0EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE10_M_extractILb1EEES4_S4_S4_RSt8ios_baseRSt12_Ios_IostateRSs,
+		     _ZNKSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE10_M_extractILb1EEES3_S3_S3_RSt8ios_baseRSt12_Ios_IostateRSs);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb0EEES4_S4_RSt8ios_basewRKSbIwS3_SaIwEE,
+		     _ZNKSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb0EEES3_S3_RSt8ios_basewRKSbIwS2_SaIwEE);
+_GLIBCXX_LDBL_COMPAT(_ZNKSt17__gnu_cxx_ldbl1289money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb1EEES4_S4_RSt8ios_basewRKSbIwS3_SaIwEE,
+		     _ZNKSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE9_M_insertILb1EEES3_S3_RSt8ios_basewRKSbIwS2_SaIwEE);
+
+#endif // _GLIBCXX_LONG_DOUBLE_COMPAT
 #endif
diff -urpN -X /home/bergner/cvs/dontdiff gcc-41-20060515.orig/libstdc++-v3/testsuite/testsuite_abi.cc gcc-41-20060515/libstdc++-v3/testsuite/testsuite_abi.cc
--- gcc-41-20060515.orig/libstdc++-v3/testsuite/testsuite_abi.cc	2006-05-15 11:15:38.000000000 -0500
+++ gcc-41-20060515/libstdc++-v3/testsuite/testsuite_abi.cc	2006-05-15 14:14:57.231341148 -0500
@@ -187,8 +187,11 @@ check_version(symbol& test, bool added)
       known_versions.push_back("GLIBCXX_3.4.6");
       known_versions.push_back("GLIBCXX_3.4.7");
       known_versions.push_back("GLIBCXX_3.4.8");
+      known_versions.push_back("GLIBCXX_LDBL_3.4");
+      known_versions.push_back("GLIBCXX_LDBL_3.4.7");
       known_versions.push_back("CXXABI_1.3");
       known_versions.push_back("CXXABI_1.3.1");
+      known_versions.push_back("CXXABI_LDBL_1.3");
     }
   compat_list::iterator begin = known_versions.begin();
   compat_list::iterator end = known_versions.end();
@@ -224,9 +227,7 @@ check_version(symbol& test, bool added)
 	  // New version labels are ok. The rest are not.
 	  compat_list::iterator it2 = find(begin, end, test.name);
 	  if (it2 != end)
-	    {
-	      test.version_status = symbol::compatible;
-	    }
+	    test.version_status = symbol::compatible;
 	  else
 	    test.version_status = symbol::incompatible;
 	}
@@ -370,7 +371,7 @@ compare_symbols(const char* baseline_fil
 	  added_names.erase(it);
 	}
       else
-	  missing_names.push_back(what);
+	missing_names.push_back(what);
     }
 
   // Check missing names for compatibility.