This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Cross compile error question: i686 to powerpc--linux-gnu


[...]
> Why does GCC need all of these libraries recompiled to
> output standard C code?  I can understand that the linker
> and assembler might need to know more about the hardware,
> but why is it so hard to get GCC to just spit out the
> right code to binutils?  The binutils has (seemingly) been
> the most painless up to this point.

You don't *have* to recompile all the libraries. If you want
to target Linux, it's normally easier to just steal binaries
from the target, if you happen to have them.

In your case, you should probably follow the FAQs but not
target Linux, because that's not what you want to do. I am
not a specialist of newlib, but I think what you'll want to
do is either add your board-specific bits to newlib, either
not use newlib at all (but that's probably not what you want
either. When you write C, you kind of expect things like
memcpy() to be there, and that's part of the library-what
newlib does. When you write C, you kind of expect printf()
to do some kind of output, and that's something newlib does
as well, provided you taught newlib out to speak... on your
specific board).

> Anyway...long story short...if we want to provide our own
> library support, do I NEED to go any further than making
> the bootstrap compiler?  I'm not going to use Linux, I'm
> not going to use GNU (most likely)...so, am I going too
> far in something I don't need to do?

If you try to build a powerpc-linux, yes you're going too
far, you probably want a powerpc-elf or something like that.
If you don't build anything further than the bootstrap
compiler, don't expect any standard library call to work.

Anyway, FWIW, and to answer Dave's wondering, arm--linux-gcc
builds _and_ work properly, producing ARM code. The wonders
of regular expressions :-)
Now I wonder what kind of other strange characters we can
embbed in the target name...

Cheers,
Yves



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]