Forum Discussion
Altera_Forum
Honored Contributor
20 years agoI got there now (thanks to hippo, who showed me the way)
I did like this now : - get the windows sources, zip -r and unzip -a (I've put modified sources in /usr/src/nios2) - binutils : like expected :cd /usr/src/nios2/binutils
mkdir build
cd build
../configure --target=nios2-elf --prefix=/usr/local/nios2-elf
make
make install - gcc first pass ( = without Clib and C++ support) : PATH=/usr/local/nios2-elf:$PATH
cd /usr/src/nios2/gcc
mkdir build
cd build
../configure --target=nios2-elf --prefix=/usr/local/nios2-elf --enable_languages=c --without-headers --with-newlib
make
make install - newlib c library cd /usr/src/nios2/newlib
mkdir build
cd build
../configure --prefix=/usr/local/nios2-elf --target=nios2-elf
make
make install - gcc second pass : cd /usr/src/nios2/gcc/build
../configure --target=nios2-elf --prefix=/usr/local/nios2-elf --enable_languages=c,c++ --with-headers --with-newlib
make
make install The trick seems to be the --without-headers in the first gcc pass (see porting gcc (http://http://www.mega-tokyo.com/osfaq2/index.php/gcc%20cross-compiler))