Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [PATCH 0/2] kbuild: userprogs: two fixes for LLVM=1
@ 2025-02-13 14:55 Thomas Weißschuh
  2025-02-13 14:55 ` [PATCH 1/2] kbuild: userprogs: fix bitsize and target detection on clang Thomas Weißschuh
  2025-02-13 14:55 ` [PATCH 2/2] kbuild: userprogs: use lld to link through clang Thomas Weißschuh
  0 siblings, 2 replies; 8+ messages in thread
From: Thomas Weißschuh @ 2025-02-13 14:55 UTC (permalink / raw)
  To: Masahiro Yamada, Nathan Chancellor, Nicolas Schier,
	Nick Desaulniers, Bill Wendling, Justin Stitt, Sam Ravnborg
  Cc: linux-kbuild, linux-kernel, llvm, Thomas Weißschuh, stable

Fix two issues when cross-building userprogs with clang.

Reproducer, using nolibc to avoid libc requirements for cross building:

$ tail -2 init/Makefile
userprogs-always-y += test-llvm
test-llvm-userccflags += -nostdlib -nolibc -static -isystem usr/ -include $(srctree)/tools/include/nolibc/nolibc.h

$ cat init/test-llvm.c
int main(void)
{
	return 0;
}

$ make ARCH=arm64 LLVM=1 allnoconfig headers_install init/

Validate that init/test-llvm builds and has the correct binary format.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Thomas Weißschuh (2):
      kbuild: userprogs: fix bitsize and target detection on clang
      kbuild: userprogs: use lld to link through clang

 Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
change-id: 20250213-kbuild-userprog-fixes-4f07b62ae818

Best regards,
-- 
Thomas Weißschuh <thomas.weissschuh@linutronix.de>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-02-15 18:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 14:55 [PATCH 0/2] kbuild: userprogs: two fixes for LLVM=1 Thomas Weißschuh
2025-02-13 14:55 ` [PATCH 1/2] kbuild: userprogs: fix bitsize and target detection on clang Thomas Weißschuh
2025-02-13 17:55   ` Nathan Chancellor
2025-02-15 18:10   ` Masahiro Yamada
2025-02-13 14:55 ` [PATCH 2/2] kbuild: userprogs: use lld to link through clang Thomas Weißschuh
2025-02-13 17:54   ` Nathan Chancellor
2025-02-14  7:40     ` Thomas Weißschuh
2025-02-15  4:15       ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox