[PATCH RESEND 2/3] selftests/kexec: select tests using the target compiler
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Thu Nov 5 05:04:49 PST 2026
> The kexec Makefile recognizes PowerPC only through the ppc64le spelling
> of ARCH, so the canonical ARCH=powerpc used for cross builds omits the
> tests. The x86 jump test is selected with IS_64_BIT from
> scripts/Makefile.arch, which describes the build host rather than the
> compiler being used. On other architectures the Makefile includes no
> lib.mk rules at all, so installation and runlist generation fail with
> missing targets.
>
> Select x86 and PowerPC from the target ARCH when it is given and from
> the host's SUBARCH otherwise, without assigning ARCH, so that lib.mk
> keeps choosing the compiler's native clang target. Ask the selected
> compiler, including USERCFLAGS, whether it targets a 64-bit x86 ABI
> and whether it targets little-endian 64-bit PowerPC. lib.mk expands the
> generated program list before it appends USERCFLAGS to CFLAGS, so the
> flags are passed explicitly to keep both probes consistent. If the
> compiler cannot be run, select the jump test so that the build fails
> instead of silently dropping it. Include lib.mk unconditionally so that
> unsupported targets build, install and emit an empty runlist.
>
> Fixes: 65e38e32a959 ("selftests/kexec: Enable secureboot tests for PowerPC")
> Fixes: 7615b94b6371 ("selftests/kexec: Add x86_64 selftest for kexec-jump and exception handling")
> Signed-off-by: Sasha Levin <sashal at kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261105125701.1605281-1-sashal@kernel.org?part=2
More information about the kexec
mailing list