Skip to contentSkip to conversation

selftests: prctl: don't fail to build when cross compiling

PATCH New Sasha Levin 1 participant 1 message Oct 11

Subsystems (2)
lore
Share & tools
lore

Sasha Levin

author maintainer
#0 lore raw

PATCH 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
---
 tools/testing/selftests/prctl/Makefile | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
tools/testing/selftests/prctl/Makefile +2 -3
index e770e86fad9ac..c321bd60740cb 100644
@@ -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