lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ebb84a9c-8771-4791-8a81-b615cecec7c3@t-8ch.de>
Date: Sun, 17 Aug 2025 10:30:52 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Willy Tarreau <w@....eu>
Cc: Shuah Khan <shuah@...nel.org>, Nathan Chancellor <nathan@...nel.org>, 
	Nick Desaulniers <nick.desaulniers+lkml@...il.com>, Bill Wendling <morbo@...gle.com>, 
	Justin Stitt <justinstitt@...gle.com>, linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org, 
	llvm@...ts.linux.dev
Subject: Re: [PATCH 2/3] selftests/nolibc: don't pass CC to toplevel Makefile

Hi Willy,

On 2025-07-21 04:56:27+0200, Willy Tarreau wrote:
> 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 ?

Correct.

> 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)"

I don't think this is correct. $CC itself depends on $CROSS_COMPILE
through tools/scripts/Makefile.include.

> 	@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)"

I'll fold this into the last commit of the series.


Thomas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ