This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

Re: Request for clarification on the 128bit long double requirments


I hope I can clarify the situation.  Planning and communication surely
could have been much better, and as the person who coordinated the efforts
that were made, I can be blamed for what we did and when we did it.  glibc
has lacked the manpower to be as organized as we would like to be, and
given what we do have, frankly I have no apologies about how we've
scheduled our work.

glibc has not imposed any requirements on GCC.  The maintainers for the
affected platforms have known for a long time that the long double type
ought to change and that the sticking point was the glibc compatibility.
Anyone involved in glibc development has known this was on the table for
2.4, and that it would be happening by sometime around now.  We did the
glibc work to support -mlong-double-128 for powerpc64, sparc, and alpha.
The support requires building glibc with a GCC that supports -mlong-double-128.
At least as far back as 4.0 (and I think 3.4 as well, modulo compiler bugs)
this works for those platforms.  glibc does not mandate any change to GCC.
(glibc is built to support both the old and new long double type ABIs at
both link and compile time, depending on the use of -mlong-double-128 or
its default setting by GCC.)

The glibc work is now ready and it is easy to switch on for each platform
that has used the double==long double ABI in the past.  I contacted the GCC
maintainers for s390 and powerpc(32) to suggest we start supporting a good
long double type on those platforms as well.  In the case of s390, we
learned that the -mlong-double-128 support was not yet in the compiler at
all.  In the case of powerpc32, we learned that its -mlong-double-128
supported only IEEE quad format, while powerpc64 supported IBM extended
format, and the consensus on behalf of powerpc users was that a single long
double format across the 32/64 powerpc architecture is what GNU/Linux users
should have.  The upshot is that both s390 and powerpc(32) would require
new GCC changes in order to compile for the new glibc long double ABI.  I
told those maintainers that glibc 2.4 would not support a new long double
ABI for each platform unless GCC 4.1 as released could compile that glibc.
The glibc sources make it easy enough to switch a platform down the line
(for the glibc 2.5 ABI, whenever that next release period comes along).
But all agreed that it would be in users' interests not to delay another
year in having a worthwhile long double type for their platforms, and also
in users' interests to have the change happen at the same time for as many
platforms as possible so that efforts to document and explain the change to
users could be consolidated.

Each platform's maintainers took the decision to try to make the necessary
changes in GCC 4.1 so that -mlong-double-128 can be used to compile glibc
2.4, and took the responsibility for that decision with the GCC community.
>From what I gather, the GCC maintainers as whole agreed that these changes
were worth having in 4.1 despite the poor planning.  glibc has not forced
anything on GCC maintainers.  If s390 -mlong-double-128 support is not in
GCC 4.1, the new long double ABI will not be in glibc 2.4 for s390.
If powerpc -m32 -mlong-double-128 -mabi=ibmlongdouble support is not in
GCC 4.1, the new long double ABI will not be in glibc 2.4 for powerpc(32).
Since the GCC maintainers for these platforms told me that GCC 4.1 would
have it, we have already started building glibc using the new support.

glibc has nothing to do with libstdc++ and does not mandate any changes to
it.  Since glibc can support -mlong-double-128, we can expect users will
want libstdc++ to support it as well, with compatibility for old binaries
and for new compiles using either -mlong-double-64 or -mlong-double-128, as
glibc has.  As I understand it, the libstdc++ maintainers decided it was
worthwhile to try to support this in GCC 4.1 for the benefit of users on
platforms where -mlong-double-128 is available.

On no platform does glibc force GCC to change its default to -mlong-double-128.
The glibc build itself passes -mlong-double-128, so it can be compiled with
older GCCs on most platforms.  A glibc 2.4 installation will work for
a compiler that defaults to -mlong-double-128 or one that defaults to
-mlong-double-64.  It is up to the GCC maintainers to decide what the
default is for each platform.  As I understand it, the maintainers for
{s390*,powerpc*,sparc*,alpha}-*-linux* configurations decided that making
the default -mlong-double-128 in GCC 4.1 would be beneficial to users.
That decision certainliy does require that the libstdc++ compatibility work
be finished in the 4.1 release.  But glibc does not make this requirement.


Thanks,
Roland


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