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]
Other format: [Raw text]

Re: crosstools and uclibc


On Thu, Jun 10, 2004 at 08:49:39AM -0700, Dan Kegel wrote:
> Vladimir wrote:
> >I am new to cross-platform compilation. I downloaded crosstools today,
> >and was happy to  discover that it built a working (at least on initial
> >inspection) cross compiler from x86 linux (redhat9) to a powerpc
> >architecture (board with linux running on a motorola 855 cpu). Now, I am
> >interested in using uclibc for my cross-platform development because the
> >c++ support seems to fit into a much smaller footprint than the default
> >libstdc++ stuff. Would anyone here be able to point me in the right 
> >direction to accomplish this?
> 
> Ah, does uclibc have its own standard c++ library?  I didn't know that.

Nope, it uses gcc's libstdc++.  But, with Manuel's nice new uClibc
patches for gcc (which are included in the referenced patch below),
the produced libstdc++ will have only those features supported by
the underlying uClibc.  So if you configure your uClibc without
locale support, then libstdc++ will be lacking it as well.  Same for
wide-char, and a few other of the normal C++ features.  This provides
a means to slim down libstdc++ significantly, if your target won't be
needing those features, which is common in embedded work.

> In any case, there's a patch for (a slightly old snapshot of) crosstool
> to add uclibc support.  See contrib/crosstool-uclibc-0.28-rc5.patch
> It should apply to http://kegel.com/crosstool/crosstool-0.28-rc5.tar.gz

Unfortunately, it also requires a slightly old version of uClibc.  The
current patch will only correctly apply to uClibc-0.9.23, which is
somewhere in the neighborhood of 7 to 8 months old now.  If you'd like
to use crosstool with a newer version of uClibc, send me an e-mail
saying "Yes, I want to use crosstool with newer uClibc's!".  The more
of those I get, the higher it gets bumped up in the priority queue.
Number of those e-mails I've gotten so far: zero.

> Good luck!  Some assembly required :-)

Also remember to apply the crosstool patch Dan referenced *before* you
download and unpack gcc, binutils, and uClibc.  The crosstool patch
contains embedded patches that must be applied to gcc, binutils, and
uClibc for everything to work.  Crosstool will very cleverly do all
that patching for you if you also let it do the download and unpack.
If you download and unpack first, you must poke through crosstool's
patches directory, pick out, and apply the appropriate patches by hand.


                             ------Carl


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


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