public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Thomas Koenig <tkoenig@netcologne.de>
Cc: Michael Meissner <meissner@linux.ibm.com>,
	Segher Boessenkool <segher@kernel.crashing.org>,
	"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
	Peter Bergner <bergner@linux.ibm.com>,
	gcc-patches@gcc.gnu.org, Bill Schmidt <wschmidt@linux.ibm.com>,
	David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [power-ieee128] RFH: LTO broken
Date: Fri, 7 Jan 2022 12:29:23 +0100	[thread overview]
Message-ID: <20220107112923.GJ2646553@tucnak> (raw)
In-Reply-To: <c4996e62-4f2a-ad17-6fa9-29410166e91e@netcologne.de>

On Thu, Jan 06, 2022 at 09:01:54PM +0100, Thomas Koenig wrote:
> 
> On 06.01.22 06:00, Michael Meissner via Fortran wrote:
> > I pushed the patch to the branch.
> 
> Test results are looking quite good right now.

I've just tried to build libgfortran on an old glibc system
(gcc112.fsffrance.org) and unfortunately we still have work to do:

[jakub@gcc2-power8 obj38]$ LD_PRELOAD=/home/jakub/gcc/obj38/powerpc64le-unknown-linux-gnu/libgfortran/.libs/libgfortran.so.5.0.0 /bin/true
[jakub@gcc2-power8 obj38]$ LD_BIND_NOW=1 LD_PRELOAD=/home/jakub/gcc/obj38/powerpc64le-unknown-linux-gnu/libgfortran/.libs/libgfortran.so.5.0.0 /bin/true
/bin/true: symbol lookup error: /home/jakub/gcc/obj38/powerpc64le-unknown-linux-gnu/libgfortran/.libs/libgfortran.so.5.0.0: undefined symbol: __atan2ieee128

While we do use some libquadmath APIs:
readelf -Wr /home/jakub/gcc/obj38/powerpc64le-unknown-linux-gnu/libgfortran/.libs/libgfortran.so.5.0.0 | grep QUADMATH
0000000000251268  000005e400000026 R_PPC64_ADDR64         0000000000000000 quadmath_snprintf@QUADMATH_1.0 + 0
0000000000251270  0000030600000026 R_PPC64_ADDR64         0000000000000000 strtoflt128@QUADMATH_1.0 + 0
00000000002502e0  0000011600000015 R_PPC64_JMP_SLOT       0000000000000000 ynq@QUADMATH_1.0 + 0
0000000000250390  0000016000000015 R_PPC64_JMP_SLOT       0000000000000000 sqrtq@QUADMATH_1.0 + 0
0000000000250508  000001fa00000015 R_PPC64_JMP_SLOT       0000000000000000 fmaq@QUADMATH_1.0 + 0
0000000000250530  0000021200000015 R_PPC64_JMP_SLOT       0000000000000000 fabsq@QUADMATH_1.0 + 0
0000000000250760  0000030600000015 R_PPC64_JMP_SLOT       0000000000000000 strtoflt128@QUADMATH_1.0 + 0
0000000000250990  000003df00000015 R_PPC64_JMP_SLOT       0000000000000000 cosq@QUADMATH_1.0 + 0
00000000002509f0  0000040a00000015 R_PPC64_JMP_SLOT       0000000000000000 expq@QUADMATH_1.0 + 0
0000000000250a88  0000045100000015 R_PPC64_JMP_SLOT       0000000000000000 erfcq@QUADMATH_1.0 + 0
0000000000250a98  0000045e00000015 R_PPC64_JMP_SLOT       0000000000000000 jnq@QUADMATH_1.0 + 0
0000000000250ac8  0000047e00000015 R_PPC64_JMP_SLOT       0000000000000000 sinq@QUADMATH_1.0 + 0
0000000000250e38  000005db00000015 R_PPC64_JMP_SLOT       0000000000000000 fmodq@QUADMATH_1.0 + 0
0000000000250e48  000005e000000015 R_PPC64_JMP_SLOT       0000000000000000 tanq@QUADMATH_1.0 + 0
0000000000250e58  000005e400000015 R_PPC64_JMP_SLOT       0000000000000000 quadmath_snprintf@QUADMATH_1.0 + 0
0000000000250f20  0000062900000015 R_PPC64_JMP_SLOT       0000000000000000 copysignq@QUADMATH_1.0 + 0
we don't do it consistently:
readelf -Wr /home/jakub/gcc/obj38/powerpc64le-unknown-linux-gnu/libgfortran/.libs/libgfortran.so.5.0.0 | grep ieee128
0000000000250310  0000012800000015 R_PPC64_JMP_SLOT       0000000000000000 __atan2ieee128 + 0
0000000000250340  0000014200000015 R_PPC64_JMP_SLOT       0000000000000000 __clogieee128 + 0
0000000000250438  000001a300000015 R_PPC64_JMP_SLOT       0000000000000000 __acoshieee128 + 0
00000000002504b8  000001cc00000015 R_PPC64_JMP_SLOT       0000000000000000 __csinieee128 + 0
0000000000250500  000001f300000015 R_PPC64_JMP_SLOT       0000000000000000 __sinhieee128 + 0
0000000000250570  0000022a00000015 R_PPC64_JMP_SLOT       0000000000000000 __asinieee128 + 0
0000000000250580  0000022d00000015 R_PPC64_JMP_SLOT       0000000000000000 __roundieee128 + 0
00000000002505a0  0000023e00000015 R_PPC64_JMP_SLOT       0000000000000000 __logieee128 + 0
00000000002505c8  0000024900000015 R_PPC64_JMP_SLOT       0000000000000000 __tanieee128 + 0
0000000000250630  0000027500000015 R_PPC64_JMP_SLOT       0000000000000000 __ccosieee128 + 0
0000000000250670  0000028a00000015 R_PPC64_JMP_SLOT       0000000000000000 __log10ieee128 + 0
00000000002506c8  000002bd00000015 R_PPC64_JMP_SLOT       0000000000000000 __cexpieee128 + 0
00000000002506d8  000002c800000015 R_PPC64_JMP_SLOT       0000000000000000 __coshieee128 + 0
00000000002509b0  000003ef00000015 R_PPC64_JMP_SLOT       0000000000000000 __truncieee128 + 0
0000000000250af8  000004a600000015 R_PPC64_JMP_SLOT       0000000000000000 __expieee128 + 0
0000000000250b50  000004c600000015 R_PPC64_JMP_SLOT       0000000000000000 __fmodieee128 + 0
0000000000250bb0  000004e700000015 R_PPC64_JMP_SLOT       0000000000000000 __tanhieee128 + 0
0000000000250c38  0000051300000015 R_PPC64_JMP_SLOT       0000000000000000 __acosieee128 + 0
0000000000250ce0  0000055400000015 R_PPC64_JMP_SLOT       0000000000000000 __sinieee128 + 0
0000000000250d60  0000057e00000015 R_PPC64_JMP_SLOT       0000000000000000 __atanieee128 + 0
0000000000250dd8  000005b100000015 R_PPC64_JMP_SLOT       0000000000000000 __sqrtieee128 + 0
0000000000250e98  0000060200000015 R_PPC64_JMP_SLOT       0000000000000000 __cosieee128 + 0
0000000000250eb0  0000060a00000015 R_PPC64_JMP_SLOT       0000000000000000 __atanhieee128 + 0
0000000000250ef0  0000062000000015 R_PPC64_JMP_SLOT       0000000000000000 __asinhieee128 + 0
0000000000250fd8  0000067f00000015 R_PPC64_JMP_SLOT       0000000000000000 __csqrtieee128 + 0
0000000000251038  000006ad00000015 R_PPC64_JMP_SLOT       0000000000000000 __cabsieee128 + 0
All these should for POWER_IEEE128 use atan2q@QUADMATH_1.0 etc.

On the other side, on glibc 2.32+ build, we still use some libquadmath APIs
when we shouldn't:
readelf -Wr /home/jakub/gcc/obj/powerpc64le-unknown-linux-gnu/libgfortran/.libs/libgfortran.so.5 | grep QUADMATH
00000000002502c8  0000002600000015 R_PPC64_JMP_SLOT       0000000000000000 fmaq@QUADMATH_1.0 + 0
00000000002505f8  0000006700000015 R_PPC64_JMP_SLOT       0000000000000000 tanq@QUADMATH_1.0 + 0
0000000000250930  0000009b00000015 R_PPC64_JMP_SLOT       0000000000000000 fabsq@QUADMATH_1.0 + 0
0000000000250940  0000009d00000015 R_PPC64_JMP_SLOT       0000000000000000 sinq@QUADMATH_1.0 + 0
0000000000250c98  000000cf00000015 R_PPC64_JMP_SLOT       0000000000000000 copysignq@QUADMATH_1.0 + 0
0000000000251038  0000010700000015 R_PPC64_JMP_SLOT       0000000000000000 cosq@QUADMATH_1.0 + 0
0000000000251068  0000010a00000015 R_PPC64_JMP_SLOT       0000000000000000 fmodq@QUADMATH_1.0 + 0
These should use __fmaieee128, __tanieee128 etc. instead.

	Jakub


  parent reply	other threads:[~2022-01-07 11:29 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-03 15:36 [power-ieee128] libgfortran: -mabi=ieeelongdouble I/O Jakub Jelinek
2022-01-03 16:26 ` Jakub Jelinek
2022-01-03 17:03   ` Thomas Koenig
2022-01-03 20:00     ` [power-ieee128] libgfortran, fortran: " Jakub Jelinek
2022-01-03 22:43       ` Thomas Koenig
2022-01-04 11:07         ` [power-ieee128] RFH: LTO broken Jakub Jelinek
2022-01-04 13:41           ` [power-ieee128] libgfortran: -mabi=ieeelongdouble I/O fix Jakub Jelinek
2022-01-04 14:35             ` Thomas Koenig
2022-01-06  2:48           ` [power-ieee128] RFH: LTO broken Michael Meissner
2022-01-06  4:17           ` Michael Meissner
2022-01-06  5:00           ` Michael Meissner
2022-01-06 20:01             ` Thomas Koenig
2022-01-06 20:10               ` Jakub Jelinek
2022-01-07  9:22               ` [power-ieee128] OPEN CONV Jakub Jelinek
2022-01-07 10:26                 ` Thomas Koenig
2022-01-07 19:52                   ` Jakub Jelinek
2022-01-07 21:40                     ` Thomas Koenig
2022-01-07 21:48                       ` Jakub Jelinek
2022-01-08 10:07                         ` Thomas Koenig
2022-01-08 11:00                           ` Jakub Jelinek
2022-01-08 11:10                             ` Jakub Jelinek
2022-01-08 14:02                               ` Jakub Jelinek
2022-01-08 14:13                                 ` Thomas Koenig
2022-01-08 14:18                                   ` Jakub Jelinek
2022-01-08 18:59                                     ` Michael Meissner
2022-01-08 19:15                                       ` David Edelsohn
2022-01-08 19:37                                         ` Michael Meissner
2022-01-07 11:29               ` Jakub Jelinek [this message]
2022-01-07 13:31                 ` [power-ieee128] RFH: LTO broken Jakub Jelinek
2022-01-07 14:25                   ` Thomas Koenig
2022-01-07 16:46                     ` Jakub Jelinek
2022-01-07 21:33                       ` Thomas Koenig
2022-01-03 16:48 ` [power-ieee128] libgfortran: -mabi=ieeelongdouble I/O Thomas Koenig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220107112923.GJ2646553@tucnak \
    --to=jakub@redhat.com \
    --cc=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=meissner@linux.ibm.com \
    --cc=segher@kernel.crashing.org \
    --cc=tkoenig@netcologne.de \
    --cc=wschmidt@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).