do not edit — generated by btf.
git.druid.rocksindexdruid520portsports/libraries/linux-headers/add.sh

ports/libraries/linux-headers/add.sh


set -e
 
git clone --depth 1 -b v6.6 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux
cd linux
# HOST_EXTRACFLAGS: the kernel's own kbuild (same lineage as busybox's,
# see coreutils/busybox/add.sh's own comment for the fuller story) needs
# to build scripts/basic/fixdep even just for headers_install, and its
# HOSTCC compiles get none of runsh's own CFLAGS wiring - just gcc's bare
# defaults, which don't know where this sysroot's real libc headers are.
# -I$(pwd)/tools/include on top of the sysroot's own -I: x86's headers
# target needs archscripts (it generates some UAPI headers, like the
# syscall tables, via compiled host tools - relocs.c among them), and
# arch/x86/tools/relocs.c includes "tools/le_byteshift.h" relying on a
# -Itools/include this checkout's own arch/x86/tools/Makefile should
# supply per-file but isn't reaching this particular compile.
#
# ${MP_PREFIX_BASE:-$MP_PREFIX}, not a bare $MP_PREFIX: this line builds
# its own -I flag by hand instead of relying on runsh's own auto-
# appended CFLAGS -I<prefix>/include (see mplib::resolve's
# install_pkg_body/INPLACE_BASE), so it never benefited from that fix at
# all. an ephemeral "mp reinstall --inplace" build's own $MP_PREFIX is a
# fresh, empty scratch prefix on purpose -- the live root's REAL headers
# (needed to compile fixdep at all) are at MP_PREFIX_BASE instead in
# that case. a normal (non-inplace, non-slotted) build never sets
# MP_PREFIX_BASE at all, so the fallback keeps that case identical to
# before.
lh_base="${MP_PREFIX_BASE:-$MP_PREFIX}"
make ARCH=x86_64 HOST_EXTRACFLAGS="-I$lh_base/include -I$(pwd)/tools/include" INSTALL_HDR_PATH=$MP_PREFIX headers_install
cd ..
rm -rf linux
powered by btf.