More fun building uClibc++, or failing to.

Rob Landley rob at landley.net
Mon Nov 3 05:44:25 UTC 2008


So I figured out that in order cross compile libsupc++ for the target, I need 
to:

A) Add base c++ support to my cross compiler (--enable-languages=c,c++ and a 
few more configure flags, but still just build all-gcc and install-gcc).
B) Add CXX_FOR_TARGET="${ARCH}-g++"  to my list of target overrides for the 
gcc ./configure.
C) Apply the attached patch to fix a blatant won't cross compile stupidity in 
the g++ 4.1.2 ./configure (and no, you can't work around it with a configure 
cache, it's not _checking_ that).
D) After building all-gcc and install-gcc for the target, then make 
configure-target-libstdc++-v3
E) cd into $ARCH-unknown-linux/libstdc++-v3 and "make" in there.
F) cp .libs/libsuptc++.a out of there.

Simple, piece of cake.

Now the problem is that the uClibc++ build is breaking:

WRAPPER_INCLUDEDIR=-I../include ../bin/g++-uc  -Wall -Wno-trigraphs -pedantic   -ansi  -Os -fPIC -o 
valarray.o -c valarray.cpp
../include/cmath: In function 'long double std::abs(long double)':
../include/cmath:130: error: 'fabsl' was not declared in this scope
../include/cmath: In function 'long double std::acos(long double)':
../include/cmath:133: error: 'acosl' was not declared in this scope
../include/cmath: In function 'long double std::asin(long double)':
../include/cmath:136: error: 'asinl' was not declared in this scope
../include/cmath: In function 'long double std::atan(long double)':

And rather a lot more.

The missing functions are:

fabsl, acosl, asinl, atanl, atan2l, ceill, cosl, coshl, expl, fabsl,
floorl, frexp, frexpl, fmodl, ldexpl, logl, log10l, modfl,
powl, sinl, sinhl, sqrtl, tanl, tanhl.

It #includes <math.h> but they're not in it.  The host version of cmath has 
lots of __builtin_fabsl(__x); and such, dealing with gcc having this stuff 
built in apparently?

I'm out of my depth.  Any ideas?

Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-g++-is-stupid.patch
Type: text/x-diff
Size: 502 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20081103/53f3a8bd/attachment.bin 


More information about the uClibc mailing list