* [PATCH] selftests/nolibc: use the configured kernel header directory
@ 2026-10-14 20:01 Sasha Levin
2026-10-14 20:55 ` Thomas Weißschuh
0 siblings, 1 reply; 2+ messages in thread
From: Sasha Levin @ 2026-10-14 20:01 UTC (permalink / raw)
To: Willy Tarreau, Thomas Weißschuh
Cc: Sasha Levin, Shuah Khan, linux-kselftest, linux-kernel
The freestanding build hardcodes the source tree's usr/include even when
selftests exports KHDR_INCLUDES for an output-directory build. Use the
exported header location while preserving -nostdlib, -nostdinc and static
linkage. GCC 14 and Clang 21 builds then find the generated UAPI headers.
Fixes: eb1353110831 ("selftests/nolibc: integrate with kselftests")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/testing/selftests/nolibc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index 6bace04227a74..6981c220eed76 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -10,7 +10,7 @@ cc-option = $(call __cc-option, $(CC),,$(1),$(2))
include Makefile.include
$(OUTPUT)/nolibc-test: CFLAGS = -nostdlib -nostdinc -static \
- -isystem $(top_srcdir)/tools/include/nolibc -isystem $(top_srcdir)/usr/include \
+ -isystem $(top_srcdir)/tools/include/nolibc $(KHDR_INCLUDES) \
$(CFLAGS_NOLIBC_TEST)
$(OUTPUT)/nolibc-test: LDLIBS = $(if $(LLVM),,-lgcc)
$(OUTPUT)/nolibc-test: $(NOLIBC_TEST_SOURCES) | headers
base-commit: 4eb2586bd40db27d77cc5b724ca9386ed0c71d53
--
2.53.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] selftests/nolibc: use the configured kernel header directory
2026-10-14 20:01 [PATCH] selftests/nolibc: use the configured kernel header directory Sasha Levin
@ 2026-10-14 20:55 ` Thomas Weißschuh
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Weißschuh @ 2026-10-14 20:55 UTC (permalink / raw)
To: Sasha Levin; +Cc: Willy Tarreau, Shuah Khan, linux-kselftest, linux-kernel
On 2026-10-14 16:01:42-0400, Sasha Levin wrote:
> The freestanding build hardcodes the source tree's usr/include even when
> selftests exports KHDR_INCLUDES for an output-directory build. Use the
> exported header location while preserving -nostdlib, -nostdinc and static
> linkage. GCC 14 and Clang 21 builds then find the generated UAPI headers.
>
> Fixes: eb1353110831 ("selftests/nolibc: integrate with kselftests")
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> tools/testing/selftests/nolibc/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks!
(...)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-14 20:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-14 20:01 [PATCH] selftests/nolibc: use the configured kernel header directory Sasha Levin
2026-10-14 20:55 ` Thomas Weißschuh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®