commit: ef7ca111bcbd847596c782a2ea742d37b9769c4b Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> AuthorDate: Mon Dec 5 21:13:18 2022 +0000 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> CommitDate: Tue Dec 20 23:46:37 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef7ca111
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 <AT> 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(-) diff --git a/sys-devel/clang-common/clang-common-15.0.5.ebuild b/sys-devel/clang-common/clang-common-15.0.5.ebuild index 2fdf615be818..ee4c708e9f3c 100644 --- a/sys-devel/clang-common/clang-common-15.0.5.ebuild +++ b/sys-devel/clang-common/clang-common-15.0.5.ebuild @@ -12,7 +12,7 @@ LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~ppc-macos ~x64-macos" IUSE=" - default-compiler-rt default-libcxx default-lld llvm-libunwind + default-compiler-rt default-libcxx default-lld ieee-long-double llvm-libunwind stricter " @@ -88,6 +88,19 @@ src_install() { @gentoo-gcc-install.cfg EOF + # needed until https://reviews.llvm.org/D117181#3266224 is done. + # silently drop support on musl even if enabled, it does not support it. + if use ppc64 && use ieee-long-double && ! use elibc_musl; then + newins - gentoo-ppc64le-ieeelongdouble.cfg <<-EOF + # This file forces 128bit long double on ppc64le systems. + -mabi=ieeelongdouble + EOF + + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + @gentoo-ppc64le-ieeelongdouble.cfg + EOF + fi + if use stricter; then newins - gentoo-stricter.cfg <<-EOF # This file increases the strictness of older clang versions diff --git a/sys-devel/clang-common/clang-common-15.0.6.9999.ebuild b/sys-devel/clang-common/clang-common-15.0.6.9999.ebuild index 3e43f51a0aab..748263e37efa 100644 --- a/sys-devel/clang-common/clang-common-15.0.6.9999.ebuild +++ b/sys-devel/clang-common/clang-common-15.0.6.9999.ebuild @@ -12,7 +12,7 @@ LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" KEYWORDS="" IUSE=" - default-compiler-rt default-libcxx default-lld llvm-libunwind + default-compiler-rt default-libcxx default-lld ieee-long-double llvm-libunwind stricter " @@ -88,6 +88,19 @@ src_install() { @gentoo-gcc-install.cfg EOF + # needed until https://reviews.llvm.org/D117181#3266224 is done. + # silently drop support on musl even if enabled, it does not support it. + if use ppc64 && use ieee-long-double && ! use elibc_musl; then + newins - gentoo-ppc64le-ieeelongdouble.cfg <<-EOF + # This file forces 128bit long double on ppc64le systems. + -mabi=ieeelongdouble + EOF + + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + @gentoo-ppc64le-ieeelongdouble.cfg + EOF + fi + if use stricter; then newins - gentoo-stricter.cfg <<-EOF # This file increases the strictness of older clang versions diff --git a/sys-devel/clang-common/clang-common-15.0.6.ebuild b/sys-devel/clang-common/clang-common-15.0.6.ebuild index e681aa13cd6d..ed38534ff289 100644 --- a/sys-devel/clang-common/clang-common-15.0.6.ebuild +++ b/sys-devel/clang-common/clang-common-15.0.6.ebuild @@ -12,7 +12,7 @@ LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos" IUSE=" - default-compiler-rt default-libcxx default-lld llvm-libunwind + default-compiler-rt default-libcxx default-lld ieee-long-double llvm-libunwind stricter " @@ -88,6 +88,19 @@ src_install() { @gentoo-gcc-install.cfg EOF + # needed until https://reviews.llvm.org/D117181#3266224 is done. + # silently drop support on musl even if enabled, it does not support it. + if use ppc64 && use ieee-long-double && ! use elibc_musl; then + newins - gentoo-ppc64le-ieeelongdouble.cfg <<-EOF + # This file forces 128bit long double on ppc64le systems. + -mabi=ieeelongdouble + EOF + + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + @gentoo-ppc64le-ieeelongdouble.cfg + EOF + fi + if use stricter; then newins - gentoo-stricter.cfg <<-EOF # This file increases the strictness of older clang versions diff --git a/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild index e9669ee1adcc..efd64f57046c 100644 --- a/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild +++ b/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild @@ -12,7 +12,7 @@ LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" KEYWORDS="" IUSE=" - default-compiler-rt default-libcxx default-lld llvm-libunwind + default-compiler-rt default-libcxx default-lld ieee-long-double llvm-libunwind stricter " @@ -88,6 +88,19 @@ src_install() { @gentoo-gcc-install.cfg EOF + # needed until https://reviews.llvm.org/D117181#3266224 is done. + # silently drop support on musl even if enabled, it does not support it. + if use ppc64 && use ieee-long-double && ! use elibc_musl; then + newins - gentoo-ppc64le-ieeelongdouble.cfg <<-EOF + # This file forces 128bit long double on ppc64le systems. + -mabi=ieeelongdouble + EOF + + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + @gentoo-ppc64le-ieeelongdouble.cfg + EOF + fi + if use stricter; then newins - gentoo-stricter.cfg <<-EOF # This file increases the strictness of older clang versions diff --git a/sys-devel/clang-common/clang-common-16.0.0_pre20221210.ebuild b/sys-devel/clang-common/clang-common-16.0.0_pre20221210.ebuild index 0df5a88a9a09..e8dbca1bdc0f 100644 --- a/sys-devel/clang-common/clang-common-16.0.0_pre20221210.ebuild +++ b/sys-devel/clang-common/clang-common-16.0.0_pre20221210.ebuild @@ -12,7 +12,7 @@ LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" KEYWORDS="~loong" IUSE=" - default-compiler-rt default-libcxx default-lld llvm-libunwind + default-compiler-rt default-libcxx default-lld ieee-long-double llvm-libunwind stricter " @@ -88,6 +88,19 @@ src_install() { @gentoo-gcc-install.cfg EOF + # needed until https://reviews.llvm.org/D117181#3266224 is done. + # silently drop support on musl even if enabled, it does not support it. + if use ppc64 && use ieee-long-double && ! use elibc_musl; then + newins - gentoo-ppc64le-ieeelongdouble.cfg <<-EOF + # This file forces 128bit long double on ppc64le systems. + -mabi=ieeelongdouble + EOF + + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + @gentoo-ppc64le-ieeelongdouble.cfg + EOF + fi + if use stricter; then newins - gentoo-stricter.cfg <<-EOF # This file increases the strictness of older clang versions diff --git a/sys-devel/clang-common/clang-common-16.0.0_pre20221217.ebuild b/sys-devel/clang-common/clang-common-16.0.0_pre20221217.ebuild index 0df5a88a9a09..e8dbca1bdc0f 100644 --- a/sys-devel/clang-common/clang-common-16.0.0_pre20221217.ebuild +++ b/sys-devel/clang-common/clang-common-16.0.0_pre20221217.ebuild @@ -12,7 +12,7 @@ LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" SLOT="0" KEYWORDS="~loong" IUSE=" - default-compiler-rt default-libcxx default-lld llvm-libunwind + default-compiler-rt default-libcxx default-lld ieee-long-double llvm-libunwind stricter " @@ -88,6 +88,19 @@ src_install() { @gentoo-gcc-install.cfg EOF + # needed until https://reviews.llvm.org/D117181#3266224 is done. + # silently drop support on musl even if enabled, it does not support it. + if use ppc64 && use ieee-long-double && ! use elibc_musl; then + newins - gentoo-ppc64le-ieeelongdouble.cfg <<-EOF + # This file forces 128bit long double on ppc64le systems. + -mabi=ieeelongdouble + EOF + + cat >> "${ED}/etc/clang/gentoo-common.cfg" <<-EOF || die + @gentoo-ppc64le-ieeelongdouble.cfg + EOF + fi + if use stricter; then newins - gentoo-stricter.cfg <<-EOF # This file increases the strictness of older clang versions diff --git a/sys-devel/clang-common/metadata.xml b/sys-devel/clang-common/metadata.xml index 7ea033c083c9..8eb8b3420e8e 100644 --- a/sys-devel/clang-common/metadata.xml +++ b/sys-devel/clang-common/metadata.xml @@ -11,6 +11,7 @@ <flag name="default-compiler-rt">Use compiler-rt + libunwind instead of libgcc as the default rtlib for clang</flag> <flag name="default-libcxx">Use libc++ instead of libstdc++ as the default stdlib for clang</flag> <flag name="default-lld">Use lld as the default linker for clang</flag> + <flag name="ieee-long-double">Use accelerated 128-bit IEEE long double ABI (ppc64le only)</flag> <flag name="stricter">Default to stricter behavior known from newer clang versions, turning more warnings into errors</flag> </use> </pkgmetadata>
