Here are my steps/hacks for g++:



1) Build and configure everything as you normally
would using uClibc-0.9.28.3 (gcc-3.4.4) but go to
tools/or32-uclinux/or32-uclinux/ and do this:
ln -s ../include sys-include
and go to tools/or32-uclinux/or32-uclinux/lib and do
this:
cp ../../lib/*.* .
!!BEFORE you re-build gcc the second time.

2)Second pass gcc configure add --with-newlib
--enable-languages=c,c++ but before you do go to
/music/vivace_c++/gcc-3.4.4/libstdc++-v3/configure.ac
and add this around DLOPEN:
if test "x${with_newlib}" != "xyes"; then
AC_LIBTOOL_DLOPEN
fi
The "newlib" line just tricks configure to skip the
tests.

3) Next go to
/music/vivace_c++/gcc-3.4.4/libiberty/strsignal.c
and change the arguments in psignal as follows:
void
psignal (signo, message)
/*unsigned*/int signo;
const char *message

4) Next add the following:
#define _U 01 //upper
#define _L 02 //lower
#define _N 04 //number
#define _S 010 //space
#define _P 020 //punctuation
#define _C 040 //control
#define _X 0100 //hex
#define _B 0200 //blank
to:
b-gcc/or32-uclinux/libstdc++-v3/include/or32-uclinux/bits/ctype_base.h

5) Then add the following:
char _ctype_[257];
to:
b-gcc/or32-uclinux/libstdc++-v3/include/or32-uclinux/bits/ctype_noninline.h
I didn't initialize _ctype_ we may have to if the
iostream stuff seg faults.

6) Last go to
b-gcc/or32-uclinux/libstdc++-v3/src/c++locale.cc and
remove the glibc dependendies:
_GLIBCXX_HAVE_STRTOF
_GLIBCXX_HAVE_FINITEF
_GLIBCXX_HAVE_FINITE
_GLIBCXX_HAVE_ISIN
I just commented them out for now and forced the
defaults, I had to this with the MIPs compiler too
newlib config line causes. We will have to fix this in
the future.

Things should build and you should be able to at least
build "hello world".

I plan to clean this up once we get it to work.
The hacks in the build area (b-gcc) really suck. I
borrowed most of the code ideas from the Nios guys.

Home