selftests: prctl: don't fail to build when cross compiling
Subsystems (2)
Sasha Levin
maintainerPATCH 1/1 selftests: prctl: don't fail to build when cross compiling
The prctl Makefile includes lib.mk only for native x86 builds. With CROSS_COMPILE set, or for other architectures, it defines no targets at all, and since prctl is in the default selftests TARGETS, the build fails:
make: *** No targets. Stop.
Include lib.mk unconditionally, so that those builds have nothing to do instead of failing. Native x86 builds are unchanged.
Fixes 5290586186d24 ("selftests: prctl: Add new prctl test for PR_SET_VMA action")
Assisted-by LLM
Signed-off-by Sasha Levin <[email protected]>
--- tools/testing/selftests/prctl/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
tools/testing/selftests/prctl/Makefile +2 -3
@@ -7,8 +7,7 @@ ifeq ($(ARCH),x86) TEST_PROGS := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test \ disable-tsc-test set-anon-vma-name-test set-process-name all: $(TEST_PROGS) - -include ../lib.mk - endif endif + +include ../lib.mk
Signature · 1 line
2.53.0