* [BACKPORT] Apply fix for PR libgcc/97643 to gcc 10 branch
@ 2021-01-20 23:38 Michael Meissner
2021-01-21 0:46 ` Segher Boessenkool
0 siblings, 1 reply; 4+ messages in thread
From: Michael Meissner @ 2021-01-20 23:38 UTC (permalink / raw)
To: gcc-patches, Michael Meissner, Segher Boessenkool,
David Edelsohn, Bill Schmidt, Peter Bergner
PowerPC: Backport fix for libgcc long double support.
This patch takes the fix that was applied to the trunk on December 3rd, and it
applies it to the GCC 10 branch.
I have verified it by building compilers configured for both normal 128-bit IBM
long double and 64-bit long double with/without the patch. I did make check
and the results were the expected results comparing 128-bit long double to
64-bit long double.
With the patch installed, the test case provided will build and run cleanly
with compilers configured for either 128-bit IBM long double or 64-bit long
double without error.
Without the patch installed, the linker complains about mixing long double
types.
Here is the test case.
#include <stdio.h>
#include <stdint.h>
int
main()
{
long double a = 2.0;
__int128 b = 8;
printf("sizeof(long double) = %ld\n", sizeof(long double));
printf("a * b = %Lf\n", a * (long double) b);
return 0;
}
Can I apply this patch to the gcc-10-branch and close out PR 97543?
libgcc/
2021-01-20 Michael Meissner <meissner@linux.ibm.com>
PR libgcc/97543, PR libgcc/97643
Backport from trunk.
2020-12-03 Michael Meissner <meissner@linux.ibm.com>
* config/rs6000/t-linux (IBM128_STATIC_OBJS): New make variable.
(IBM128_SHARED_OBJS): New make variable.
(IBM128_OBJS): New make variable. Set all objects to use the
explicit IBM format, and disable gnu attributes.
(IBM128_CFLAGS): New make variable.
(gcc_s_compile): Add -mno-gnu-attribute to all shared library
modules.
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BACKPORT] Apply fix for PR libgcc/97643 to gcc 10 branch
2021-01-20 23:38 [BACKPORT] Apply fix for PR libgcc/97643 to gcc 10 branch Michael Meissner
@ 2021-01-21 0:46 ` Segher Boessenkool
2021-01-21 1:28 ` Michael Meissner
0 siblings, 1 reply; 4+ messages in thread
From: Segher Boessenkool @ 2021-01-21 0:46 UTC (permalink / raw)
To: Michael Meissner, gcc-patches, David Edelsohn, Bill Schmidt,
Peter Bergner
On Wed, Jan 20, 2021 at 06:38:37PM -0500, Michael Meissner wrote:
> This patch takes the fix that was applied to the trunk on December 3rd, and it
> applies it to the GCC 10 branch.
> PR libgcc/97543, PR libgcc/97643
> Backport from trunk.
>
> 2020-12-03 Michael Meissner <meissner@linux.ibm.com>
>
> * config/rs6000/t-linux (IBM128_STATIC_OBJS): New make variable.
> (IBM128_SHARED_OBJS): New make variable.
> (IBM128_OBJS): New make variable. Set all objects to use the
> explicit IBM format, and disable gnu attributes.
> (IBM128_CFLAGS): New make variable.
> (gcc_s_compile): Add -mno-gnu-attribute to all shared library
> modules.
Okay for 10. Thanks!
Is there a reason we do not have that testcase in the testsuite, btw?
Segher
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BACKPORT] Apply fix for PR libgcc/97643 to gcc 10 branch
2021-01-21 0:46 ` Segher Boessenkool
@ 2021-01-21 1:28 ` Michael Meissner
2021-01-21 21:38 ` Segher Boessenkool
0 siblings, 1 reply; 4+ messages in thread
From: Michael Meissner @ 2021-01-21 1:28 UTC (permalink / raw)
To: Segher Boessenkool
Cc: Michael Meissner, gcc-patches, David Edelsohn, Bill Schmidt,
Peter Bergner
On Wed, Jan 20, 2021 at 06:46:14PM -0600, Segher Boessenkool wrote:
> On Wed, Jan 20, 2021 at 06:38:37PM -0500, Michael Meissner wrote:
> > This patch takes the fix that was applied to the trunk on December 3rd, and it
> > applies it to the GCC 10 branch.
>
> > PR libgcc/97543, PR libgcc/97643
> > Backport from trunk.
> >
> > 2020-12-03 Michael Meissner <meissner@linux.ibm.com>
> >
> > * config/rs6000/t-linux (IBM128_STATIC_OBJS): New make variable.
> > (IBM128_SHARED_OBJS): New make variable.
> > (IBM128_OBJS): New make variable. Set all objects to use the
> > explicit IBM format, and disable gnu attributes.
> > (IBM128_CFLAGS): New make variable.
> > (gcc_s_compile): Add -mno-gnu-attribute to all shared library
> > modules.
>
> Okay for 10. Thanks!
>
> Is there a reason we do not have that testcase in the testsuite, btw?
In order to test it you need to build a compiler + toolchain where the default
long double is 64-bits. So it is kind of hard to put in a test for it, since
it was a bug in how libgcc was built with a compiler that defaults to 64-bit
long double.
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BACKPORT] Apply fix for PR libgcc/97643 to gcc 10 branch
2021-01-21 1:28 ` Michael Meissner
@ 2021-01-21 21:38 ` Segher Boessenkool
0 siblings, 0 replies; 4+ messages in thread
From: Segher Boessenkool @ 2021-01-21 21:38 UTC (permalink / raw)
To: Michael Meissner, gcc-patches, David Edelsohn, Bill Schmidt,
Peter Bergner
On Wed, Jan 20, 2021 at 08:28:57PM -0500, Michael Meissner wrote:
> On Wed, Jan 20, 2021 at 06:46:14PM -0600, Segher Boessenkool wrote:
> > Is there a reason we do not have that testcase in the testsuite, btw?
>
> In order to test it you need to build a compiler + toolchain where the default
> long double is 64-bits. So it is kind of hard to put in a test for it, since
> it was a bug in how libgcc was built with a compiler that defaults to 64-bit
> long double.
Ah, libgcc, that's what I was missing. Thanks!
(Btw, in that testcase, it should use %zd for printing sizeof, not %ld.
Well maybe that is the same for all configs this test is run on, but
heh.)
Segher
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-21 21:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 23:38 [BACKPORT] Apply fix for PR libgcc/97643 to gcc 10 branch Michael Meissner
2021-01-21 0:46 ` Segher Boessenkool
2021-01-21 1:28 ` Michael Meissner
2021-01-21 21:38 ` Segher Boessenkool
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).