Getting started with building a GCC cross-compiler

Andrew Haley aph@redhat.com
Tue Nov 25 10:23:00 GMT 2008


Dave Nadler wrote:
> A bit of help needed, and much appreciated (Thanks
> to Brian and Andrew for clues already provided)...
> 
> Background:
> I'm trying to build a cygwin cross-compiler for MIPS.
> Why ? Our chip vendor provided a GCC C, but no C++.

Right, so you have a C library and all its headers.

> I've got a lot of C++ code I'd like to run on the part.
> The vendor released per GPL the sources they used.
> I'm using 3.4.4 as the build compiler, and the
> vendor-provided source for the cross-compiler is also
> 3.4.4-based.
> 
> Other background:
> In decades past I have written compilers, and I have
> adapted another C++ compiler to run bare-metal and
> later on an embedded OS I wrote. Thus the low-level
> concepts are all very familiar, but I'm just starting
> to learn about GCC.
> 
> So far:
> I have, despite a snarl of dependency traps, stuff
> not distributed via cygwin (or distributed non-working)
> and guile-less... never mind. So far, I have built a
> cross-compiler that compiles C++ OK, and for trivial
> test classes runs C++ on my target hardware. I've included
> the configure parameters below (provided by the vendor
> and mostly matching that reported by gcc -v, which is
> also reported below as requested by Andrew).
> 
> I'm confused about the supporting libraries.
> 
> I hoped (OK, wished) that "make" would create a ready-
> to-package cross-compiler including:
> - executables (OK so far)
> - set of libraries for the target (built by running the
>   newly-built cross-compiler)
> - the set of include files required for the selected
>   language targets

> I hoped that the includes/libraries would implement
> C and C++ as possible bare-metal. That is, minus file
> IO etc. or with harmless stubs to be replaced later
> as needed. The vendor has the bare metal adaption for
> malloc-level utilities in libgcc.
> 
> While I did get a complete set of executables from
> the make, I didn't get libgcc, libstdc++, nor did I get
> the include files. What am I missing here ?

I have no idea.  If I had access to your build tree I'd have a look.

The output of configure will tell you if libstdc++ is being built.
Give us that output.

Did you do "make install"?  What did you get?

Andrew.



More information about the Gcc-help mailing list