-
Notifications
You must be signed in to change notification settings - Fork 18
investigate cross-compilation with LLVM tools and without GNU binutils #73
Comments
I don't follow. All of Android is cross compiled via LLVM. Which parts are you referring to specifically? LLVM uses a combination of |
Right now we are installing |
@rupprecht is looking in to such incompatibilties as well. https://github.com/ClangBuiltLinux/linux/issues?q=is%3Aopen+is%3Aissue+label%3Allvm-tools is our list of known issues (separate from Clang, LLD, or integrated-as). |
In order to make sure there is no binutils installed I do |
After very little modification (replacing about 10 lines of unsupported assembly with nops), I finally have built an x86_64 defconfig kernel without using GNU binutils. It obviously should not be bootable, but it was linked successfully.
There may be other issues like invalid code generation, but they are very unlikely to be detected until a kernel is compiled without stubs. |
Hooray! I have successfully build an arm32_v5 kernel without using GNU binutils: travis build log. |
Awesome! Something like this should reveal if everything is hermetic: I suspect we are still implicitly using Otherwise, I'd expect only LLVM tools to be used. |
Thank you very much for your suggestions. I was sure that GNU binutils were not used during the build, but still wanted to remove them. Turned out the build was not actually hermetic! |
great find, filed ClangBuiltLinux/linux#766 |
arm32_v5 successfull build with total 4 patches: https://travis-ci.com/ClangBuiltLinux/continuous-integration/jobs/254762048 |
Which 4/where?
arch/x86/boot/compressed/Makefile hardcodes |
These are the patches required for successful build for arm32_v5:
|
Right now x86_64 boots fine. I also have compiled a bootable ARM64 kernel with the following workarounds:
|
I'm not sure that cross compilation is possible with llvm tools at this point. I will research the topic and post my findings in this thread.
The text was updated successfully, but these errors were encountered: