FW: GCC Cross Compiler for cygwin

James E Wilson wilson@specifixinc.com
Fri Apr 29 04:06:00 GMT 2005


Amir Fuhrmann wrote:
> checking whether byte ordering is bigendian... cross-compiling...
> unknown
> checking to probe for byte ordering... /usr/local/powerpc-eabi/bin/ld: warning: cannot find entry symbol _start; defaulting to 01800074

Looking at libiberty configure, I see it first tries to get the 
byte-endian info from sys/params.h, then it tries a link test.  The link 
test won't work for a cross compiler here, so you have to have 
sys/params.h before building, which means you need a usable C library 
before starting the target library builds.  But you need a compiler 
before you can build newlib.

You could try doing the build in stages, e.g. build gcc only without the 
target libraries, then build newlib, then build the target libraries. 
Dan Kegel's crosstool scripts do something like this with glibc for 
linux targets.

Or you can do a combined tree build which will work for embedded targets 
and is simpler, i.e. put newlib inside the gcc source tree, as a sister 
directory to libiberty and libstdc++.  This is what most of us 
developers do.  In this case, newlib will be auto-detected and built 
after gcc and before libstdc++, and used when configuring the target 
libiberty.

You can also put other stuff in the combined tree, like binutils and 
gdb, but if you aren't using the head of the CVS trees, you may need to 
resolve conflicts.  See for instance
     http://gcc.gnu.org/simtest-howto.html
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc mailing list