[PATCH 0/2] kbuild: userprogs: two fixes for LLVM=1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
---
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@xxxxxxxxxxxxx>





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux