Skip to content

Commit

Permalink
Orgranize the Dockerfile a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
mati865 committed Dec 24, 2023
1 parent 90d6684 commit 7ec2910
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:22.04

RUN apt-get update && DEBIAN_FRONTEND=noninteractive\
RUN apt-get update && DEBIAN_FRONTEND=noninteractive \
apt-get install -y build-essential gcc-multilib wget flex texinfo unzip help2man file gawk libtool-bin bison libncurses-dev zstd

WORKDIR /build
Expand All @@ -13,21 +13,27 @@ RUN tar xf ../crosstool-ng-*.tar* --strip-components 1

COPY 000*.patch .

RUN for i in *.patch;\
do patch -p1 -i "$i";\
RUN for i in *.patch; \
do patch -p1 -i "$i"; \
done

# bootstrap because of the new mingw-w64 version
RUN ./bootstrap && ./configure && make install

WORKDIR /build

# Toolchains targeting Windows hosted on Linux
RUN rm -rf crosstool-ng

COPY config.cross64 .config

RUN ct-ng build

COPY config.cross32 .config

RUN ct-ng build

# Toolchains targeting Windows hosted on Windows
COPY config.cross-native64 .config

RUN PATH=/root/x-tools/x86_64-w64-mingw32/bin:$PATH ct-ng build && \
Expand All @@ -36,10 +42,6 @@ RUN PATH=/root/x-tools/x86_64-w64-mingw32/bin:$PATH ct-ng build && \
rm -rf /root/x-tools-cross-native/HOST-x86_64-w64-mingw32/x86_64-w64-mingw32/x86_64-w64-mingw32/lib/lib* && \
tar -achf x86_64-w64-mingw32.tar.zst -C /root/x-tools-cross-native/HOST-x86_64-w64-mingw32 x86_64-w64-mingw32

COPY config.cross32 .config

RUN ct-ng build

COPY config.cross-native32 .config

RUN PATH=/root/x-tools/i686-w64-mingw32/bin:$PATH ct-ng build && \
Expand Down

0 comments on commit 7ec2910

Please sign in to comment.