diff --git a/sys-apps/memtest86+/memtest86+-6.20-r1.ebuild b/sys-apps/memtest86+/memtest86+-6.20-r1.ebuild index 5ca6984446ce3..2d377c3848136 100644 --- a/sys-apps/memtest86+/memtest86+-6.20-r1.ebuild +++ b/sys-apps/memtest86+/memtest86+-6.20-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 2022-2024 Gentoo Authors +# Copyright 2022-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -11,6 +11,8 @@ DESCRIPTION="Memory tester based on PCMemTest" HOMEPAGE="https://www.memtest.org/" SRC_URI="https://github.com/memtest86plus/memtest86plus/archive/refs/tags/v${MY_PV}.tar.gz -> ${P}.tar.gz" +S=${WORKDIR}/memtest86plus-${MY_PV} + LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 x86" @@ -24,10 +26,9 @@ ISODEPS=" BDEPEND=" iso32? ( ${ISODEPS} ) iso64? ( ${ISODEPS} ) + sys-devel/gcc:* " -S=${WORKDIR}/memtest86plus-${MY_PV} - pkg_setup() { if use uefi32 || use uefi64; then secureboot_pkg_setup @@ -42,6 +43,14 @@ src_prepare() { -e 's/objcopy/$(OBJCOPY)/' \ -e 's/shell size/shell $(SIZE)/' \ build{32,64}/Makefile || die + + if ! tc-is-gcc; then + ewarn "clang doesn't support indirect goto in function with no address-of-label expressions" + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + default } diff --git a/sys-apps/memtest86+/memtest86+-7.00.ebuild b/sys-apps/memtest86+/memtest86+-7.00.ebuild index 166f6138e1495..33a4c6202519e 100644 --- a/sys-apps/memtest86+/memtest86+-7.00.ebuild +++ b/sys-apps/memtest86+/memtest86+-7.00.ebuild @@ -1,4 +1,4 @@ -# Copyright 2022-2024 Gentoo Authors +# Copyright 2022-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -11,6 +11,8 @@ DESCRIPTION="Memory tester based on PCMemTest" HOMEPAGE="https://www.memtest.org/" SRC_URI="https://github.com/memtest86plus/memtest86plus/archive/refs/tags/v${MY_PV}.tar.gz -> ${P}.tar.gz" +S=${WORKDIR}/memtest86plus-${MY_PV} + LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 x86" @@ -24,10 +26,9 @@ ISODEPS=" BDEPEND=" iso32? ( ${ISODEPS} ) iso64? ( ${ISODEPS} ) + sys-devel/gcc:* " -S=${WORKDIR}/memtest86plus-${MY_PV} - pkg_setup() { if use uefi32 || use uefi64; then secureboot_pkg_setup @@ -42,6 +43,14 @@ src_prepare() { -e 's/= objcopy/?= $(OBJCOPY)/' \ -e 's/shell size/shell $(SIZE)/' \ build{32,64}/Makefile || die + + if ! tc-is-gcc; then + ewarn "clang doesn't support indirect goto in function with no address-of-label expressions" + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + default } diff --git a/sys-apps/memtest86+/memtest86+-7.20.ebuild b/sys-apps/memtest86+/memtest86+-7.20.ebuild index 88b05cadc68af..ce371c16b3026 100644 --- a/sys-apps/memtest86+/memtest86+-7.20.ebuild +++ b/sys-apps/memtest86+/memtest86+-7.20.ebuild @@ -1,4 +1,4 @@ -# Copyright 2022-2024 Gentoo Authors +# Copyright 2022-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -11,6 +11,8 @@ DESCRIPTION="Memory tester based on PCMemTest" HOMEPAGE="https://www.memtest.org/" SRC_URI="https://github.com/memtest86plus/memtest86plus/archive/refs/tags/v${MY_PV}.tar.gz -> ${P}.tar.gz" +S=${WORKDIR}/memtest86plus-${MY_PV} + LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" @@ -24,10 +26,9 @@ ISODEPS=" BDEPEND=" iso32? ( ${ISODEPS} ) iso64? ( ${ISODEPS} ) + sys-devel/gcc:* " -S=${WORKDIR}/memtest86plus-${MY_PV} - pkg_setup() { if use uefi32 || use uefi64; then secureboot_pkg_setup @@ -42,6 +43,14 @@ src_prepare() { -e 's/= objcopy/?= $(OBJCOPY)/' \ -e 's/shell size/shell $(SIZE)/' \ build{32,64}/Makefile || die + + if ! tc-is-gcc; then + ewarn "clang doesn't support indirect goto in function with no address-of-label expressions" + ewarn "Ignoring CC=$(tc-getCC) and forcing ${CHOST}-gcc" + export CC=${CHOST}-gcc AR=${CHOST}-gcc-ar + tc-is-gcc || die "tc-is-gcc failed in spite of CC=${CC}" + fi + default }