Source
FROM stagex/pallet-gcc-gnu-busybox AS build
ARG VERSION
COPY --from=stagex/core-gettext . /
COPY --from=stagex/core-libzstd . /
ADD fetch/elfutils-${VERSION}.tar.bz2 .
WORKDIR /elfutils-${VERSION}
ADD *.patch .
RUN --network=none <<-EOF
set -eux
patch -p1 < musl-macros.patch
autoreconf -vif
CFLAGS="-D_GNU_SOURCE -Wno-error -Wno-null-dereference" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--program-prefix=eu- \
--enable-deterministic-archives \
--disable-nls \
--disable-progs \
--disable-libdebuginfod \
--disable-debuginfod \
--with-zstd
make -j "$(nproc)"
make DESTDIR=/rootfs install
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /