sys-libs/compiler-rt: Warn when not using clang
authorMichał Górny <mgorny@gentoo.org>
Sun, 9 Jul 2017 08:23:27 +0000 (10:23 +0200)
committerMichał Górny <mgorny@gentoo.org>
Sun, 9 Jul 2017 21:33:56 +0000 (23:33 +0200)
sys-libs/compiler-rt/compiler-rt-4.0.1.ebuild
sys-libs/compiler-rt/compiler-rt-9999.ebuild

index 98d9f66212bc9ee2f7690bd8e77c033ff97caaeb..bc1e65eb314fd3d37b6a70c2c3e7d1195538e058 100644 (file)
@@ -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
index ffd1e9eddb3ffc0e3b01444b49285535f4fce34f..03c34d45531a03d9df7b2b98d9762cd364412428 100644 (file)
@@ -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