From: Mickaël Salaün Date: Wed, 15 Jan 2025 14:54:07 +0000 (+0100) Subject: selftests/landlock: Fix build with non-default pthread linking X-Git-Tag: v6.14-rc1~138^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0e4db4f843c2c0115b5981bd6f6b75dea62e7d60;p=thirdparty%2Fkernel%2Flinux.git selftests/landlock: Fix build with non-default pthread linking Old toolchains require explicit -lpthread (e.g. on Debian 11). Cc: Nathan Chancellor Cc: Tahera Fahimi Fixes: c8994965013e ("selftests/landlock: Test signal scoping for threads") Reviewed-by: Günther Noack Link: https://lore.kernel.org/r/20250115145409.312226-1-mic@digikod.net Signed-off-by: Mickaël Salaün --- diff --git a/tools/testing/selftests/landlock/Makefile b/tools/testing/selftests/landlock/Makefile index 348e2dbdb4e0b..480f13e77fcc4 100644 --- a/tools/testing/selftests/landlock/Makefile +++ b/tools/testing/selftests/landlock/Makefile @@ -13,11 +13,11 @@ TEST_GEN_PROGS := $(src_test:.c=) TEST_GEN_PROGS_EXTENDED := true # Short targets: -$(TEST_GEN_PROGS): LDLIBS += -lcap +$(TEST_GEN_PROGS): LDLIBS += -lcap -lpthread $(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static include ../lib.mk # Targets with $(OUTPUT)/ prefix: -$(TEST_GEN_PROGS): LDLIBS += -lcap +$(TEST_GEN_PROGS): LDLIBS += -lcap -lpthread $(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static