Downloading Files

1) Download and install Virtual Machine. Any modern virtual machine capable of making snapshots will do, for example VMware. This tutorial assumes Oracle VirtualBox because it's available free of charge.

2) Download Debian NetInst ISO: 10.5.0 for amd64 will do. We need it to build Linux API headers in native environment. Any other Linux with development tools will do, but we assume Debian 10.5.0 for amd64 in this tutorial.

3) Download source code for gcc, binutils, glibc and gdb from ftp://ftp.gnu.org/ . You should have determined versions of the software previously.

4) Download additional patch for glibc from this website. It is required to build glibc under Cygwin.

5) Download additional patch for binutils from this website. It is required to build binutils under MinGW.

6) Download additional patch for gdb from this website. It is required to build gdb under MinGW.

7) Download source code for libraries gcc depends on: gmp, mpfr and mpc. We will use gmp-6.1.2, mpfr-4.0.2 and mpc-1.1.0 and expat-2.2.9 in this tutorial, but generally latest versions of all of them is what you need.

8) Download source code for Linux kernel. It is required to supply Linux API headers to build glibc from. Ideally, you need to download kernel version reported by "uname -r" in the target system.


>> Read next section or buy already prepared cross-compiler (€10) to save your time.