summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Smith <matthew@gentoo.org>2022-02-22 20:35:50 +0000
committerMatthew Smith <matthew@gentoo.org>2022-02-22 21:06:16 +0000
commit8a8eb5890e84734a4d152d270750406950f278c7 (patch)
treef1e7518ee7f02c71dd14bec9b462d1e83a479abc /sys-devel/mold
parentsci-chemistry/gromacs: New release (diff)
downloadgentoo-8a8eb5890e84734a4d152d270750406950f278c7.tar.gz
gentoo-8a8eb5890e84734a4d152d270750406950f278c7.tar.bz2
gentoo-8a8eb5890e84734a4d152d270750406950f278c7.zip
sys-devel/mold: check compiler version
Acked-by: Sam James <sam@gentoo.org> Closes: https://bugs.gentoo.org/831473 Closes: https://github.com/gentoo/gentoo/pull/24321 Signed-off-by: Matthew Smith <matthew@gentoo.org>
Diffstat (limited to 'sys-devel/mold')
-rw-r--r--sys-devel/mold/mold-1.0.3.ebuild11
-rw-r--r--sys-devel/mold/mold-1.1.ebuild11
-rw-r--r--sys-devel/mold/mold-9999.ebuild11
3 files changed, 33 insertions, 0 deletions
diff --git a/sys-devel/mold/mold-1.0.3.ebuild b/sys-devel/mold/mold-1.0.3.ebuild
index 7948bbc23805..5536efda5951 100644
--- a/sys-devel/mold/mold-1.0.3.ebuild
+++ b/sys-devel/mold/mold-1.0.3.ebuild
@@ -31,6 +31,17 @@ RDEPEND=">=dev-cpp/tbb-2021.4.0:=
)"
DEPEND="${RDEPEND}"
+pkg_pretend() {
+ # Requires a c++20 compiler, see #831437
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 10 ]]; then
+ die "${PN} needs at least gcc 10"
+ elif tc-is-clang && [[ $(clang-major-version) -lt 12 ]]; then
+ die "${PN} needs at least clang 12"
+ fi
+ fi
+}
+
src_prepare() {
default
diff --git a/sys-devel/mold/mold-1.1.ebuild b/sys-devel/mold/mold-1.1.ebuild
index caa630e22c18..351ef38c6b51 100644
--- a/sys-devel/mold/mold-1.1.ebuild
+++ b/sys-devel/mold/mold-1.1.ebuild
@@ -32,6 +32,17 @@ RDEPEND=">=dev-cpp/tbb-2021.4.0:=
# TODO: restore SYSTEM_XXHASH upstream?
DEPEND="${RDEPEND}"
+pkg_pretend() {
+ # Requires a c++20 compiler, see #831473
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 10 ]]; then
+ die "${PN} needs at least gcc 10"
+ elif tc-is-clang && [[ $(clang-major-version) -lt 12 ]]; then
+ die "${PN} needs at least clang 12"
+ fi
+ fi
+}
+
src_prepare() {
default
diff --git a/sys-devel/mold/mold-9999.ebuild b/sys-devel/mold/mold-9999.ebuild
index caa630e22c18..351ef38c6b51 100644
--- a/sys-devel/mold/mold-9999.ebuild
+++ b/sys-devel/mold/mold-9999.ebuild
@@ -32,6 +32,17 @@ RDEPEND=">=dev-cpp/tbb-2021.4.0:=
# TODO: restore SYSTEM_XXHASH upstream?
DEPEND="${RDEPEND}"
+pkg_pretend() {
+ # Requires a c++20 compiler, see #831473
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 10 ]]; then
+ die "${PN} needs at least gcc 10"
+ elif tc-is-clang && [[ $(clang-major-version) -lt 12 ]]; then
+ die "${PN} needs at least clang 12"
+ fi
+ fi
+}
+
src_prepare() {
default