mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user