RE: Building a cross-compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wenton L. Davis wrote:

> OK, this could very easily be the problem.  I was assuming this was 
> built as a part of the gcc build, but that does not appear to be the
> case.  But if the compiler needs libc to build, and libc is built
> by compiling.... which came first, the chicken or the egg?

You build the compiler in two halves; you run

    make all-gcc
    make install-gcc

to build the compiler but not its support libraries, and then you can use that to build a libc. Once you've built and installed libc you can restart your GCC build but it's probably safest to start a new build from scratch at that point. In your case 'make all-gcc' is probably a no-op from what you have, but I'm not sure you really want --enable-threads for mips-elf which is presumably an embedded target?

You probably want to fetch and build newlib, unless you're targeting a Linux system when you likely want glibc. In the first case you could instead do a combined tree build of GCC and newlib by adapting the instructions at http://gcc.gnu.org/simtest-howto.html, or in the latter - glibc - you can use the scripts at http://kegel.com/crosstool/. Of course if you already have libraries and headers for your target from somewhere else you should pass them to the compiler with --with-sysroot and it should already just work.

Good luck!
Rup.



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux