mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 <nick.desaulniers+lkml@gmail.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 2/3] selftests/nolibc: don't pass CC to toplevel Makefile
Date: Mon, 21 Jul 2025 04:56:27 +0200	[thread overview]
Message-ID: <20250721025627.GB1886@1wt.eu> (raw)
In-Reply-To: <20250719-nolibc-llvm-system-v1-2-1730216ce171@weissschuh.net>

Hi Thomas,

On Sat, Jul 19, 2025 at 05:38:28PM +0200, Thomas Weißschuh wrote:
> The toplevel Makefile is capable of calculating CC from CROSS_COMPILE
> and/or ARCH.
> 
> Stop passing the unnecessary variable.
(...) 
>  # Execute the toplevel kernel Makefile
> -KBUILD_MAKE = $(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE)
> +KBUILD_MAKE = $(MAKE) -C $(srctree) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE)

Here the goal was not to help the toplevel Makefile figure CC, but rather
to permit the user to override it, and it's also listed in "make help",
and even used in cc-option.

I understnad that you're trying to avoid forcing CC to clang when
building, but in this case, what will CROSS_COMPILE contain ?  My
guess is that you intend to make CROSS_COMPILE point to the gcc-based
toolchain, and have CC point to clang for userland only. Is this the
case ? I think I'd be fine with this, but then we need to make it
explicit in the help message and fix the current one, possibly just
with this:

-	@echo "  nolibc-test       build the executable (uses \$$CC and \$$CROSS_COMPILE)"
+	@echo "  nolibc-test       build the executable (uses \$$CC)"
	@echo "  libc-test         build an executable using the compiler's default libc instead"
	@echo "  run-user          runs the executable under QEMU (uses \$$XARCH, \$$TEST)"
	@echo "  initramfs.cpio    prepare the initramfs archive with nolibc-test"
	@echo "  initramfs         prepare the initramfs tree with nolibc-test"
 	@echo "  defconfig         create a fresh new default config (uses \$$XARCH)"
-	@echo "  kernel            (re)build the kernel (uses \$$XARCH)"
+	@echo "  kernel            (re)build the kernel (uses \$$XARCH, \$$CROSS_COMPILE)"

Thanks,
Willy

  reply	other threads:[~2025-07-21  3:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-19 15:38 [PATCH 0/3] selftests/nolibc: enable qemu-system tests with LLVM builds Thomas Weißschuh
2025-07-19 15:38 ` [PATCH 1/3] selftests/nolibc: deduplicate invocations of toplevel Makefile Thomas Weißschuh
2025-07-19 15:38 ` [PATCH 2/3] selftests/nolibc: don't pass CC to " Thomas Weißschuh
2025-07-21  2:56   ` Willy Tarreau [this message]
2025-08-17  8:30     ` Thomas Weißschuh
2025-08-17  9:39       ` Willy Tarreau
2025-08-18 14:07         ` Thomas Weißschuh
2025-08-19  3:54           ` Willy Tarreau
2025-07-19 15:38 ` [PATCH 3/3] selftests/nolibc: always compile the kernel with GCC Thomas Weißschuh
2025-07-21  2:57 ` [PATCH 0/3] selftests/nolibc: enable qemu-system tests with LLVM builds 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=20250721025627.GB1886@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=nick.desaulniers+lkml@gmail.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

all inboxes | Powered by JetHome®