From: Sasha Levin <sashal@kernel.org>
To: "Willy Tarreau" <w@1wt.eu>, "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Sasha Levin <sashal@kernel.org>, Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] selftests/nolibc: use the configured kernel header directory
Date: Wed, 14 Oct 2026 16:01:42 -0400 [thread overview]
Message-ID: <20261014200142.1364761-1-sashal@kernel.org> (raw)
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
next reply other threads:[~2026-10-14 20:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 20:01 Sasha Levin [this message]
2026-10-14 20:55 ` Thomas Weißschuh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261014200142.1364761-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=shuah@kernel.org \
--cc=w@1wt.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®