From 1b89aeb517f1b0b80687825283e0765a0dadc24d Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Tue, 14 Mar 2023 14:53:03 +0000 Subject: [PATCH] [libc] Add instructions for linux headers Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D146049 --- libc/docs/full_host_build.rst | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/libc/docs/full_host_build.rst b/libc/docs/full_host_build.rst index e5c5cc1e7e223..709ba70b22de4 100644 --- a/libc/docs/full_host_build.rst +++ b/libc/docs/full_host_build.rst @@ -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 ===========================