mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sys-apps/memtest86+: fix pkgcheck warnings & force compiler to gcc
clang failed with: ../app/main.c:172:5: error: indirect goto in function with no address-of-label expressions for code below: uintptr_t *new_start_addr = (uintptr_t *)(addr + startup - _start); ... goto *new_start_addr; Closes: https://bugs.gentoo.org/874039 Signed-off-by: Z. Liu <zhixu.liu@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/41257 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user