Commit 0e2d338f authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

win64: compile gcc & mingw ourselves

parent e2b0896f
FROM registry.videolan.org:5000/videolan-base-sid:latest
RUN apt-get update && apt-get -y install \
gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64-tools lua5.2-dev \
lua5.2 libtool automake autoconf autopoint make gettext pkg-config \
qt4-dev-tools qt4-default git subversion cmake cvs libwine-dev \
wine-development wine zip nsis bzip2 p7zip-full wget dos2unix ragel \
yasm g++ protobuf-compiler m4 ant build-essential libtool-bin \
gcc-mingw-w64-i686 g++-mingw-w64-i686 && \
RUN apt-get update -qq && apt-get install -qqy \
git wget bzip2 file libwine-dev unzip libtool pkg-config cmake \
build-essential automake texinfo ragel yasm p7zip-full autopoint gettext && \
apt-get clean -y && rm -rf /var/lib/apt/lists/*
ENV TARGET_TUPLE=x86_64-w64-mingw32
ENV TOOLCHAIN_PREFIX=/opt/gcc-$TARGET_TUPLE
ENV MINGW_PREFIX=$TOOLCHAIN_PREFIX/$TARGET_TUPLE
ENV PATH=$TOOLCHAIN_PREFIX/bin:$PATH
ENV GCC_VERSION=6.2.0
ENV BINUTILS_VERSION=2.27
RUN cd /build && \
mkdir $TOOLCHAIN_PREFIX && \
mkdir $MINGW_PREFIX && \
ln -s $MINGW_PREFIX $TOOLCHAIN_PREFIX/mingw && \
wget -q http://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS_VERSION.tar.bz2 && \
wget -q ftp://ftp.uvsq.fr/pub/gcc/releases/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.bz2 && \
git config --global user.name "VideoLAN Buildbot" && \
git config --global user.email buildbot@videolan.org && \
git clone --depth=1 git://git.code.sf.net/p/mingw-w64/mingw-w64 && \
tar xf gcc-$GCC_VERSION.tar.bz2 && \
tar xf binutils-$BINUTILS_VERSION.tar.bz2 && \
cd binutils-$BINUTILS_VERSION && mkdir build && cd build && \
../configure --prefix=$TOOLCHAIN_PREFIX --target=$TARGET_TUPLE \
--disable-werror --disable-multilib && make -j4 && make install && \
cd /build/mingw-w64/mingw-w64-headers && mkdir build && cd build && \
../configure --prefix=$MINGW_PREFIX \
--host=$TARGET_TUPLE --enable-secure-api && make install && \
cd /build && \
wget -q http://www.mpfr.org/mpfr-current/mpfr-3.1.5.tar.gz && \
wget -q https://gmplib.org/download/gmp/gmp-6.1.1.tar.xz && \
wget -q ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz && \
tar xf mpfr-3.1.5.tar.gz && \
tar xf gmp-6.1.1.tar.xz && \
tar xf mpc-1.0.3.tar.gz && \
ln -s /build/mpfr-3.1.5 gcc-$GCC_VERSION/mpfr && \
ln -s /build/gmp-6.1.1 gcc-$GCC_VERSION/gmp && \
ln -s /build/mpc-1.0.3 gcc-$GCC_VERSION/mpc && \
cd gcc-$GCC_VERSION && mkdir build && cd build && \
../configure --prefix=$TOOLCHAIN_PREFIX \
--target=$TARGET_TUPLE \
--enable-languages=c,c++ \
--disable-shared \
--disable-multilib && \
make -j4 all-gcc && \
make install-gcc && \
cd /build/mingw-w64/mingw-w64-crt && \
mkdir build && cd build && \
../configure --prefix=$MINGW_PREFIX \
--host=$TARGET_TUPLE && \
make -j4 && \
make install && \
cd /build/gcc-$GCC_VERSION/build && \
make -j4 && \
make install && \
cd /build/mingw-w64/mingw-w64-tools/widl && \
mkdir build && cd build && \
../configure --prefix=$TOOLCHAIN_PREFIX --target=$TARGET_TUPLE && \
make -j4 && \
make install && \
cd / && rm -rf /build
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment