This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Correct configure magic for building a MIPS cross compiler
- From: Alex Bennee <kernel-hacker at bennee dot com>
- To: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Tue, 04 Dec 2007 12:13:46 +0000
- Subject: Correct configure magic for building a MIPS cross compiler
Hi,
I'm trying to build a MIPS compiler for building kernels. Although the
linux-mips.org site specifies 3.4.2 I thought I'd try the latest stable
release. While googling I've seen people that seem to be using it but I
can't seem to get the correct configure magic for it.
Currently it fails building libmudflap which seems a little premature as
I'm guessing it needs a working cross compiler first:
make[2]: Leaving directory `/home/alex/src/mips/gcc/gcc-bootstrap/gcc'
Checking multilib configuration for libmudflap...
mkdir -p -- mips-unknown-linux-gnu/libmudflap
Configuring in mips-unknown-linux-gnu/libmudflap
configure: creating cache ./config.cache
checking build system type... x86_64-unknown-linux-gnu
checking host system type... mips-unknown-linux-gnu
^^^
-- Should this not be my host system, i.e. x86_64-unknown-linux-gnu
checking target system type... mips-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for
mips-unknown-linux-gnu-strip... /home/alex/src/mips/toolchain/mips-unknown-linux-gnu/bin/strip
checking for --enable-version-specific-runtime-libs... no
checking whether to enable maintainer-specific portions of Makefiles...
no
checking for
mips-unknown-linux-gnu-gcc... /home/alex/src/mips/gcc/gcc-bootstrap/./gcc/xgcc -B/home/alex/src/mips/gcc/gcc-bootstrap/./gcc/ -B/home/alex/src/mips/toolchain/mips-unknown-linux-gnu/bin/ -B/home/alex/src/mips/toolchain/mips-unknown-linux-gnu/lib/ -isystem /home/alex/src/mips/toolchain/mips-unknown-linux-gnu/include -isystem /home/alex/src/mips/toolchain/mips-unknown-linux-gnu/sys-include
checking for C compiler default output file name... configure: error: C
compiler cannot create executables
See `config.log' for more details.
make[1]: *** [configure-target-libmudflap] Error 1
make[1]: Leaving directory `/home/alex/src/mips/gcc/gcc-bootstrap'
make: *** [all] Error 2
Also should libmudflap be needed for building kernels?
My configure line is:
export PREFIX=/home/alex/src/mips/toolchain
export TARGET=mips-unknown-linux-gnu
export HOST=x86_64-unknown-linux-gnu
./gcc.4_2/configure --host=$HOST --target=$TARGET --prefix=$PREFIX
--enable-languages=c --with-gnu-ld --with-gnu-as --without-headers
--disable-shared --disable-threads
I have already build a binutils and it's installed in my toolchain dir.
I'm building from the GCC 4.2 SVN branch.
Any pointers?
--
Alex, homepage: http://www.bennee.com/~alex/
Whenever people agree with me I always feel I must be wrong. -- Oscar
Wilde