Dockerfile: build Chez from vendored vendor/ChezScheme, not ober's fork
ober
3d0271c6b0f0255c6fbd8e4e83eb268c7473ce7e
--- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ # Dockerfile — jerboa21/jerboa base image for static binary builds # # Provides: -# - Stock Chez Scheme (glibc) at /usr/local — for compilation steps -# - Musl Chez Scheme (static) at /build/chez-musl — for linking +# - Chez Scheme (glibc) at /usr/local — built from the vendored vendor/ChezScheme +# - Musl Chez Scheme (static) at /build/chez-musl — for linking, same source # - Jerboa library source at /build/mine/jerboa/lib # - jerboa-native-rs source + pre-built libjerboa_native.a (musl) # - Rust toolchain with x86_64-unknown-linux-musl target @@ -63,24 +63,25 @@ ENV RUSTUP_HOME="/root/.rustup" ENV HOME=/build WORKDIR /build -# ── Build Chez Scheme (stock glibc, for compilation steps) ─────────────────── +# ── Vendored Chez Scheme source (merged into the jerboa repo) ──────────────── +# Copied from vendor/ChezScheme in the build context (the jerboa repo root), so +# the image always tracks the in-repo Chez instead of an external fork. +COPY vendor/ChezScheme /build/chez-src + +# ── Build Chez Scheme (glibc, for compilation steps) ───────────────────────── # Installed to /usr/local so `scheme` is on PATH -RUN git clone --depth 1 https://github.com/ober/ChezScheme.git && \ - cd ChezScheme && \ - git submodule update --init --depth 1 && \ +RUN cp -a /build/chez-src /build/ChezScheme && cd /build/ChezScheme && \ ./configure --threads --enable-harden --disable-x11 --installprefix=/usr/local && \ make -j$(nproc) && \ make install && \ - cd /build && rm -rf ChezScheme + cd /build && rm -rf /build/ChezScheme # ── Build Chez Scheme (musl, for static linking) ──────────────────────────── # Two-pass build: # Pass 1: Full build with stock gcc to generate boot files # Pass 2: Rebuild kernel only with musl-gcc --static, reusing boot files # Installed to /build/chez-musl -RUN git clone https://github.com/ober/ChezScheme.git chez-musl-src && \ - cd chez-musl-src && \ - git submodule update --init && \ +RUN cp -a /build/chez-src /build/chez-musl-src && cd /build/chez-musl-src && \ ./configure --threads --enable-harden --disable-x11 --installprefix=/build/chez-musl && \ make -j$(nproc) && \ cp ta6le/boot/ta6le/petite.boot /tmp/petite.boot && \