Source code of the compiler bundled with Haiku
==============================================

Haiku's release (Haiku.zip) bundles, in Haiku\setup\w64devkit, a part of
w64devkit 2.11.0 (x64, https://github.com/skeeto/w64devkit), unchanged:
GCC 16.2.0 and GNU Binutils 2.47 (GNU GPL version 3), whose cc1.exe has
GMP 6.3.0, MPFR 4.2.2 and MPC 1.4.1 (GNU LGPL version 3) linked in
statically, and the MinGW-w64 v14.0.0 runtime and headers. This zip is
their Corresponding Source, offered under section 6(d) of the GPL version
3 beside Haiku.zip on the same release page. Haiku's LICENSES\Toolchain.txt
says the same.

The files
---------

gcc-16.2.0.tar.xz          GCC 16.2.0, the GNU Compiler Collection
                           (gcc, cc1, collect2, lto-wrapper, libgcc).
binutils-2.47.tar.xz       GNU Binutils 2.47 (as, ld, ar).
gmp-6.3.0.tar.xz           GMP 6.3.0, linked into cc1.
mpfr-4.2.2.tar.xz          MPFR 4.2.2, linked into cc1.
mpc-1.4.1.tar.xz           MPC 1.4.1, linked into cc1.
mingw-w64-v14.0.0.tar.bz2  MinGW-w64 v14.0.0: the Windows headers, the C
                           runtime's startup code and import libraries,
                           libmingwex, winpthreads.
w64devkit-2.11.0-src.tar.gz
                           w64devkit 2.11.0's own source: its Dockerfile,
                           which is the complete build script, and the
                           patch series it applies (src/binutils, src/gcc,
                           src/gcc-final, src/mingw).
SHA256SUMS                 the SHA-256 of each. The upstream tarballs'
                           are the ones w64devkit's Dockerfile checks when
                           it downloads them.

They are the upstream releases, unmodified: gcc, binutils, gmp, mpfr and
mpc from the GNU project (https://ftp.gnu.org/gnu/), mingw-w64 from
https://sourceforge.net/projects/mingw-w64/.

How w64devkit builds them
-------------------------

Unpack w64devkit-2.11.0-src.tar.gz and build its Dockerfile, as its
README describes:

    docker build -t w64devkit .
    docker run --rm w64devkit >w64devkit-x64.exe

The Dockerfile downloads these same tarballs, checking each against the
SHA-256 in SHA256SUMS, unpacks them, applies each patch series with quilt
in the order of its series file, and configures and builds, in order:
Binutils and GCC as a cross compiler, the MinGW-w64 headers, CRT and
winpthreads, then Binutils, GMP, MPFR, MPC and GCC again as native Windows
programs (x86_64-w64-mingw32). The result is the w64devkit 2.11.0 release
whose files Haiku bundles.

Licences: GCC and Binutils are under the GNU GPL version 3 (COPYING3 in
their tarballs), GMP, MPFR and MPC under the GNU LGPL version 3,
MinGW-w64's runtime under the licences in its COPYING files, and
w64devkit under the Unlicense.
