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
--- gcc-g++/libstdc++-v3/configure	2007-01-29 04:51:01.000000000 -0600
+++ gcc-g++2/libstdc++-v3/configure	2008-11-02 03:46:15.000000000 -0600
@@ -7947,7 +7947,7 @@
 
   echo "$as_me:$LINENO: checking for thread model used by GCC" >&5
 echo $ECHO_N "checking for thread model used by GCC... $ECHO_C" >&6
-  target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
+  target_thread_file=posix
   echo "$as_me:$LINENO: result: $target_thread_file" >&5
 echo "${ECHO_T}$target_thread_file" >&6
 
_______________________________________________
uClibc mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/uclibc

Reply via email to