public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [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

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).