On Wed, Sep 09, 2020 at 07:41:02PM +0200, Jakub Jelinek wrote: > On Wed, Sep 09, 2020 at 12:32:22PM -0500, Segher Boessenkool wrote: > > On Wed, Sep 09, 2020 at 07:06:41PM +0200, Thomas Koenig wrote: > > > Am 09.09.20 um 17:36 schrieb Segher Boessenkool: > > > >You can use both __ibm128 and __ieee128 in one program, so it isn't an > > > >ABI change. Only the default of what "long double" means changes. And > > > >we have been there before, there is the "e" mangling as well... > > > > > > For Fortran, it is an ABI change unless we define an additional KIND > > > number for __ieee128. > > > > Yes, Fortran has existing problems here (now *already*). > > Well, the Fortran kind case is the same thing as the change of the meaning > of long double from __ibm128 to __ieee128. > Neither C nor Fortran has special mangling for that, so for those languages > it is a real ABI change, for C++ it is an ABI change too, but one that can > be dealt for selected libraries through mangling and compiling stuff that > refers to long double twice (e.g. libstdc++). For glibc I guess it can be > dealt with using asm redirects of the math functions.
My point is that you already have *both* __ibm128 and __ieee128, and you can have them in one source file even, and that just works. In C. Which of those some configuration uses by default matters a lot for libs that use long double of course, but there is an ELF attribute for that, so problems are not hard to spot usually. But for Fortran this still does not work at all. Segher