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.
6 Things to install... maybe?
8 apt-get install tetex-bin
12 0. Source code/downloads
13 See http://www.nioswiki.com for source code to GCC. It's part
14 of the Linux MMU distribution, surprise-surprise...
16 Source code, is this official address to get this??? Where is it advertised?
18 http://www.niosftp.com/pub/gnutools/
19 http://www.niosftp.com/pub/gnutools/wrs-linux-4.1-176-nios2-wrs-linux-gnu.src.tar.bz2
21 Prebuilt Ubuntu binaries:
23 http://opensource.zylin.com/gcc/binaries/nios/nios2-elf-gcc-4.1-pthreads-linux.tar.bz2
27 http://opensource.zylin.com/gcc/binaries/nios/nios2-elf-gcc-4.1-pthreads-cygwin.tar.bz2
31 1. First build eCos w/POSIX threads
35 # use modified POSIX module not yet in eCos CVS mainline
36 export ECOS_REPOSITORY=`pwd`/tools/gcc4libstdxx/ecos:$ECOS_REPOSITORY
41 nios2configgen --ptf=/home/oyvind/workspace/nios2ecos/neek/neek.ptf --cpu=cpu
42 ecosconfig new nios2_neek default
43 ecosconfig import $NIOS_ECOS/../tools/gcc4libstdxx/headers.ecm
48 NB!!!! the nios2ecos make files are broken in that "make headers" does not create
53 sudo apt-get install gobjc++
54 tar -xjvf src/binutils-4.1-176.tar.bz2
56 export PATH=`pwd`/install/bin:$PATH
59 ../binutils-2.17.50/configure --prefix=`pwd`/../install --target=nios2-elf --disable-shared --disable-werror --disable-nls --disable-doc
63 if you get error message about missing elf32-target.h, type:
69 2. Build GCC using eCos header files
71 tar -xjvf src/gcc-4.1-176.tar.bz2
74 ../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 --disable-doc
77 Problems: c++locale.c does has fallback code for strtof that doesn't
78 kick in, modify c++locale.c to #if 0 the strtof path.
83 ../gdb-wrs/configure --prefix=`pwd`/../install --target=nios2-elf --disable-shared --disable-werror
92 WARNING: `makeinfo' is missing on your system. You should only need it if
93 you modified a `.texi' or `.texinfo' file, or any other file
94 indirectly affecting the aspect of the manual. The spurious
95 call might also be the consequence of using a buggy `make' (AIX,
96 DU, IRIX). You might want to install the `Texinfo' package or
97 the `GNU make' package. Grab either from any GNU archive site.
98 make[2]: *** [/home/edgar/Desktop/gcc4/wrs-linux-4.1-176-nios2-wrs-linux-gnu/build/gcc/gcc/HTML/gcc-4.1.2/cpp/index.html] Error 1
100 edit ./Makefile search for missing texinfo and replace with
102 MAKEINFO = /usr/bin/makeinfo