Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 882815 - transition ppc64le 23.0 profiles to 128-bit IEEE long double ABI
Summary: transition ppc64le 23.0 profiles to 128-bit IEEE long double ABI
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Profiles (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PPC Porters
URL:
Whiteboard:
Keywords: PullRequest
Depends on: profile-23.0 884395 883787
Blocks: 892183 913348
  Show dependency tree
 
Reported: 2022-11-24 21:16 UTC by Georgy Yakovlev
Modified: 2024-04-10 03:49 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Georgy Yakovlev archtester gentoo-dev 2022-11-24 21:16:41 UTC
$subj

 would like to switch ppc64le profiles to 128-bit IEEE long double ABI
23.0 seems like a good cause to finally tackle it.
This will need some toolchain magic, I will open a bug and block
profile-23.0 tracker.
Fedora finally switched recently
https://fedoraproject.org/wiki/Changes/PPC64LE_Float128_Transition

I tried the switch about a year ago and ran into some trouble with
projects that bundle gnulib.
Comment 1 Georgy Yakovlev archtester gentoo-dev 2022-11-30 21:26:40 UTC
comparison of 

cc -E -dM - < /dev/null | grep -P 'LDBL|FLT128' | sort

output from both different toolchains

#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128
 #define __FLT128_MIN_EXP__ (-16381)
 #define __FLT128_NORM_MAX__ 1.18973149535723176508575932662800702e+4932F128
-#define __LDBL_DECIMAL_DIG__ 33
-#define __LDBL_DENORM_MIN__ 4.94065645841246544176568792868221372e-324L
-#define __LDBL_DIG__ 31
-#define __LDBL_EPSILON__ 4.94065645841246544176568792868221372e-324L
+#define __LDBL_DECIMAL_DIG__ 36
+#define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L
+#define __LDBL_DIG__ 33
+#define __LDBL_EPSILON__ 1.92592994438723585305597794258492732e-34L
 #define __LDBL_HAS_DENORM__ 1
 #define __LDBL_HAS_INFINITY__ 1
 #define __LDBL_HAS_QUIET_NAN__ 1
-#define __LDBL_IS_IEC_60559__ 0
-#define __LDBL_MANT_DIG__ 106
-#define __LDBL_MAX_10_EXP__ 308
-#define __LDBL_MAX__ 1.79769313486231580793728971405301199e+308L
-#define __LDBL_MAX_EXP__ 1024
-#define __LDBL_MIN_10_EXP__ (-291)
-#define __LDBL_MIN__ 2.00416836000897277799610805135016205e-292L
-#define __LDBL_MIN_EXP__ (-968)
-#define __LDBL_NORM_MAX__ 8.98846567431157953864652595394501288e+307L
+#define __LDBL_IS_IEC_60559__ 2
+#define __LDBL_MANT_DIG__ 113
+#define __LDBL_MAX_10_EXP__ 4932
+#define __LDBL_MAX__ 1.18973149535723176508575932662800702e+4932L
+#define __LDBL_MAX_EXP__ 16384
+#define __LDBL_MIN_10_EXP__ (-4931)
+#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
+#define __LDBL_MIN_EXP__ (-16381)
+#define __LDBL_NORM_MAX__ 1.18973149535723176508575932662800702e+4932L
Comment 2 Georgy Yakovlev archtester gentoo-dev 2022-11-30 23:26:34 UTC
so I did emerge @system on stable-toolchain-unstable-rest(gcc11 glibc2.36 binutils2.38) system and everything looks good, certainly ok to be an exp profile soon-ish as soon as we have 23.0 feature.

on gcc/glibc  system clang uses whatever comes from stdc++/glibc as is.

idk bout gcc-less system ( we don't have one for ppc64le ) and how clang/libcxx decides default float abi.
Comment 3 Larry the Git Cow gentoo-dev 2022-12-04 22:21:16 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f455b0a971d5e43fb787b9e8bc7565fce3f8ff71

commit f455b0a971d5e43fb787b9e8bc7565fce3f8ff71
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2022-12-01 20:08:18 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2022-12-04 22:21:06 +0000

    profiles/arch/base: mask gcc[ieee-long-double]
    
    We will unmask it on relevant ppc64le profiles once ready.
    
    Bug: https://bugs.gentoo.org/882815
    Closes: https://github.com/gentoo/gentoo/pull/28419
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 profiles/arch/base/package.use.mask | 4 ++++
 1 file changed, 4 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc0ab18a5714c4867f7cd42631b44f541d9f4aa1

commit bc0ab18a5714c4867f7cd42631b44f541d9f4aa1
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2022-11-30 18:23:39 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2022-12-04 22:20:45 +0000

    eclass/toolchain.eclass: add USE=ieee-long-double for sys-devel/gcc
    
    Bug: https://bugs.gentoo.org/882815
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 eclass/toolchain.eclass    | 8 ++++++++
 sys-devel/gcc/metadata.xml | 1 +
 2 files changed, 9 insertions(+)
Comment 4 Larry the Git Cow gentoo-dev 2022-12-05 02:53:12 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e7ad4c5dcfebc081ba4c7c22530dc5a88b6d1c4

commit 0e7ad4c5dcfebc081ba4c7c22530dc5a88b6d1c4
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2022-12-04 22:42:36 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2022-12-05 02:52:53 +0000

    profiles: activate ppc64le ieee-long-double profile as exp
    
    Bug: https://bugs.gentoo.org/882815
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 profiles/profiles.desc | 1 +
 1 file changed, 1 insertion(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f796db65fef1a85ba76361cd7c622245d981552d

commit f796db65fef1a85ba76361cd7c622245d981552d
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2022-12-04 22:32:07 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2022-12-05 02:52:52 +0000

    profiles/default/linux/ppc64le/17.0/ieee-long-double: add exp profile
    
    Bug: https://bugs.gentoo.org/882815
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 profiles/default/linux/ppc64le/17.0/ieee-long-double/eapi     |  1 +
 .../ppc64le/17.0/ieee-long-double/package.accept_keywords     |  6 ++++++
 .../default/linux/ppc64le/17.0/ieee-long-double/package.mask  |  6 ++++++
 .../linux/ppc64le/17.0/ieee-long-double/package.use.force     |  6 ++++++
 .../linux/ppc64le/17.0/ieee-long-double/package.use.mask      |  6 ++++++
 profiles/default/linux/ppc64le/17.0/ieee-long-double/parent   |  1 +
 .../linux/ppc64le/17.0/ieee-long-double/profile.bashrc        | 11 +++++++++++
 7 files changed, 37 insertions(+)
Comment 5 Georgy Yakovlev archtester gentoo-dev 2022-12-05 22:51:53 UTC
https://gcc.gnu.org/wiki/Ieee128PowerPC#Transition

on why we keep BE unchanged.
Comment 6 Georgy Yakovlev archtester gentoo-dev 2022-12-06 05:21:38 UTC
Another reason is that ieee-long-double requires vsx, which is power7 and later. So anything below and old ppc64 g5 macs are out.
Comment 7 Larry the Git Cow gentoo-dev 2022-12-20 23:46:53 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77753c90d1c507dae569c77d1ed9d076cf7a9f21

commit 77753c90d1c507dae569c77d1ed9d076cf7a9f21
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2022-12-05 21:24:38 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2022-12-20 23:46:43 +0000

    profiles: mask/unmask ieee-long-double for clang-common
    
    Bug: https://bugs.gentoo.org/882815
    Bug: https://bugs.gentoo.org/884395
    Closes: https://github.com/gentoo/gentoo/pull/28557
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 profiles/arch/base/package.use.mask                                    | 1 +
 profiles/default/linux/ppc64le/17.0/ieee-long-double/package.mask      | 3 ++-
 profiles/default/linux/ppc64le/17.0/ieee-long-double/package.use.force | 1 +
 profiles/default/linux/ppc64le/17.0/ieee-long-double/package.use.mask  | 3 ++-
 4 files changed, 6 insertions(+), 2 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef7ca111bcbd847596c782a2ea742d37b9769c4b

commit ef7ca111bcbd847596c782a2ea742d37b9769c4b
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2022-12-05 21:13:18 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2022-12-20 23:46:37 +0000

    sys-devel/clang-common: add USE=ieee-long-double
    
    Bug: https://bugs.gentoo.org/882815
    Bug: https://bugs.gentoo.org/884395
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 sys-devel/clang-common/clang-common-15.0.5.ebuild         | 15 ++++++++++++++-
 sys-devel/clang-common/clang-common-15.0.6.9999.ebuild    | 15 ++++++++++++++-
 sys-devel/clang-common/clang-common-15.0.6.ebuild         | 15 ++++++++++++++-
 sys-devel/clang-common/clang-common-16.0.0.9999.ebuild    | 15 ++++++++++++++-
 .../clang-common/clang-common-16.0.0_pre20221210.ebuild   | 15 ++++++++++++++-
 .../clang-common/clang-common-16.0.0_pre20221217.ebuild   | 15 ++++++++++++++-
 sys-devel/clang-common/metadata.xml                       |  1 +
 7 files changed, 85 insertions(+), 6 deletions(-)
Comment 8 Larry the Git Cow gentoo-dev 2022-12-23 07:35:34 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccc3749f8456e58b34630578ac0e83ec90c78ae4

commit ccc3749f8456e58b34630578ac0e83ec90c78ae4
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2022-12-23 06:30:00 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2022-12-23 07:35:05 +0000

    sys-devel/clang: don't gate ieee-long-double behind USE=ppc64
    
    in case someone does cross and wants to switch ppc64 target to use that.
    
    Bug: https://bugs.gentoo.org/882815
    Closes: https://github.com/gentoo/gentoo/pull/28767
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 sys-devel/clang/clang-15.0.5.ebuild             | 2 +-
 sys-devel/clang/clang-15.0.6.9999.ebuild        | 2 +-
 sys-devel/clang/clang-15.0.6.ebuild             | 2 +-
 sys-devel/clang/clang-16.0.0.9999.ebuild        | 2 +-
 sys-devel/clang/clang-16.0.0_pre20221210.ebuild | 2 +-
 sys-devel/clang/clang-16.0.0_pre20221217.ebuild | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f40e7badad839624fa6aa09cef3b812acbfd117

commit 6f40e7badad839624fa6aa09cef3b812acbfd117
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2022-12-22 21:44:52 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2022-12-23 07:34:58 +0000

    profiles: adjust ieee-long-double masks
    
    Bug: https://bugs.gentoo.org/882815
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 profiles/arch/base/package.use.mask                                    | 2 +-
 profiles/default/linux/ppc64le/17.0/ieee-long-double/package.mask      | 2 +-
 profiles/default/linux/ppc64le/17.0/ieee-long-double/package.use.force | 2 +-
 profiles/default/linux/ppc64le/17.0/ieee-long-double/package.use.mask  | 2 +-
 profiles/default/linux/ppc64le/17.0/ieee-long-double/profile.bashrc    | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dab01421273fa163ba4fe76e21d8be521cd9bd66

commit dab01421273fa163ba4fe76e21d8be521cd9bd66
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2022-12-22 21:40:56 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2022-12-23 07:34:53 +0000

    sys-devel/clang-common: remove USE=ieee-long-double
    
    Bug: https://bugs.gentoo.org/882815
    This reverts commit ef7ca111bcbd847596c782a2ea742d37b9769c4b.
    
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 sys-devel/clang-common/clang-common-15.0.5.ebuild         | 15 +--------------
 sys-devel/clang-common/clang-common-15.0.6.9999.ebuild    | 15 +--------------
 sys-devel/clang-common/clang-common-15.0.6.ebuild         | 15 +--------------
 sys-devel/clang-common/clang-common-16.0.0.9999.ebuild    | 15 +--------------
 .../clang-common/clang-common-16.0.0_pre20221210.ebuild   | 15 +--------------
 .../clang-common/clang-common-16.0.0_pre20221217.ebuild   | 15 +--------------
 sys-devel/clang-common/metadata.xml                       |  1 -
 7 files changed, 6 insertions(+), 85 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=daab33b031374ffb8524e5d61ad754bae258aee9

commit daab33b031374ffb8524e5d61ad754bae258aee9
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2022-12-22 21:40:06 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2022-12-23 07:33:49 +0000

    sys-devel/clang: add USE=ieee-long-double for ppc64le
    
    Forcing it via clang-common was wrong as -mabi=ieeelongdouble switch
    confused several build systems, including firefox and some rust apps.
    Instead, we switch it on compiler level, like gcc and like fedora does
    (who already migrated to ieee long double)
    
    For example, libcxx doesn't support -mabi=ibmlongdouble if the default
    is -mabi=ieeelongdouble and vice versa.
    
    So if clang is configured with ibmlongdouble default, passing
    ieeelongdouble will simply print a warning and ignore the switch in some
    cases.
    
    https://src.fedoraproject.org/rpms/clang/c/54612cbb684f201ff16961595332405cb5ab50d0?branch=rawhide
    https://bugzilla.redhat.com/show_bug.cgi?id=2136099
    https://reviews.llvm.org/D136258
    
    Bug: https://bugs.gentoo.org/882815
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 sys-devel/clang/clang-15.0.5.ebuild             | 9 ++++++++-
 sys-devel/clang/clang-15.0.6.9999.ebuild        | 9 ++++++++-
 sys-devel/clang/clang-15.0.6.ebuild             | 9 ++++++++-
 sys-devel/clang/clang-16.0.0.9999.ebuild        | 9 ++++++++-
 sys-devel/clang/clang-16.0.0_pre20221210.ebuild | 9 ++++++++-
 sys-devel/clang/clang-16.0.0_pre20221217.ebuild | 9 ++++++++-
 sys-devel/clang/metadata.xml                    | 1 +
 7 files changed, 49 insertions(+), 6 deletions(-)
Comment 9 darkbasic 2023-08-30 16:40:33 UTC
Is there any ETA for this? Google dropped support for ppc64le out of their SSL libraries and I suspect this is preventing Chromium >= 115 to compile. How can I enable it so I can try if it helps?
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-30 18:05:00 UTC
(In reply to darkbasic from comment #9)
> Is there any ETA for this? Google dropped support for ppc64le out of their
> SSL libraries and I suspect this is preventing Chromium >= 115 to compile.
> How can I enable it so I can try if it helps?

No, gyakovlev is away and nobody else is working on it right now.

You can switch profiles if you want to try it but if they dropped support entirely for ppc64le from boringssl, I don't see this helping.

I suggest filing a bug with the details so we can at least look at it - probably one with the raptor people too and see what they say if they don't know already.
Comment 11 darkbasic 2023-08-30 18:59:28 UTC
It might help because raptor is still maintaining boringssl ppc64le support in their patchset. They only test it in Debian (which AFAIK uses ieee-long-double) and they suspect the issue might relate to something in the compiler around 128 bit types. I guess a proper bug report is due at this point.
Comment 12 Andreas K. Hüttel archtester gentoo-dev 2024-04-10 03:49:52 UTC
This is fixed in the 23.0 profiles (available and stable now). Closing.