Skip to content

Instantly share code, notes, and snippets.

@Xrayez
Last active April 16, 2023 12:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Xrayez/be9f7337d74554faf0b807b7380bf5eb to your computer and use it in GitHub Desktop.
Save Xrayez/be9f7337d74554faf0b807b7380bf5eb to your computer and use it in GitHub Desktop.
Build the latest MinGW toolchain
#!/bin/bash
#
# Build the latest MinGW toolchain
#
# WARNING: this is just a list of steps and not an actual script, some steps could work though...
#
# Download MXE
git clone https://github.com/mxe/mxe.git && cd mxe
# MXE Requirements
sudo apt-get --yes --force-yes install \
autoconf \
automake \
autopoint \
bash \
bison \
bzip2 \
flex \
g++ \
g++-multilib \
gettext \
git \
gperf \
intltool \
libc6-dev-i386 \
libgdk-pixbuf2.0-dev \
libltdl-dev \
libssl-dev \
libtool-bin \
libxml-parser-perl \
make \
openssl \
p7zip-full \
patch \
perl \
pkg-config \
python \
ruby \
sed \
unzip \
wget \
xz-utils
# Build gcc for 64/32 bits
make update-package-gcc
make gcc pkgconf MXE_TARGETS='x86_64-w64-mingw32.static.posix i686-w64-mingw32.static.posix'
# Let Scons know about it
export MINGW32_PREFIX="mxe/usr/bin/i686-w64-mingw32.static.posix-"
export MINGW64_PREFIX="mxe/usr/bin/x86_64-w64-mingw32.static.posix-"
# You may also need to add the toolchain to PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment