-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[libc][docs] update docs on how to build linux kernel headers from src #122381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libc][docs] update docs on how to build linux kernel headers from src #122381
Conversation
It's simpler than the directions we have; which are very very Debian specific.
|
@llvm/pr-subscribers-libc Author: Nick Desaulniers (nickdesaulniers) ChangesIt's simpler than the directions we have; which are very very Debian specific. Full diff: https://github.com/llvm/llvm-project/pull/122381.diff 1 Files Affected:
diff --git a/libc/docs/full_host_build.rst b/libc/docs/full_host_build.rst
index e25079141f47b2..12aacf181695a9 100644
--- a/libc/docs/full_host_build.rst
+++ b/libc/docs/full_host_build.rst
@@ -175,17 +175,15 @@ Linux Headers
=============
If you are using the full libc on Linux, then you will also need to install
-Linux headers in your sysroot. The way to do this varies per system.
-
-These instructions should work on a Debian-based x86_64 system:
+Linux headers in your sysroot. Let's build them from source.
.. code-block:: sh
- $> apt download linux-libc-dev
- $> dpkg -x linux-libc-dev*deb .
- $> cp -r usr/* /path/to/sysroot/
- $> rm -r usr linux-libc-dev*deb
- $> ln -s /path/to/sysroot/include/x86_64-linux-gnu/asm /path/to/sysroot/include/asm
+ $> git clone --depth=1 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git /tmp/linux
+ $> make LLVM=1 INSTALL_HDR_PATH=/path/to/sysroot -C /tmp/linux headers_install
+
+The headers can be built to target non-host architectures by adding the
+``ARCH={arm|arm64|i386}`` to the above invocation of ``make``.
Using your newly built libc
===========================
|
michaelrj-google
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/11508 Here is the relevant piece of the build log for the reference |
llvm#122381) It's simpler than the directions we have; which are very very Debian specific.
|
I should have noted that this fixed #85815 |
It's simpler than the directions we have; which are very very Debian specific.