This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Support for PowerPC uClibc with 128-bit long double


This patch fixes some problems using powerpc*-*-linux* with 
--with-long-double-128 and uClibc (whether just uClibc, or a custom 
multilib configuration with both glibc and uClibc multilibs).

* The configure lists of targets supporting 128-bit long double have 
powerpc*-*-*gnu*, but this doesn't match powerpc-none-linux-uclibc.  The 
targets for which libgcc/config.host uses rs6000/t-ldbl128 are the correct 
set, and are all covered by powerpc*-*-linux* and powerpc*-*-gnu*.

* uClibc may be configured without wide characters, in which case some 
_GLIBCXX_LDBL_COMPAT calls must be disabled.

Tested with cross to powerpc-none-linux-uclibc.  OK to commit?

gcc:
2007-04-17  Joseph Myers  <joseph@codesourcery.com>

	* configure.ac: Allow both powerpc*-*-linux* and powerpc*-*-gnu*
	for long double compatibility.
	* configure: Regenerate.

libstdc++-v3:
2007-04-17  Joseph Myers  <joseph@codesourcery.com>

	* configure.ac: Allow both powerpc*-*-linux* and powerpc*-*-gnu*
	for long double compatibility.
	* configure: Regenerate.
	* src/complex_io.cc, src/istream-inst.cc, src/ostream-inst.cc:
	Condition some _GLIBCXX_LDBL_COMPAT calls on _GLIBCXX_USE_WCHAR_T.

Index: gcc/configure
===================================================================
--- gcc/configure	(revision 123910)
+++ gcc/configure	(working copy)
@@ -16575,7 +16575,8 @@
 # Some glibc targets used DFmode long double, but with glibc 2.4
 # and later they can use TFmode.
 case "$target" in
-  powerpc*-*-*gnu* | \
+  powerpc*-*-linux* | \
+  powerpc*-*-gnu* | \
   sparc*-*-linux* | \
   s390*-*-linux* | \
   alpha*-*-linux*)
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac	(revision 123910)
+++ gcc/configure.ac	(working copy)
@@ -3440,7 +3440,8 @@
 # Some glibc targets used DFmode long double, but with glibc 2.4
 # and later they can use TFmode.
 case "$target" in
-  powerpc*-*-*gnu* | \
+  powerpc*-*-linux* | \
+  powerpc*-*-gnu* | \
   sparc*-*-linux* | \
   s390*-*-linux* | \
   alpha*-*-linux*)
Index: libstdc++-v3/configure
===================================================================
--- libstdc++-v3/configure	(revision 123910)
+++ libstdc++-v3/configure	(working copy)
@@ -83894,7 +83894,8 @@
 
 ac_ldbl_compat=no
 case "$target" in
-  powerpc*-*-*gnu* | \
+  powerpc*-*-linux* | \
+  powerpc*-*-gnu* | \
   sparc*-*-linux* | \
   s390*-*-linux* | \
   alpha*-*-linux*)
Index: libstdc++-v3/src/complex_io.cc
===================================================================
--- libstdc++-v3/src/complex_io.cc	(revision 123910)
+++ libstdc++-v3/src/complex_io.cc	(working copy)
@@ -101,11 +101,15 @@
 
 _GLIBCXX_LDBL_COMPAT (_ZStlsIdcSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E,
 		      _ZStlsIecSt11char_traitsIcEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E);
+#ifdef _GLIBCXX_USE_WCHAR_T
 _GLIBCXX_LDBL_COMPAT (_ZStlsIdwSt11char_traitsIwEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E,
 		      _ZStlsIewSt11char_traitsIwEERSt13basic_ostreamIT0_T1_ES6_RKSt7complexIT_E);
+#endif
 _GLIBCXX_LDBL_COMPAT (_ZStrsIdcSt11char_traitsIcEERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E,
 		      _ZStrsIecSt11char_traitsIcEERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E);
+#ifdef _GLIBCXX_USE_WCHAR_T
 _GLIBCXX_LDBL_COMPAT (_ZStrsIdwSt11char_traitsIwEERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E,
 		      _ZStrsIewSt11char_traitsIwEERSt13basic_istreamIT0_T1_ES6_RSt7complexIT_E);
+#endif
 
 #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
Index: libstdc++-v3/src/istream-inst.cc
===================================================================
--- libstdc++-v3/src/istream-inst.cc	(revision 123910)
+++ libstdc++-v3/src/istream-inst.cc	(working copy)
@@ -103,11 +103,15 @@
 #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
   extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
 _GLIBCXX_LDBL_COMPAT (_ZNSirsERd, _ZNSirsERe);
+#ifdef _GLIBCXX_USE_WCHAR_T
 _GLIBCXX_LDBL_COMPAT (_ZNSt13basic_istreamIwSt11char_traitsIwEErsERd,
 		      _ZNSt13basic_istreamIwSt11char_traitsIwEErsERe);
+#endif
 _GLIBCXX_LDBL_COMPAT (_ZNSi10_M_extractIdEERSiRT_,
 		      _ZNSi10_M_extractIeEERSiRT_);
+#ifdef _GLIBCXX_USE_WCHAR_T
 _GLIBCXX_LDBL_COMPAT (_ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractIdEERS2_RT_,
 		      _ZNSt13basic_istreamIwSt11char_traitsIwEE10_M_extractIeEERS2_RT_);
+#endif
 
 #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
Index: libstdc++-v3/src/ostream-inst.cc
===================================================================
--- libstdc++-v3/src/ostream-inst.cc	(revision 123910)
+++ libstdc++-v3/src/ostream-inst.cc	(working copy)
@@ -106,11 +106,15 @@
 #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
   extern "C" void ldbl (void) __attribute__ ((alias (#dbl), weak))
 _GLIBCXX_LDBL_COMPAT (_ZNSolsEd, _ZNSolsEe);
+#ifdef _GLIBCXX_USE_WCHAR_T
 _GLIBCXX_LDBL_COMPAT (_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEd,
 		      _ZNSt13basic_ostreamIwSt11char_traitsIwEElsEe);
+#endif
 _GLIBCXX_LDBL_COMPAT (_ZNSo9_M_insertIdEERSoT_,
 		      _ZNSo9_M_insertIeEERSoT_);
+#ifdef _GLIBCXX_USE_WCHAR_T
 _GLIBCXX_LDBL_COMPAT (_ZNSt13basic_ostreamIwSt11char_traitsIwEE9_M_insertIdEERS2_T_,
 		      _ZNSt13basic_ostreamIwSt11char_traitsIwEE9_M_insertIeEERS2_T_);
+#endif
 
 #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
Index: libstdc++-v3/configure.ac
===================================================================
--- libstdc++-v3/configure.ac	(revision 123910)
+++ libstdc++-v3/configure.ac	(working copy)
@@ -300,7 +300,8 @@
 
 ac_ldbl_compat=no
 case "$target" in
-  powerpc*-*-*gnu* | \
+  powerpc*-*-linux* | \
+  powerpc*-*-gnu* | \
   sparc*-*-linux* | \
   s390*-*-linux* | \
   alpha*-*-linux*)

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]