Last active
April 16, 2023 12:13
-
-
Save Xrayez/be9f7337d74554faf0b807b7380bf5eb to your computer and use it in GitHub Desktop.
Build the latest MinGW toolchain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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