commit:     7ef3504c4fb36c875c9a58bdde62b5f8443e3bf7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  9 08:23:27 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jul  9 21:33:56 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ef3504c

sys-libs/compiler-rt: Warn when not using clang

 sys-libs/compiler-rt/compiler-rt-4.0.1.ebuild | 7 +++++++
 sys-libs/compiler-rt/compiler-rt-9999.ebuild  | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/sys-libs/compiler-rt/compiler-rt-4.0.1.ebuild 
b/sys-libs/compiler-rt/compiler-rt-4.0.1.ebuild
index 98d9f66212b..bc1e65eb314 100644
--- a/sys-libs/compiler-rt/compiler-rt-4.0.1.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-4.0.1.ebuild
@@ -34,6 +34,13 @@ S=${WORKDIR}/${P/_/}.src
 # least intrusive of all
 CMAKE_BUILD_TYPE=RelWithDebInfo
 
+pkg_pretend() {
+       if ! use clang && ! tc-is-clang; then
+               ewarn "Building using a compiler other than clang may result in 
broken atomics"
+               ewarn "library. Enable USE=clang unless you have a very good 
reason not to."
+       fi
+}
+
 pkg_setup() {
        llvm_pkg_setup
        python-any-r1_pkg_setup

diff --git a/sys-libs/compiler-rt/compiler-rt-9999.ebuild 
b/sys-libs/compiler-rt/compiler-rt-9999.ebuild
index ffd1e9eddb3..03c34d45531 100644
--- a/sys-libs/compiler-rt/compiler-rt-9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-9999.ebuild
@@ -35,6 +35,13 @@ DEPEND="
 # least intrusive of all
 CMAKE_BUILD_TYPE=RelWithDebInfo
 
+pkg_pretend() {
+       if ! use clang && ! tc-is-clang; then
+               ewarn "Building using a compiler other than clang may result in 
broken atomics"
+               ewarn "library. Enable USE=clang unless you have a very good 
reason not to."
+       fi
+}
+
 pkg_setup() {
        llvm_pkg_setup
        python-any-r1_pkg_setup

Reply via email to