From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Willy Tarreau <w@1wt.eu>
Cc: Shuah Khan <shuah@kernel.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 09/12] selftests/nolibc: add support for LLVM= parameter
Date: Sun, 4 Aug 2024 17:59:37 +0200 [thread overview]
Message-ID: <911336fe-0f5e-40fa-ba50-ce982d69f8ba@t-8ch.de> (raw)
In-Reply-To: <20240803094530.GE29127@1wt.eu>
On 2024-08-03 11:45:30+0000, Willy Tarreau wrote:
> On Sun, Jul 28, 2024 at 12:10:03PM +0200, Thomas Weißschuh wrote:
> > Makefile.include can modify CC and CFLAGS for usage with clang.
> > Make use of it.
> >
> > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> > ---
> > tools/testing/selftests/nolibc/Makefile | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
> > index 8000bc3c408b..cdff317c35f2 100644
> > --- a/tools/testing/selftests/nolibc/Makefile
> > +++ b/tools/testing/selftests/nolibc/Makefile
> > @@ -155,6 +155,9 @@ CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 -W -Wall -Wex
> > $(CFLAGS_$(XARCH)) $(CFLAGS_STACKPROTECTOR) $(CFLAGS_EXTRA)
> > LDFLAGS :=
> >
> > +# Modify CFLAGS based on LLVM=
> > +include $(srctree)/tools/scripts/Makefile.include
>
> I'm confused, doesn't it precisely undo the previous patch, which
> said that we ought not to include Makefile.include as it makes it
> harder for LLVM ?
The previous inclusion doesn't make it harder.
The problem is that Makefile.include does two things
1) objtree setup and 2) LLVM handling.
For 1) we want to include it as early as possible, necessarily before
using $(objtree).
For 2) we need to include it after "CFLAGS ?=".
Reshuffling the Makefile to satisfy both requirements will look bad.
So the first commit removed the usage of Makefile.include for 1) because
that is easy to do and the second commit includes it later to satisfy
2).
> If so, I suspect that both commits should be squashed with a better
> explanation for both operations at once (e.g. maybe "move makefile
> inclusion later to benefit from LLVM=..." etc).
Ack.
next prev parent reply other threads:[~2024-08-04 15:59 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-28 10:09 [PATCH 00/12] tools/nolibc: improve LLVM/clang support Thomas Weißschuh
2024-07-28 10:09 ` [PATCH 01/12] tools/nolibc: use clang-compatible asm syntax in arch-arm.h Thomas Weißschuh
2024-07-28 10:09 ` [PATCH 02/12] tools/nolibc: limit powerpc stack-protector workaround to GCC Thomas Weißschuh
2024-07-28 10:09 ` [PATCH 03/12] tools/nolibc: move entrypoint specifics to compiler.h Thomas Weißschuh
2024-08-03 9:22 ` Willy Tarreau
2024-08-03 18:26 ` Thomas Weißschuh
2024-07-28 10:09 ` [PATCH 04/12] tools/nolibc: use attribute((naked)) if available Thomas Weißschuh
2024-08-03 9:25 ` Willy Tarreau
2024-08-03 18:28 ` Thomas Weißschuh
2024-08-03 18:32 ` Willy Tarreau
2024-08-03 20:55 ` Thomas Weißschuh
2024-08-04 3:47 ` Willy Tarreau
2024-07-28 10:09 ` [PATCH 05/12] selftests/nolibc: report failure if no testcase passed Thomas Weißschuh
2024-07-28 10:10 ` [PATCH 06/12] selftests/nolibc: avoid passing NULL to printf("%s") Thomas Weißschuh
2024-08-03 9:33 ` Willy Tarreau
2024-08-03 18:29 ` Thomas Weißschuh
2024-08-03 18:33 ` Willy Tarreau
2024-07-28 10:10 ` [PATCH 07/12] selftests/nolibc: determine $(srctree) first Thomas Weißschuh
2024-08-03 9:40 ` Willy Tarreau
2024-08-04 15:55 ` Thomas Weißschuh
2024-07-28 10:10 ` [PATCH 08/12] selftests/nolibc: setup objtree without Makefile.include Thomas Weißschuh
2024-07-28 10:10 ` [PATCH 09/12] selftests/nolibc: add support for LLVM= parameter Thomas Weißschuh
2024-08-03 9:45 ` Willy Tarreau
2024-08-04 15:59 ` Thomas Weißschuh [this message]
2024-07-28 10:10 ` [PATCH 10/12] selftests/nolibc: add cc-option compatible with clang cross builds Thomas Weißschuh
2024-07-28 10:10 ` [PATCH 11/12] selftests/nolibc: run-tests.sh: avoid overwriting CFLAGS_EXTRA Thomas Weißschuh
2024-07-28 10:10 ` [PATCH 12/12] selftests/nolibc: run-tests.sh: allow building through LLVM Thomas Weißschuh
2024-07-29 19:26 ` [PATCH 00/12] tools/nolibc: improve LLVM/clang support Shuah Khan
2024-07-29 19:27 ` Shuah Khan
2024-08-03 9:50 ` Willy Tarreau
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=911336fe-0f5e-40fa-ba50-ce982d69f8ba@t-8ch.de \
--to=linux@weissschuh.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--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