5.2. musl libc headers 1.2.6
musl libc headers provide the target C library interface that LLVM compiler-rt expects during configuration and compilation, so they must be installed before compiler-rt is built.
Input assumption:
musl-1.2.6.tar.gz is already present from the chapter 4 manifest fetch step.
musl is a lightweight C standard library implementation for Linux systems. we need it to provide libc header files required for this book's LLVM compiler-rt build.
Extract and Enter the musl Source Tree
cd "$LBI_SOURCES"
tar -xf musl-1.2.6.tar.gz
cd musl-1.2.6
Configure and Install Headers
Run configure once so musl can prepare its generated header set, then install headers into the target tree:
lbi_configure
make install-headers DESTDIR="$LBI_ROOT"
This installs musl headers to the target include path ($LBI_ROOT/usr/include). In the custom layout used by this book, that path can be linked into the primary /system header tree, so later toolchain and runtime components see a consistent libc interface.