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 2fdf615be8185..ee4c708e9f3c9 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 3e43f51a0aab5..748263e37efa0 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 e681aa13cd6da..ed38534ff2894 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 e9669ee1adcc4..efd64f57046cc 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 0df5a88a9a098..e8dbca1bdc0f4 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 0df5a88a9a098..e8dbca1bdc0f4 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 7ea033c083c9c..8eb8b3420e8e7 100644 --- a/sys-devel/clang-common/metadata.xml +++ b/sys-devel/clang-common/metadata.xml @@ -11,6 +11,7 @@ Use compiler-rt + libunwind instead of libgcc as the default rtlib for clang Use libc++ instead of libstdc++ as the default stdlib for clang Use lld as the default linker for clang + Use accelerated 128-bit IEEE long double ABI (ppc64le only) Default to stricter behavior known from newer clang versions, turning more warnings into errors