public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch/libstdc++-v3] export long double versions of "C" math library on more platforms
@ 2010-06-12 12:49 Matthias Klose
  2010-06-15 22:16 ` Paolo Carlini
  0 siblings, 1 reply; 6+ messages in thread
From: Matthias Klose @ 2010-06-12 12:49 UTC (permalink / raw)
  To: GCC Patches, libstdc++; +Cc: Joseph S. Myers, Aurelien Jarno

[-- Attachment #1: Type: text/plain, Size: 568 bytes --]

When libstdc++-v3 is built on a system running glibc-2.11 or newer, a 
libstdc++.so.6 is built not exporting anymore the long double versions of "C" 
math library.  For hppa-linux this is already taken care of.  The missing 
symbols were observed on arm-linux-gnueabi and mips*-linux-gnu builds.  Joseph 
S. Myers mentioned on #gcc that more platforms which did export these in the 
past should export these as well.  It's not clear if the old ARM ABI should 
export these as well.  If the patch is accepted, it should go to the active 
branches as well.

   Matthias

[-- Attachment #2: ldbl.diff --]
[-- Type: text/plain, Size: 1103 bytes --]

2010-06-12  Matthias Klose  <doko@ubuntu.com>

        * src/compatibility.cc: Export long double versions of "C" math
        library for arm-linux-gnueabi, m68k-linux-gnu (ColdFire),
        mips*-linux-gnu (o32 ABI), sh*-linux-gnu (not 32 bit).

Index: libstdc++-v3/src/compatibility.cc
===================================================================
--- libstdc++-v3/src/compatibility.cc	(revision 160481)
+++ libstdc++-v3/src/compatibility.cc	(working copy)
@@ -410,7 +410,11 @@
 // gcc-4.1.0
 // Long double versions of "C" math functions. 
 #if defined (_GLIBCXX_LONG_DOUBLE_COMPAT) \
-    || (defined (__hppa__) && defined (__linux__))
+    || (defined (__arm__) && defined (__linux__) && defined (__ARM_EABI__)) \
+    || (defined (__hppa__) && defined (__linux__)) \
+    || (defined (__m68k__) && defined (__mcoldfire__) && defined (__linux__)) \
+    || (defined (__mips__) && defined (_ABIO32) && defined (__linux__)) \
+    || (defined (__sh__) && defined (__linux__) && __SIZEOF_SIZE_T__ == 4) \
 
 #define _GLIBCXX_MATHL_WRAPPER(name, argdecl, args, ver) \
 extern "C" double						\

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch/libstdc++-v3] export long double versions of "C" math library on more platforms
  2010-06-15 22:16 ` Paolo Carlini
@ 2010-06-15 22:16   ` Paolo Carlini
  2010-06-15 23:25   ` Joseph S. Myers
  1 sibling, 0 replies; 6+ messages in thread
From: Paolo Carlini @ 2010-06-15 22:16 UTC (permalink / raw)
  To: Matthias Klose; +Cc: GCC Patches, libstdc++, Joseph S. Myers, Aurelien Jarno

On 06/15/2010 11:03 PM, Paolo Carlini wrote:
> On 06/12/2010 12:59 PM, Matthias Klose wrote:
>   
>> When libstdc++-v3 is built on a system running glibc-2.11 or newer, a
>> libstdc++.so.6 is built not exporting anymore the long double versions
>> of "C" math library.  For hppa-linux this is already taken care of. 
>> The missing symbols were observed on arm-linux-gnueabi and
>> mips*-linux-gnu builds.  Joseph S. Myers mentioned on #gcc that more
>> platforms which did export these in the past should export these as
>> well.  It's not clear if the old ARM ABI should export these as well. 
>> If the patch is accepted, it should go to the active branches as well.
>>     
> Thus, do I understand correctly that Joseph is OK with the arm bits of
> your patch? Which kind of practical evidence do we have about m68k,
> mips, and sh? At least, I would ask the maintainers to have a look...
> can you do that?
>   
Sorry, thus mips should be also fine. We are missing a minimum of data
about m68k and sh.

Paolo.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch/libstdc++-v3] export long double versions of "C" math library on more platforms
  2010-06-12 12:49 [patch/libstdc++-v3] export long double versions of "C" math library on more platforms Matthias Klose
@ 2010-06-15 22:16 ` Paolo Carlini
  2010-06-15 22:16   ` Paolo Carlini
  2010-06-15 23:25   ` Joseph S. Myers
  0 siblings, 2 replies; 6+ messages in thread
From: Paolo Carlini @ 2010-06-15 22:16 UTC (permalink / raw)
  To: Matthias Klose; +Cc: GCC Patches, libstdc++, Joseph S. Myers, Aurelien Jarno

On 06/12/2010 12:59 PM, Matthias Klose wrote:
> When libstdc++-v3 is built on a system running glibc-2.11 or newer, a
> libstdc++.so.6 is built not exporting anymore the long double versions
> of "C" math library.  For hppa-linux this is already taken care of. 
> The missing symbols were observed on arm-linux-gnueabi and
> mips*-linux-gnu builds.  Joseph S. Myers mentioned on #gcc that more
> platforms which did export these in the past should export these as
> well.  It's not clear if the old ARM ABI should export these as well. 
> If the patch is accepted, it should go to the active branches as well.
Thus, do I understand correctly that Joseph is OK with the arm bits of
your patch? Which kind of practical evidence do we have about m68k,
mips, and sh? At least, I would ask the maintainers to have a look...
can you do that?

Thanks,
Paolo.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch/libstdc++-v3] export long double versions of "C" math library on more platforms
  2010-06-15 22:16 ` Paolo Carlini
  2010-06-15 22:16   ` Paolo Carlini
@ 2010-06-15 23:25   ` Joseph S. Myers
  2010-06-15 23:54     ` Paolo Carlini
  1 sibling, 1 reply; 6+ messages in thread
From: Joseph S. Myers @ 2010-06-15 23:25 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: Matthias Klose, GCC Patches, libstdc++, Aurelien Jarno

On Tue, 15 Jun 2010, Paolo Carlini wrote:

> On 06/12/2010 12:59 PM, Matthias Klose wrote:
> > When libstdc++-v3 is built on a system running glibc-2.11 or newer, a
> > libstdc++.so.6 is built not exporting anymore the long double versions
> > of "C" math library.  For hppa-linux this is already taken care of. 
> > The missing symbols were observed on arm-linux-gnueabi and
> > mips*-linux-gnu builds.  Joseph S. Myers mentioned on #gcc that more
> > platforms which did export these in the past should export these as
> > well.  It's not clear if the old ARM ABI should export these as well. 
> > If the patch is accepted, it should go to the active branches as well.
> Thus, do I understand correctly that Joseph is OK with the arm bits of
> your patch? Which kind of practical evidence do we have about m68k,
> mips, and sh? At least, I would ask the maintainers to have a look...
> can you do that?

The platforms in question - ARM EABI, MIPS o32, ColdFire, SH 32-bit - are 
the ones I listed on IRC as glibc platforms I know of where long double 
has the same representation as double.  I noted that I don't know whether 
this also applies to ARM old-ABI or SH64.  I don't see anything wrong with 
the preprocessor conditionals as representing the conditions I gave, 
although the ChangeLog reference to "not 32 bit" should be "32 bit" or 
"not 64 bit" (and as I said, I don't know whether that 32-bit restriction 
for SH is needed).

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch/libstdc++-v3] export long double versions of "C" math library on more platforms
  2010-06-15 23:25   ` Joseph S. Myers
@ 2010-06-15 23:54     ` Paolo Carlini
  2010-06-16  8:09       ` Matthias Klose
  0 siblings, 1 reply; 6+ messages in thread
From: Paolo Carlini @ 2010-06-15 23:54 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: Matthias Klose, GCC Patches, libstdc++, Aurelien Jarno

On 06/16/2010 12:45 AM, Joseph S. Myers wrote:
> The platforms in question - ARM EABI, MIPS o32, ColdFire, SH 32-bit - are
> the ones I listed on IRC as glibc platforms I know of where long double 
> has the same representation as double.  I noted that I don't know whether 
> this also applies to ARM old-ABI or SH64.  I don't see anything wrong with 
> the preprocessor conditionals as representing the conditions I gave, 
> although the ChangeLog reference to "not 32 bit" should be "32 bit" or 
> "not 64 bit" (and as I said, I don't know whether that 32-bit restriction 
> for SH is needed).
>   
Ok, the patch is OK with the small changes to the ChangeLog entry
indicated by Joseph.

Paolo.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch/libstdc++-v3] export long double versions of "C" math library on more platforms
  2010-06-15 23:54     ` Paolo Carlini
@ 2010-06-16  8:09       ` Matthias Klose
  0 siblings, 0 replies; 6+ messages in thread
From: Matthias Klose @ 2010-06-16  8:09 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: Joseph S. Myers, GCC Patches, libstdc++, Aurelien Jarno

On 16.06.2010 00:55, Paolo Carlini wrote:
> On 06/16/2010 12:45 AM, Joseph S. Myers wrote:
>> The platforms in question - ARM EABI, MIPS o32, ColdFire, SH 32-bit - are
>> the ones I listed on IRC as glibc platforms I know of where long double
>> has the same representation as double.  I noted that I don't know whether
>> this also applies to ARM old-ABI or SH64.  I don't see anything wrong with
>> the preprocessor conditionals as representing the conditions I gave,
>> although the ChangeLog reference to "not 32 bit" should be "32 bit" or
>> "not 64 bit" (and as I said, I don't know whether that 32-bit restriction
>> for SH is needed).
>>
> Ok, the patch is OK with the small changes to the ChangeLog entry
> indicated by Joseph.

Checked in with the suggested ChangeLog change. Will apply it to the branches 
later this week.

   Matthias

         * src/compatibility.cc: Export long double versions of "C" math
         library for arm-linux-gnueabi, m68k-linux-gnu (ColdFire),
         mips*-linux-gnu (o32 ABI), sh*-linux-gnu (32 bit).

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-06-16  6:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-12 12:49 [patch/libstdc++-v3] export long double versions of "C" math library on more platforms Matthias Klose
2010-06-15 22:16 ` Paolo Carlini
2010-06-15 22:16   ` Paolo Carlini
2010-06-15 23:25   ` Joseph S. Myers
2010-06-15 23:54     ` Paolo Carlini
2010-06-16  8:09       ` Matthias Klose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).