Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.
This repository was archived by the owner on Mar 7, 2021. It is now read-only.

[info] ClangBuiltLinux #147

Description

@nickdesaulniers

Hello! Neat project, a lot of folks in Android are keeping an eye on it. If you run into any issues with Clang or LLVM for the Linux kernel (or need help with anything else roughly related), please let us know: https://github.com/ClangBuiltLinux/linux/issues.

Activity

  1. geofft commented on Aug 28, 2019

    @geofft
    Collaborator

    Thanks! A few things that come to mind:

    • We changed our target triple from x86-unknown-linux-gnu to x86-elf to avoid LLVM emitting a call to bcmp() instead of memcmp(). I see the upstream kernel solved this by just adding a memcmp() symbol, do you know if it would be better to change the target triple to not claim to be linux-gnu? (See Do not pretend to be a GNU/Linux #114.)
    • Do you have a suggested qemu image or something of a Clang-built kernel that we can throw in our CI? (Right now our CI is currently "use the kernel installed on Travis" but next time I get a chunk of free time I'll retool it to call into qemu images or something.)
  2. nickdesaulniers commented on Aug 28, 2019

    @nickdesaulniers
    Author

    lol, I wrote the kernel patch for bcmp. I highly recommend sticking with the same target triple that the rest of clang and the kernel use, ie. <arch>-linux-gnu. I also backported my patch to stable LTS branches, so those should all work for you (though some distro's have strange non-LTS kernel versions, I assume they manually backport stable...or at least I hope they do).

    For CI+QEMU, all of our stuff is here. It's setup to do a basic boot test, then power off the machine cleanly. If the machine doesn't exit cleanly, timeout snaps qemu's neck and the tests fail. Feel free to use our fs images or buildroot scripts or w/e. I'm also happy to help answer any questions. See also: https://nickdesaulniers.github.io/blog/2018/10/24/booting-a-custom-linux-kernel-in-qemu-and-debugging-it-with-gdb/

  3. alex commented on Aug 29, 2019

    @alex
    Member

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstream-linuxWork that needs to happen in Linux itself

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions