diff options
| author | Mickaël Salaün <mic@digikod.net> | 2025-01-15 15:54:07 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-08 09:57:23 +0100 |
| commit | e9d01de8951fd1779892dc0b315ee935296ccc65 (patch) | |
| tree | b7fdda72971c8e7e46690862c9009e0a4d29c062 /tools/testing | |
| parent | e730500506e7846eff0d5bc6f7143740500a68d9 (diff) | |
| download | linux-e9d01de8951fd1779892dc0b315ee935296ccc65.tar.gz linux-e9d01de8951fd1779892dc0b315ee935296ccc65.tar.bz2 linux-e9d01de8951fd1779892dc0b315ee935296ccc65.zip | |
selftests/landlock: Fix build with non-default pthread linking
[ Upstream commit 0e4db4f843c2c0115b5981bd6f6b75dea62e7d60 ]
Old toolchains require explicit -lpthread (e.g. on Debian 11).
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Tahera Fahimi <fahimitahera@gmail.com>
Fixes: c8994965013e ("selftests/landlock: Test signal scoping for threads")
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
Link: https://lore.kernel.org/r/20250115145409.312226-1-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/testing')
| -rw-r--r-- | tools/testing/selftests/landlock/Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/landlock/Makefile b/tools/testing/selftests/landlock/Makefile index 348e2dbdb4e0..480f13e77fcc 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 |
