Steps for building MIPS toolchains for windows

From Dmz-portal

Jump to: navigation, search

Step 1. Use a Linux machine as the build machine, and make sure i586-mingw32msvc-* toolchains are installed.

 linux-raghu-2:~> ls /usr/bin/i586*
 /usr/bin/i586-mingw32msvc-addr2line       /usr/bin/i586-mingw32msvc-gcov
 /usr/bin/i586-mingw32msvc-ar              /usr/bin/i586-mingw32msvc-gprof
 /usr/bin/i586-mingw32msvc-as              /usr/bin/i586-mingw32msvc-ld
 /usr/bin/i586-mingw32msvc-c++             /usr/bin/i586-mingw32msvc-nm
 /usr/bin/i586-mingw32msvc-cc              /usr/bin/i586-mingw32msvc-objcopy
 /usr/bin/i586-mingw32msvc-c++filt         /usr/bin/i586-mingw32msvc-objdump
 /usr/bin/i586-mingw32msvc-cpp             /usr/bin/i586-mingw32msvc-ranlib
 /usr/bin/i586-mingw32msvc-dlltool         /usr/bin/i586-mingw32msvc-readelf
 /usr/bin/i586-mingw32msvc-dllwrap         /usr/bin/i586-mingw32msvc-size
 /usr/bin/i586-mingw32msvc-g++             /usr/bin/i586-mingw32msvc-strings
 /usr/bin/i586-mingw32msvc-gcc             /usr/bin/i586-mingw32msvc-strip
 /usr/bin/i586-mingw32msvc-gcc-4.2.1-sjlj  /usr/bin/i586-mingw32msvc-windmc
 /usr/bin/i586-mingw32msvc-gccbug          /usr/bin/i586-mingw32msvc-windres

Step 2. Build MIPS cross-toolchain on Linux.

 # Assume you already build GMP, MPFR, MPC libraries for Linux.
 linux-raghu-2:~/dev/gcc-mainline> mkdir build-cross
 linux-raghu-2:~/dev/gcc-mainline> cd build-cross
 linux-raghu-2:~/dev/gcc-mainline/build-cross> ../combined/configure --target=mips-mti-elf --prefix=/home/fu/dev/gcc-mainline/install-cross --with-mpfr=/home/fu/dev/install-raghu --with-gmp=/home/fu/dev/install-raghu --with-mpc=/home/fu/dev/install-raghu --enable-languages=c,c++ --disable-fixed-point
 linux-raghu-2:~/dev/gcc-mainline/build-cross> make -j4
 linux-raghu-2:~/dev/gcc-mainline/build-cross> make install -j4

Step 3. Build MIPS canadian-toolchain on Linux.

 # Assume you already build GMP, MPFR, MPC libraries for Windows.
 # Modify path to include MIPS cross-toolchain that we just build
 linux-raghu-2:~/dev/gcc-mainline> set path=(/home/fu/dev/gcc-mainline/install-cross/bin $path)
 linux-raghu-2:~/dev/gcc-mainline> mkdir build-canadian
 linux-raghu-2:~/dev/gcc-mainline> cd build-canadian
 linux-raghu-2:~/dev/gcc-mainline/build-canadian> ../combined/configure --target=mips-mti-elf --host=i586-mingw32msvc --prefix=/home/fu/dev/gcc-mainline/install-canadian --with-mpfr=/home/fu/dev/install-ming --with-gmp=/home/fu/dev/install-ming --with-mpc=/home/fu/dev/install-ming --enable-languages=c,c++ --disable-fixed-point
 linux-raghu-2:~/dev/gcc-mainline/build-canadian> make -j4
 linux-raghu-2:~/dev/gcc-mainline/build-canadian> make install -j4
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox