diff --git a/Dockerfile b/Dockerfile index df228b5..a472cd5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,11 @@ RUN mkdir -p /opt && mkdir -p /home/gcc-user && useradd gcc-user && chown gcc-us RUN apt-get clean -y && apt-get check -y +## for nightly build of cross compiler with GNAT (Ada), we need "a matching" +## compiler. So using gcc-13 for master is not working. So we have a *hardcoded* +## snapshot below that should be "good enough". When there's a failure caused by +## GNAT, it's probably time to bump the snapshot. + RUN apt-get update -y -q && apt-get upgrade -y -q && apt-get upgrade -y -q && \ apt-get install -y -q \ autoconf \ @@ -54,10 +59,13 @@ RUN apt-get update -y -q && apt-get upgrade -y -q && apt-get upgrade -y -q && \ curl "https://compiler-explorer.s3.amazonaws.com/opt/gcc-11.4.0.tar.xz" -o gcc11.tar.xz && \ curl "https://compiler-explorer.s3.amazonaws.com/opt/gcc-12.3.0.tar.xz" -o gcc12.tar.xz && \ curl "https://compiler-explorer.s3.amazonaws.com/opt/gcc-13.2.0.tar.xz" -o gcc13.tar.xz && \ + curl "https://s3.amazonaws.com/compiler-explorer/opt/gcc-trunk-20240122.tar.xz" -o "gcc-snapshot.tar.xz" && \ tar Jxvf gcc11.tar.xz && \ tar Jxvf gcc12.tar.xz && \ tar Jxvf gcc13.tar.xz && \ - rm gcc11.tar.xz gcc12.tar.xz gcc13.tar.xz + tar Jxvf gcc-snapshot.tar.xz && \ + mv gcc-trunk-20240122 gcc-trunk && \ + rm gcc11.tar.xz gcc12.tar.xz gcc13.tar.xz gcc-snapshot.tar.xz ## Need for host GCC version to be ~= latest cross GCC being built. ## This is at least needed for building cross-GNAT (Ada) as the GNAT runtime has no diff --git a/build/build.sh b/build/build.sh index f9fd3b0..8fad2ac 100755 --- a/build/build.sh +++ b/build/build.sh @@ -65,7 +65,11 @@ fi # We need to pick one as close as possible to the GCC version being built because of GNAT (Ada). # It needs a matching compiler to build the runtime. Too old or too recent may cause build errors. -# Kind of heuristic to find a "good" GCC version. Not perfect, but should do the work +# Kind of heuristic to find a "good" GCC version. Not perfect, but should do the +# work. Starts by checking for a matching version host compiler X.Y.Z, then for +# any X.Y and finally for any X. If nothing matches, then it uses the default +# one (see Dockerfile). +# This works for X.Y.Z but also for "trunk". V=${BASEVERSION} for i in 1 2 3; do F=0