From 5872ad7b37126df3e8897f3db41e3853e6840d99 Mon Sep 17 00:00:00 2001 From: Christopher Byrne Date: Mon, 7 Feb 2022 14:17:58 -0600 Subject: sys-boot/tboot: Die if tc-is-clang. Requires VLAIS which is gcc-only. Closes: https://bugs.gentoo.org/832020 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Christopher Byrne Closes: https://github.com/gentoo/gentoo/pull/24119 Signed-off-by: Sam James --- sys-boot/tboot/tboot-1.10.3.ebuild | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sys-boot') diff --git a/sys-boot/tboot/tboot-1.10.3.ebuild b/sys-boot/tboot/tboot-1.10.3.ebuild index cdb682a949ff..4cedba3fabfc 100644 --- a/sys-boot/tboot/tboot-1.10.3.ebuild +++ b/sys-boot/tboot/tboot-1.10.3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -28,6 +28,16 @@ PATCHES=( "${FILESDIR}/${PN}-1.10.3-disable-Werror.patch" "${FILESDIR}/${PN}-1.10.3-disable-strip.patch" "${FILESDIR}/${PN}-1.10.3-dont-call-toolchain-directly.patch" ) +pkg_setup() { + if tc-is-clang; then + eerror "tboot is a freestanding application that uses gcc" + eerror "extensions in fundemental ways, include VLAIS" + eerror "(Variable Length Arrays in Structs) and will not" + eerror "compile with clang witout upstream action" + die "Cannot compile with clang. See bug #832020" + fi +} + src_configure() { tc-export AS LD CC CPP AR RANLIB NM OBJCOPY OBJDUMP STRIP -- cgit v1.2.3-65-gdbad