* [PATCH v1] selftests/landlock: Fix build with non-default pthread linking
@ 2025-01-15 14:54 Mickaël Salaün
2025-01-17 12:39 ` Günther Noack
0 siblings, 1 reply; 2+ messages in thread
From: Mickaël Salaün @ 2025-01-15 14:54 UTC (permalink / raw)
To: Günther Noack
Cc: Mickaël Salaün, linux-kernel, linux-security-module,
linux-kselftest, Nathan Chancellor, Tahera Fahimi
Old toolchains require explicit -lpthread (e.g. on Debian 11).
Cc: Günther Noack <gnoack@google.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Tahera Fahimi <fahimitahera@gmail.com>
Fixes: c8994965013e ("selftests/landlock: Test signal scoping for threads")
Signed-off-by: Mickaël Salaün <mic@digikod.net>
---
tools/testing/selftests/landlock/Makefile | 4 ++--
1 file 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
--
2.48.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] selftests/landlock: Fix build with non-default pthread linking
2025-01-15 14:54 [PATCH v1] selftests/landlock: Fix build with non-default pthread linking Mickaël Salaün
@ 2025-01-17 12:39 ` Günther Noack
0 siblings, 0 replies; 2+ messages in thread
From: Günther Noack @ 2025-01-17 12:39 UTC (permalink / raw)
To: Mickaël Salaün
Cc: Günther Noack, linux-kernel, linux-security-module,
linux-kselftest, Nathan Chancellor, Tahera Fahimi
On Wed, Jan 15, 2025 at 03:54:07PM +0100, Mickaël Salaün wrote:
> Old toolchains require explicit -lpthread (e.g. on Debian 11).
>
> Cc: Günther Noack <gnoack@google.com>
> Cc: Nathan Chancellor <nathan@kernel.org>
> Cc: Tahera Fahimi <fahimitahera@gmail.com>
> Fixes: c8994965013e ("selftests/landlock: Test signal scoping for threads")
> Signed-off-by: Mickaël Salaün <mic@digikod.net>
> ---
> tools/testing/selftests/landlock/Makefile | 4 ++--
> 1 file 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
> --
> 2.48.1
>
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-17 12:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-15 14:54 [PATCH v1] selftests/landlock: Fix build with non-default pthread linking Mickaël Salaün
2025-01-17 12:39 ` Günther Noack
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox