I was following http://www.openrisc.net/toolchain-build.html to learn how to setup cross compiler toolchain. and have gone down to rebuilding uClibc and found the library files are not installed in ${SYSROOT}/usr/lib correctly. (only 5 out of 8 files are copied anyhow) So I tried to do it over from scratch and now I'm stuck in compiling gcc for the first pass..
I previously installed gmp, mpfr and mpc. they were installed under /usr/local. (the headers are in /usr/local/include and the libraries are in /usr/local/lib) So for the gcc compile, I ran (at gcc-build directory)
../gcc-svn/configure --target=or32-linux --prefix=$PREFIX --disable-libssp --srcdir=../gcc-svn --enable-languages=c -- without-headers --enable-threads=single --disable-libgomp --disable-libmudflap --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local
and ran
make
and it gives me this error message (showing the error part) checking for suffix of object files... configure: error: in /home/ckim/openrisc/toolchain/gcc-build/or32-linux/libgcc': configure: error: cannot compute suffix of object files: cannot compile Seeconfig.log' for more details. make[1]: * [configure-target-libgcc] Error 1 make[1]: Leaving directory `/home/ckim/openrisc/toolchain/gcc-build' make: * [all] Error 2
so I looked into /home/ckim/openrisc/toolchain/or32-linux/libgcc/config.log file. The errored part shows this. (full log file is at http://pastebin.com/6HdfrqBy)
....
configure:3020: /home/ckim/openrisc/toolchain/gcc-build/./gcc/xgcc -B/home/ckim/openrisc/toolchain/gcc-build/./gcc/ - B/home/ckim/openrisc/toolchain/or32-linux/bin/ -B/home/ckim/openrisc/toolchain/or32-linux/lib/ -isystem /home/ckim/openrisc/toolchain/or32-linux/include -isystem /home/ckim/openrisc/toolchain/or32-linux/sys-include -o conftest -g -O2 conftest.c >&5 /home/ckim/openrisc/toolchain/gcc-build/./gcc/as: line 83: exec: : not found configure:3023: $? = 1 configure:3211: checking for suffix of object files configure:3233: /home/ckim/openrisc/toolchain/gcc-build/./gcc/xgcc -B/home/ckim/openrisc/toolchain/gcc-build/./gcc/ - B/home/ckim/openrisc/toolchain/or32-linux/bin/ -B/home/ckim/openrisc/toolchain/or32-linux/lib/ -isystem /home/ckim/openrisc/toolchain/or32-linux/include -isystem /home/ckim/openrisc/toolchain/or32-linux/sys-include -c -g -O2 conftest.c >&5 /home/ckim/openrisc/toolchain/gcc-build/./gcc/as: line 83: exec: : not found configure:3237: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "GNU C Runtime Library" | #define PACKAGE_TARNAME "libgcc" | #define PACKAGE_VERSION "1.0" | #define PACKAGE_STRING "GNU C Runtime Library 1.0" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "http://www.gnu.org/software/libgcc/" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:3251: error: in `/home/ckim/openrisc/toolchain/gcc-build/or32-linux/libgcc': configure:3254: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. searching the message shows it may be related to not having gmp, mfpr, mpc library. It's Cento6.4. building outside the source, have LD_LIBRARY_PATH and LIBRARY_PATH have /usr/local/lib (for gmp, mpfr and mpc). tried adding --program-prefix=or32-linux, tried after removing all the files.. Can anyone give me some light on this?