mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-22 19:16:32 +01:00
argp-standalone pass1 builds in a separate build directory. Its testsuite compiles sources that include <argp.h>, but without an explicit include path the header in the source root is not found and build fails. Set: - CPPFLAGS=-I/Users/luoyanpan/CLionProjects/guix/live-bootstrap/.. in src_configure so testsuite objects can resolve argp.h during the normal phase.
36 lines
797 B
Bash
36 lines
797 B
Bash
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
# Build argp-standalone for the kernel toolchain sysroot. This is used by
|
|
# later kernel-side dependencies (for example elfutils).
|
|
: "${KERNEL_SYSROOT:=/kernel-toolchain}"
|
|
|
|
src_prepare() {
|
|
default
|
|
autoreconf -fi
|
|
}
|
|
|
|
src_configure() {
|
|
mkdir build
|
|
cd build
|
|
|
|
# argp-standalone's testsuite expects argp.h from source root even when
|
|
# building out-of-tree.
|
|
CPPFLAGS="-I${PWD}/.." \
|
|
CC=gcc \
|
|
AR=ar \
|
|
RANLIB=ranlib \
|
|
../configure \
|
|
--prefix="${KERNEL_SYSROOT}" \
|
|
--libdir="${KERNEL_SYSROOT}/lib"
|
|
}
|
|
|
|
src_compile() {
|
|
default_src_compile
|
|
}
|
|
|
|
src_install() {
|
|
make "${MAKEJOBS}" install \
|
|
DESTDIR="${DESTDIR}" \
|
|
prefix="${KERNEL_SYSROOT}" \
|
|
libdir="${KERNEL_SYSROOT}/lib"
|
|
}
|