[uClibc]C++ support

David McCullough davidm at snapgear.com
Mon Apr 15 00:30:31 UTC 2002


Jivin spudmonkey at racsa.co.cr lays it down ...
> Hello, again,
> 
> I would still like to get support for libstdc++ with uClibc.  It hasn't 
> been my highest priority (it will be someday), but I've been looking 
> around little bit.  And to me, the situation looks like:
> 
> 1. libstdc++ is HUGE!
> 
> 2. libstdc++ depends (among other things) on libio.a and libstream.a.
> 
> 3. In gcc-2.95.3, if you build a *-linux-gnu target, it assumes that 
> these archives are not needed, rather, that libio.a and libstream.a 
> functionality will be provided by glibc.
> 
> 4. If you muck with gcc-2.95.3's makefile fragments, you can coerce it 
> to (try to) build libio.a and libstream.a using the source under the 
> gcc/libio directory.  But, the build fails because the glibc header 
> files are out of sync with the libio source code*.  Furthermore, it 
> appears the libio code depends upon acess to glibc "back door" 
> functions (especially if you want multi-threaded support).
> 
> The gcc-2.95.3 libio also looks like it lacks large file support 
> (hence, most of the incompatibility with the header files).
> 
> [[ *I can actually get libio and libstream to build if I get the right 
> libio.h and libioP.h from the CVS attic.  I needs versions that are 
> over 3 years old! ]]



If you look at the m68k-elf-tools,  they built the compiler and all the
libraries against uClibc, The build script shows you how to do it.

	http://www.uclinux.org/pub/uClinux/m68k-elf-tools/tools-20020410/


The tools/libraries are built completely against uClibc,  although it's
a month or more out of date now it's still close to the current sources.
It uses binutils 2.10 and gcc 2.95.5.

At least this should be a reasonable example of how to get a full C++ gcc
installation based on uClibc.


> 5. In gcc-3.0.x, libio has been completely removed from the compiler 
> and is only availabe with glibc (Is this true?).


No idea. m68k support in gcc-3 is a little way off to my knowledge so I
haven't looked at it :-)


> Finally, the question(s):  Am I on track?  Is this consistent with your 
> understanding?  Has anyone put any effort into creating a uClibc aware 
> libio?  Maybe a "uClibio?"  Has anyone thought about a smaller 
> libstdc++? Would anyone be interested in collaborating in such efforts?


In my experience, very little change should be needed to pull this off.
Of course the gcc x86 target may be strange beyond repair ;-)

Cheers,
Davidm

-- 
David McCullough:    Ph: +61 7 3435 2815  http://www.SnapGear.com
davidm at snapgear.com  Fx: +61 7 3891 3630  825 Stanley St., W'gabba QLD 4102, Oz



More information about the uClibc mailing list