From: Willy Tarreau <w@1wt.eu>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Shuah Khan <shuah@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH] selftests/nolibc: explicitly disable position independent executables
Date: Sun, 18 Oct 2026 06:37:25 +0200 [thread overview]
Message-ID: <atRNBTorEV-yt6kL@1wt.eu> (raw)
In-Reply-To: <20261018-nolibc-unused-arguments-v1-1-6cba71555fe8@weissschuh.net>
Hi Thomas,
On Sun, Oct 18, 2026 at 12:02:18AM +0200, Thomas Weißschuh wrote:
> nolibc does not support position independent executables (PIE).
> However a toolchain might generate these by default depending on various
> circumstances. Recently clang started to do so for hexagon. See LLVM
> commit ab43cb8520c0 ("[Hexagon] Pass -pie to linker when PIE is the
> toolchain default (#189723)").
>
> As clang can also be configured to create PIE for other architectures by
> default disable it globally. While we are at it also pass the argument
> for GCC to be on the safe side.
>
> If PIE is disabled already, clang will generate
> -Wunused-command-line-argument warnings. Inhibit those.
Interesting, I didn't know about these options.
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> I ran into this when testing the upcoming PR to Linus.
> The referenced LLVM commit was released between when I wrote the hexagon
> support and today. My plan is to fold this patch into the PR.
Sounds good.
Reviewed-by: Willy Tarreau <w@1wt.eu>
Willy
> ---
> tools/testing/selftests/nolibc/Makefile.include | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/nolibc/Makefile.include b/tools/testing/selftests/nolibc/Makefile.include
> index ea520eac64a6..14e51c821d8a 100644
> --- a/tools/testing/selftests/nolibc/Makefile.include
> +++ b/tools/testing/selftests/nolibc/Makefile.include
> @@ -8,6 +8,7 @@ _CFLAGS_SANITIZER ?= $(call cc-option,-fsanitize=undefined -fsanitize-trap=all)
> CFLAGS_NOLIBC_TEST ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 -ggdb \
> -W -Wall -Wextra -Wundef -Wwrite-strings \
> $(call cc-option,-fno-stack-protector) $(call cc-option,-Wmissing-prototypes) \
> + $(call cc-option,--start-no-unused-arguments) -no-pie $(call cc-option,--end-no-unused-arguments) \
> $(_CFLAGS_STACKPROTECTOR) $(_CFLAGS_SANITIZER)
>
> NOLIBC_TEST_SOURCES := nolibc-test.c nolibc-test-linkage.c nolibc-test-ignore-errno.c
>
> ---
> base-commit: f9532b372e415e8198287ce010efa22f337857b5
> change-id: 20261017-nolibc-unused-arguments-b504fc061c46
>
> Best regards,
> --
> Thomas Weißschuh <linux@weissschuh.net>
prev parent reply other threads:[~2026-10-18 4:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-17 22:02 [PATCH] selftests/nolibc: explicitly disable position independent executables Thomas Weißschuh
2026-10-18 4:37 ` Willy Tarreau [this message]
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=atRNBTorEV-yt6kL@1wt.eu \
--to=w@1wt.eu \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=shuah@kernel.org \
/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