[libc] Add instructions for linux headers
authorJeff Bailey <jeffbailey@google.com>
Tue, 14 Mar 2023 14:53:03 +0000 (14:53 +0000)
committerJeff Bailey <jeffbailey@google.com>
Wed, 15 Mar 2023 03:02:16 +0000 (03:02 +0000)
Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D146049

libc/docs/full_host_build.rst

index e5c5cc1..709ba70 100644 (file)
@@ -95,8 +95,17 @@ Linux Headers
 =============
 
 If you are using the full libc on Linux, then you will also need to install
-Linux headers in your sysroot. It is left to the reader to figure out the best
-way to install Linux headers on the system they want to use the full libc on.
+Linux headers in your sysroot.  The way to do this varies per system.
+
+These instructions should work on a Debian-based x86_64 system:
+
+.. code-block:: sh
+
+   $> apt download linux-libc-dev
+   $> dpkg -x linux-libc-dev*deb .
+   $> mv usr/include/* /path/to/sysroot/include
+   $> rm -rf usr linux-libc-dev*deb
+   $> ln -s x86_64-linux-gnu/asm ~/Programming/sysroot/include/asm
 
 Using your newly built libc
 ===========================