summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2022-12-22 13:40:06 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2022-12-22 23:33:49 -0800
commitdaab33b031374ffb8524e5d61ad754bae258aee9 (patch)
treeeffd5cfe24f3836ccf66f3ed2b19e96cd988a120 /sys-devel/clang
parentdev-python/meson-python: add 0.12.0 (diff)
downloadgentoo-daab33b031374ffb8524e5d61ad754bae258aee9.tar.gz
gentoo-daab33b031374ffb8524e5d61ad754bae258aee9.tar.bz2
gentoo-daab33b031374ffb8524e5d61ad754bae258aee9.zip
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>
Diffstat (limited to 'sys-devel/clang')
-rw-r--r--sys-devel/clang/clang-15.0.5.ebuild9
-rw-r--r--sys-devel/clang/clang-15.0.6.9999.ebuild9
-rw-r--r--sys-devel/clang/clang-15.0.6.ebuild9
-rw-r--r--sys-devel/clang/clang-16.0.0.9999.ebuild9
-rw-r--r--sys-devel/clang/clang-16.0.0_pre20221210.ebuild9
-rw-r--r--sys-devel/clang/clang-16.0.0_pre20221217.ebuild9
-rw-r--r--sys-devel/clang/metadata.xml1
7 files changed, 49 insertions, 6 deletions
diff --git a/sys-devel/clang/clang-15.0.5.ebuild b/sys-devel/clang/clang-15.0.5.ebuild
index e90165ee18ed..abf45d01b7fb 100644
--- a/sys-devel/clang/clang-15.0.5.ebuild
+++ b/sys-devel/clang/clang-15.0.5.ebuild
@@ -16,7 +16,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x64-macos"
-IUSE="debug doc +extra +pie +static-analyzer test xml"
+IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
@@ -278,6 +278,13 @@ multilib_src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ if use ppc64 && ! use elibc_musl; then
+ mycmakeargs+=(
+ -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double)
+ )
+ fi
+
use test && mycmakeargs+=(
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
-DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit"
diff --git a/sys-devel/clang/clang-15.0.6.9999.ebuild b/sys-devel/clang/clang-15.0.6.9999.ebuild
index 21dce8cc37d2..849f122c66ea 100644
--- a/sys-devel/clang/clang-15.0.6.9999.ebuild
+++ b/sys-devel/clang/clang-15.0.6.9999.ebuild
@@ -16,7 +16,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
KEYWORDS=""
-IUSE="debug doc +extra +pie +static-analyzer test xml"
+IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
@@ -278,6 +278,13 @@ multilib_src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ if use ppc64 && ! use elibc_musl; then
+ mycmakeargs+=(
+ -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double)
+ )
+ fi
+
use test && mycmakeargs+=(
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
-DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit"
diff --git a/sys-devel/clang/clang-15.0.6.ebuild b/sys-devel/clang/clang-15.0.6.ebuild
index e31eea35bffd..4cc5b8cf4006 100644
--- a/sys-devel/clang/clang-15.0.6.ebuild
+++ b/sys-devel/clang/clang-15.0.6.ebuild
@@ -16,7 +16,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x64-macos"
-IUSE="debug doc +extra +pie +static-analyzer test xml"
+IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
@@ -278,6 +278,13 @@ multilib_src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ if use ppc64 && ! use elibc_musl; then
+ mycmakeargs+=(
+ -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double)
+ )
+ fi
+
use test && mycmakeargs+=(
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
-DLLVM_EXTERNAL_LIT="${BUILD_DIR}/bin/llvm-lit"
diff --git a/sys-devel/clang/clang-16.0.0.9999.ebuild b/sys-devel/clang/clang-16.0.0.9999.ebuild
index 93264b2ec92d..97ed8a0f1bd3 100644
--- a/sys-devel/clang/clang-16.0.0.9999.ebuild
+++ b/sys-devel/clang/clang-16.0.0.9999.ebuild
@@ -16,7 +16,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
KEYWORDS=""
-IUSE="debug doc +extra +pie +static-analyzer test xml"
+IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
@@ -273,6 +273,13 @@ multilib_src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ if use ppc64 && ! use elibc_musl; then
+ mycmakeargs+=(
+ -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double)
+ )
+ fi
+
use test && mycmakeargs+=(
-DLLVM_BUILD_TESTS=ON
-DLLVM_LIT_ARGS="$(get_lit_flags)"
diff --git a/sys-devel/clang/clang-16.0.0_pre20221210.ebuild b/sys-devel/clang/clang-16.0.0_pre20221210.ebuild
index 45441bad73b4..f6ba41a7913a 100644
--- a/sys-devel/clang/clang-16.0.0_pre20221210.ebuild
+++ b/sys-devel/clang/clang-16.0.0_pre20221210.ebuild
@@ -16,7 +16,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
KEYWORDS="~loong"
-IUSE="debug doc +extra +pie +static-analyzer test xml"
+IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
@@ -273,6 +273,13 @@ multilib_src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ if use ppc64 && ! use elibc_musl; then
+ mycmakeargs+=(
+ -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double)
+ )
+ fi
+
use test && mycmakeargs+=(
-DLLVM_BUILD_TESTS=ON
-DLLVM_LIT_ARGS="$(get_lit_flags)"
diff --git a/sys-devel/clang/clang-16.0.0_pre20221217.ebuild b/sys-devel/clang/clang-16.0.0_pre20221217.ebuild
index 45441bad73b4..f6ba41a7913a 100644
--- a/sys-devel/clang/clang-16.0.0_pre20221217.ebuild
+++ b/sys-devel/clang/clang-16.0.0_pre20221217.ebuild
@@ -16,7 +16,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA MIT"
SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
KEYWORDS="~loong"
-IUSE="debug doc +extra +pie +static-analyzer test xml"
+IUSE="debug doc +extra ieee-long-double +pie +static-analyzer test xml"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
@@ -273,6 +273,13 @@ multilib_src_configure() {
-DPython3_EXECUTABLE="${PYTHON}"
)
+
+ if use ppc64 && ! use elibc_musl; then
+ mycmakeargs+=(
+ -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=$(usex ieee-long-double)
+ )
+ fi
+
use test && mycmakeargs+=(
-DLLVM_BUILD_TESTS=ON
-DLLVM_LIT_ARGS="$(get_lit_flags)"
diff --git a/sys-devel/clang/metadata.xml b/sys-devel/clang/metadata.xml
index 565650790b47..2dfafd05460d 100644
--- a/sys-devel/clang/metadata.xml
+++ b/sys-devel/clang/metadata.xml
@@ -31,6 +31,7 @@ Conformance with C/C++/ObjC and their variants</longdescription>
<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="extra">Build extra tools (clangd, clang-tidy and a few more)</flag>
+ <flag name="ieee-long-double">Use accelerated 128-bit IEEE long double ABI (ppc64le only)</flag>
<flag name="static-analyzer">Install the Clang static analyzer</flag>
</use>
<upstream>