[llvmlinux] project status?

Nick Desaulniers nick.desaulniers at gmail.com
Mon Nov 21 04:59:16 UTC 2016


To follow up,
I have the following four patches applied:

1. kbuild, LLVMLinux: Add better clang cross build support
2. Kbuild: LLVMLinux: Disable the use of the Integrated Assembler when
compiling with C lang
3. kbuild, LLVMLinux: Add more compiler options for clang
4. kbuild, LLVMLinux: Fix asm-offset generation to work with clang

I'm trying to compile on my x86_64 host for the same machine (no cross
compiling).  I compile with:

$ PATH=~/llvm/build/bin/:$PATH make HOSTCC=clang CC=clang -j `nproc`

I see the following error:

scripts/mod/devicetable-offsets.c:10:2: error: unexpected token at start
of statement
        DEVID(usb_device_id);
        ^
scripts/mod/devicetable-offsets.c:4:22: note: expanded from macro
'DEVID'
#define DEVID(devid) DEFINE(SIZE_##devid, sizeof(struct devid))
                     ^
./include/linux/kbuild.h:5:25: note: expanded from macro 'DEFINE'
        asm volatile("\n at ->" #sym " %0 " #val : : "i" (val))
                        ^
<inline asm>:2:1: note: instantiated into assembly here
@->SIZE_usb_device_id $32 sizeof(struct usb_device_id)
^

It looks like that's what the 4th patch is meant to address. Is it that
one of the later patches in the patch sent is meant to address and I
simply haven't applied enough patches, or has the patch bit-rotten? (or
a third possibility, PEBKAC?)

I'll attach the 4 patches, as I think the first I had to clean up to
apply on top of 4.9. I need to amend the authorship, but w/e.

It looks like this has to do with creating
scripts/mod/devicetavle-offsets.h, but my Kbuild-foo isn't strong enough
to figure out how to get this to work.  It looks like commit
bd70134396622ea50b14e34dae0810879884d553 may have changed this logic
since the fourth patch was authored, but reverting it doesn't change
anything.

Anyways, this looks like a great project, so I hope folks are still
actively working on it.  I'd like to help out, too.

Thanks,
~Nick

On Sat, Nov 19, 2016 at 06:19:58PM -0800, Nick Desaulniers wrote:
> Hey All,
> I'm interested in compiling the kernel with LLVM.  I was curious what's
> the status of this project?  The website seems to show tons of build bot
> failures.  The llvmlinux-latest branch seems to be for 3.18 kernels and
> the x86_64 patch set doesn't apply cleanly to 4.9.
> 
> Looks like there was a meeting back in May:
> https://lists.linuxfoundation.org/pipermail/llvmlinux/2016-June/001488.html
> 
> Mailing list looks silent Sept and Oct 2016.
> 
> I'd appreciate any historical context.  Does anyone have cleaned up
> patches for 4.9?  Can we add some more info to the LLVMLinux project web
> site for future travelers?
> 
> Thanks,
> ~Nick Desaulniers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-kbuild-LLVMLinux-Add-better-clang-cross-build-suppor.patch
Type: text/x-diff
Size: 2664 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20161120/f33e9101/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Kbuild-LLVMLinux-Disable-the-use-of-the-Integrated-A.patch
Type: text/x-diff
Size: 1321 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20161120/f33e9101/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-kbuild-LLVMLinux-Add-more-compiler-options-for-clang.patch
Type: text/x-diff
Size: 2360 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20161120/f33e9101/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-kbuild-LLVMLinux-Fix-asm-offset-generation-to-work-w.patch
Type: text/x-diff
Size: 3602 bytes
Desc: not available
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20161120/f33e9101/attachment-0003.bin>


More information about the LLVMLinux mailing list