MINGW32 from scratch
Setting up the toolchain
I prefer to place the crosscompiler in /opt/win32
create the directory as root:
binutils-2.18.50
Build:
Install as root:
Cleanup our mess:
To build gcc, certain headers are needed.
w32api-3.11 part 1
Unpack:
Install as root:
mingw-runtime-3.14 part 1
Unpack:
Install as root:
The compiler
gcc 4.3.1 needs gmp and mpfr as dependency, since I don't have these packages already on
my system I needed to install them. I use LFS and there everything is stored in /usr instead
of /usr/local so I have to use --prefix=/usr
gmp-4.2.2
Build:
Install as root:
Cleanup our mess:
mpfr-2.3.1
Build:
Install as root:
Cleanup our mess:
gcc 4.3.1 part 1
Build:
Install as root:
Cleanup our mess:
Now we have a minimalistic cross compiler. We only need to let it be found.
So add it to our path: (You should edit your scripts to make it permanent.)
With this compiler we can build the necessary API and runtime, which at their turn are
needed to build the complete compiler.
w32api-3.11 part 2
Build:
Install as root:
Cleanup our mess:
mingw-runtime-3.14 part 2
Build:
Install as root:
Cleanup our mess:
gcc 4.3.1 part 2
Build:
Install as root:
Cleanup our mess: