From 7ef3504c4fb36c875c9a58bdde62b5f8443e3bf7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sun, 9 Jul 2017 10:23:27 +0200 Subject: [PATCH] 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 98d9f66212bc..bc1e65eb314f 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 ffd1e9eddb3f..03c34d45531a 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 -- 2.26.2