1 Crude instructions on how to build Nios GCC 4.1 toolchain with libstdc++ w/POSIX threads
2 ========================================================================================
3 Warning! GCC 4.1 is a bit rough around the edges, so if you can get hold of
4 a binary GCC toolchain, you'll save yourself quite a bit of time.
7 1. First build eCos w/POSIX threads
14 nios2configgen --ptf=/home/oyvind/workspace/nios2ecos/neek/neek.ptf --cpu=cpu
15 ecosconfig new nios2_neek default
16 ecosconfig import $NIOS_ECOS/../tools/gcc4libstdxx/headers.ecm
21 NB!!!! the nios2ecos make files are broken in that "make headers" does not create
26 sudo apt-get install gobjc++
27 tar -xjvf src/binutils-4.1-176.tar.bz2
29 export PATH=`pwd`/install/bin:$PATH
32 ../binutils-2.17.50/configure --prefix=`pwd`/../install --target=nios2-elf --disable-shared --disable-werror
36 if you get error message about missing elf32-target.h, type:
42 2. Build GCC using eCos header files
44 tar -xjvf src/gcc-4.1-176.tar.bz2
47 ../gcc-4.1/configure --prefix=`pwd`/../install --target=nios2-elf --enable-languages=c,c++ --with-gnu-ld --disable-shared --disable-nls --enable-threads=posix --with-gnu-as --enable-libstdcxx-allocator=malloc --enable-cstdio=stdio --with-newlib --disable-unix98 --with-headers=`pwd`/../ecos/install/include --enable-multilib --disable-libstdcxx-pch --enable-sjlj-exceptions --disable-werror
50 Problems: c++locale.c does has fallback code for strtof that isn't supported, modify c++locale.c to #if 0 the strtof path.
55 ../gdb-wrs/configure --prefix=`pwd`/../install --target=nios2-elf --disable-shared --disable-werror