Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Scripts for building the dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows
Perl Shell C++ C
tree: 2f511e71ad

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
licenses
patches
scripts
tests
COPYING.TXT
README
build

README

The scripts provided by the MinGW-builds project[1][2] are designed
for building the dual-target(i686/x86_64) MinGW compiler for i686/x86_64 hosts.

The scripts are distributed under the 'BSD 3' license[3].

In order to use the scripts provided by the MinGW-builds project it is needed:

1. Windows-64bit or Linux+Wine-64bit

2. Install MSYS:
  http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/

3. Get the scripts into '<msys root>/home/<user>/mingw-builds':
  "cd && git clone git://github.com/niXman/mingw-builds.git"

4. In the MSYS file structure delete the '/MinGW' directory.

5. Delete the paths pointining to any preinstalled MinGW from the 'PATH'
  environment variable.

6. Go in to the MinGW-builds root directory.
  "cd && cd mingw-builds"

7.
  The '--buildroot=<path>' option specifies to the script to use '<path>' as build directory.
    By default used MSYS user home directory.
  The '--preload' option specifies to the script to pre-download all the sources
    and only after that, to begin the building. This allows to build different
    versions of GCC simultaneously.
  The '--download' option specifies to the script to download only the sources.
  The '--dwarf' option specifies to the script to use DWARF exeptions handling
    instead of SJLJ. This allows building for i686 host only, and i686 target only.
  The '--use-lto' option specifies to the script to build with using LTO.
  The '--no-strip' option specifies to the script to install without striping.
  The '--no-multilib' option specifies to the script to build without multilib support.
  The '--dyn-deps' option specifies to the script to build GCC with dynamically dependencies.
  The '--rev=N' option specifies to the script the number of the build revision.
  The '--threads=model' option specifies to the script the used threads model.
  For more options please run: "./build --help"

8. Run:
  "./build gcc-4.6.3 x32" for building i686-MinGW
  "./build gcc-4.6.3 x64" for building x86_64-MinGW
  "./build gcc-4.6.3 x32 x64" for building i686-MinGW and x86_64-MinGW
  "./build gcc-4.6.3 --preload x32 x64" for building i686-MinGW and x86_64-MinGW
  "./build gcc-4.6.3 --dwarf" for building i686-MinGW with DWARF exception handling

For example, during the process of building of the i686-gcc-4.6.3 will
  be created the following directories:
  /mingw-gcc-4.6.3-build-x32
  /mingw-gcc-4.6.3-libs-x32
  /mingw-gcc-4.6.3-logs-x32
  /mingw-gcc-4.6.3-x32

For x86_64:
  /mingw-gcc-4.6.3-build-x64
  /mingw-gcc-4.6.3-libs-x64
  /mingw-gcc-4.6.3-logs-x64
  /mingw-gcc-4.6.3-x64

And the sources directory:
  /mingw-src



The archives with the built MinGW will be created in '<msys root>/home/<user>/'

At the moment, successfully building the following versions:
  gcc-4.6.2
  gcc-4.6.3
  gcc-4.7.0
  gcc-4.7.1
  gcc-4.7.2
  gcc-4_6-branch (currently 4.6.4 prerelease)
  gcc-4_7-branch (currently 4.7.3 prerelease)
  gcc-trunk (currently 4.8.0 snapshot)

[1] http://code.google.com/p/mingw-builds/
[2] http://sourceforge.net/projects/mingwbuilds/
[3] http://www.opensource.org/licenses/BSD-3-Clause
Something went wrong with that request. Please try again.