diff options
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0b59d6d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,59 @@ +FROM debian:stable +ARG PREFIX=/usr/local/x86_64-w64-mingw32 +ENV PATH=$PREFIX/bin:$PATH +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \ + build-essential \ + git \ + texinfo \ + wget + +# binutils +WORKDIR /src +RUN wget https://ftp.gnu.org/gnu/binutils/binutils-2.43.tar.xz +RUN tar -xf binutils-2.43.tar.xz +WORKDIR build-binutils +RUN ../binutils-2.43/configure \ + --prefix=$PREFIX \ + --target=x86_64-w64-mingw32 \ + --disable-multilib +RUN make -j$(nproc --all) +RUN make install + +# mingw-headers +WORKDIR /src +RUN git clone https://git.code.sf.net/p/mingw-w64/mingw-w64 mingw-w64 +WORKDIR build-mingw-headers +RUN ../mingw-w64/mingw-w64-headers/configure \ + --host=x86_64-w64-mingw32 \ + --prefix=$PREFIX/x86_64-w64-mingw32 +RUN make install + +# gcc core +WORKDIR /src +RUN wget https://ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz +RUN tar -xf gcc-14.2.0.tar.xz +WORKDIR gcc-14.2.0 +RUN ./contrib/download_prerequisites +WORKDIR /src/build-gcc +RUN ../gcc-14.2.0/configure \ + --prefix=$PREFIX \ + --target=x86_64-w64-mingw32 \ + --disable-multilib \ + --enable-languages=c,c++ +RUN make -j$(nproc --all) all-gcc +RUN make install-gcc + +# mingw-w64 CRT +WORKDIR /src/build-mingw-w64-crt +RUN ../mingw-w64/configure \ + --host=x86_64-w64-mingw32 \ + --prefix=$PREFIX/x86_64-w64-mingw32 +# The documentation suggests a race condition when -j is used. +RUN make +RUN make install + +# gcc (finish build) +WORKDIR /src/build-gcc +RUN make -j$(nproc --all) +RUN make install |
