bison
Source
FROM scratch AS build
ARG VERSION
ARG TARGETARCH
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-llvm . /
COPY --from=stagex/core-zlib . /
COPY --from=stagex/core-libzstd . /
COPY --from=stagex/core-perl . /
COPY --from=stagex/core-autoconf . /
COPY --from=stagex/core-automake . /
COPY --from=stagex/core-make . /
COPY --from=stagex/core-m4 . /
ADD fetch/bison-${VERSION}.tar.xz .
WORKDIR /bison-${VERSION}
ENV CC=clang
ENV CXX=clang++
ENV CFLAGS="-mtune=generic -fno-lto"
ENV CXXFLAGS="-fno-lto"
ENV SOURCE_DATE_EPOCH="1"
ENV M4=/usr/bin/m4
RUN --network=none <<-EOF
set -eux
[[ "$TARGETARCH" == "amd64" ]] \
&& CFLAGS="$CFLAGS -march=x86-64"
[[ "$TARGETARCH" == "arm64" ]] \
&& CFLAGS="$CFLAGS -march=armv8-a"
./configure \
--prefix=/usr \
--disable-nls \
gl_cv_func_getcwd_path_max="no, but it is partly working"
make -j1 MAKEINFO=false
make DESTDIR=/rootfs install
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /Copied to clipboard!