I am trying to configure and build a cross compiler for my operating system, Arcrascent. I have thoroughly read the Wiki page for OS Specific Toolchain. I have followed every instruction in the wiki for all the utilities (at least i believe so).
So after modifying the source codes to add support for Arcrascent, I created the following script to build the cross compiler.
Code: Select all
# varaibles
export SYSROOT=$HOME/arcrascent
export PREFIX=$SYSROOT
export TARGET=i386-arcrascent
export PATH="$PREFIX/bin:$PATH"
# create root directory
mkdir $SYSROOT
# build binutils
mkdir make-binutils
cd make-binutils
../binutils-2.24/configure --target=$TARGET --prefix=$PREFIX
make all
make install
cd ..
# build gmp
mkdir make-gmp
cd make-gmp
../gmp-6.0.0a/configure --prefix=$PREFIX
make all
make install
make check
cd ..
# build mpfr
mkdir make-mpfr
cd make-mpfr
../mpfr-3.1.2/configure --prefix=$PREFIX --with-gmp=$SYSROOT
make all
make install
make check
cd ..
# build mpc
mkdir make-mpc
cd make-mpc
../mpc-1.0.3/configure --prefix=$PREFIX --with-gmp=$SYSROOT --with-mpfr=$SYSROOT
make all
make install
make check
cd ..
# build
mkdir make-gcc
# bootstrap
cd make-gcc
../gcc-4.9.2/configure --target=$TARGET --prefix=$PREFIX --without-headers --with-newlib --with-gmp=$SYSROOT --with-mpfr=$SYSROOT --with-mpc=$SYSROOT
make all-gcc
make install-gcc
cd ..
# build newlib
mkdir make-newlib
cd make-newlib
CC=$TARGET-gcc ../newlib-2.1.0/configure --prefix=$PREFIX --target=$TARGET
make all
make DESTDIR=${SYSROOT} install
cd ..
# rebuild gcc with newlib
rm -rf make-gcc
mkdir make-gcc
cd make-gcc
../gcc-4.9.2/configure --target=$TARGET --prefix=$PREFIX --with-newlib --enable-languages=c,c++ --with-gmp=$SYSROOT --with-mpfr=$SYSROOT --with-mpc=$SYSROOT --disable-dlopen
make all
make install
Code: Select all
checking for ISO C99 support to TR1 in <ctype.h>... no
checking for fenv.h... (cached) no
no
checking for ISO C99 support to TR1 in <stdint.h>... no
checking for ISO C99 support to TR1 in <math.h>... no
no
no
checking stdbool.h usability... no
checking stdbool.h presence... yes
configure: WARNING: stdbool.h: present but cannot be compiled
configure: WARNING: stdbool.h: check for missing prerequisite headers?
configure: WARNING: stdbool.h: see the Autoconf documentation
configure: WARNING: stdbool.h: section "Present But Cannot Be Compiled"
configure: WARNING: stdbool.h: proceeding with the compiler's result
checking for stdbool.h... no
checking stdalign.h usability... no
checking stdalign.h presence... yes
configure: WARNING: stdalign.h: present but cannot be compiled
configure: WARNING: stdalign.h: check for missing prerequisite headers?
configure: WARNING: stdalign.h: see the Autoconf documentation
configure: WARNING: stdalign.h: section "Present But Cannot Be Compiled"
configure: WARNING: stdalign.h: proceeding with the compiler's result
checking for stdalign.h... no
checking for the value of EOF... configure: error: computing EOF failed
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/home/arcrascent/Desktop/ArcSDK/make-gcc'
make: *** [all] Error 2
Thanks!