This repository was archived by the owner on Dec 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
SDK
Astaelan edited this page Mar 31, 2012
·
3 revisions
Install MingW32 + MSYS with everything except ObjectiveC and Fortran. Run the shell, you should see similar to the following:
Administrator@shane-pc ~
$It is assumed you installed MingW32 to "C:\MinGW", and MSYS to "C:\MinGW\msys".
Copy all the tarballs you downloaded above, to "C:\MingW\msys\1.0\src", these will appear in "/usr/src" in the shell.
Extract each of the tarballs using the appropriate command:
cd /usr/src
tar jxvf binutils-2.21.1a.tar.bz2
tar jxvf gmp-5.0.2.tar.bz2
tar jxvf mpfr-3.1.0.tar.bz2
tar zxvf mpc-0.9.tar.gz
tar jxvf gcc-4.6.2.tar.bz2
tar zxvf newlib-1.19.0.tar.gzNext we will create the build directories for each of the packages we are building:
mkdir build-binutils build-gmp build-mpfr build-mpc build-gcc build-newlibFirst we need to set some environment variables:
export TARGET=i686-elf
export PREFIX=/usr/local/$TARGET
export PATH=$PATH:$PREFIX/bincd /usr/src/build-binutils
../binutils-2.21.1/configure --prefix=$PREFIX --target=$TARGET --disable-nls --disable-shared
make all
make installcd /usr/src/build-gmp
../gmp-5.0.2/configure --prefix=$PREFIX --disable-shared
make all
make installcd /usr/src/build-mpfr
../mpfr-3.1.0/configure --prefix=$PREFIX --disable-shared --with-gmp=$PREFIX
make all
make installcd /usr/src/build-mpc
../mpc-0.9/configure --prefix=$PREFIX --disable-shared --with-gmp=$PREFIX --with-mpfr=$PREFIX
make all
make installcd /usr/src/build-gcc
../gcc-4.6.2/configure --prefix=$PREFIX --target=$TARGET --disable-nls --disable-shared --with-gmp=$PREFIX --with-mpfr=$PREFIX --with-mpc=$PREFIX --without-headers --with-newlib --with-gnu-as --with-gnu-ld --enable-languages=c
make all-gcc
make install-gcccd /usr/src/build-newlib
../newlib-1.19.0/configure --prefix=$PREFIX --target=$TARGET --disable-nls --disable-shared --enable-newlib-iconv --enable-newlib-mb --enable-newlib-io-pos-args --enable-newlib-io-c99-formats --enable-newlib-register-fini --enable-newlib-io-long-long --enable-newlib-io-long-double --enable-newlib-hw-fp CFLAGS="-D__DYNAMIC_REENT__"
make all
make installcd /usr/src/build-gcc
../gcc-4.6.2/configure --prefix=$PREFIX --target=$TARGET --disable-nls --disable-shared --with-gmp=$PREFIX --with-mpfr=$PREFIX --with-mpc=$PREFIX --with-newlib --with-gnu-as --with-gnu-ld --disable-libssp --enable-languages=c
make all
make install