Forum Discussion
Altera_Forum
Honored Contributor
20 years agobuild nios2-elf-gcc with fedore4
Hi,
I try to build the compiler tools with fedora4. Binutils compiled and installed well. Following error on the screen when trying building gcc :checking whether byte ordering is bigendian... cross-compiling...
unknown
checking to probe for byte ordering... /usr/local/nios2-elf/nios2-elf/bin/ld: crt0.o: No such file: No such file or directory
collect2: ld returned 1 exit status
unknown
configure: error: unknown endianess - sorry
/src/src/gcc/libiberty/configure: line 3289: exit: please: numeric argument required
/src/src/gcc/libiberty/configure: line 3289: exit: please: numeric argument required I used : # ../configure --target=nios2-elf --prefix=/usr/local/nios2-elf --with-newlib --enable-languages=c,c++ and then make. I'm using gcc32 (not gcc 4.0), and the sources from the linux CDRom from Altera (Nios2 - 5.0). I first extracted GNUSRC.TGZ from the COMMON directory, and then copied in the sources found in LINUX/GNUBIN.TGZ Any idea what I do wrong? Stefaan15 Replies
- Altera_Forum
Honored Contributor
You need the crt0.o from newlib.
I try the build with the source from Nios2 window cd. I built binutils,gcc with c only, newlib, and gcc with c,c++. And it stopped at the last step for libstdc++,
I try with buildroot, and it stopped at the same message. Still finding...checking for extra compiler flags for building... configure: WARNING: No native atomic operations are provided for this platform. configure: WARNING: They cannot be faked when thread support is disabled. configure: WARNING: Thread-safety of certain classes is not guaranteed. configure: error: No support for this host/target combination. make: *** Error 1 - Altera_Forum
Honored Contributor
hippo,
I had the same message in my first tests, but then I was still using gcc4.0 instead of the older gcc32. Someone from Altera can tell me how to build the tools?? Stefaan - Altera_Forum
Honored Contributor
I am trying with gcc32 and buildroot to gcc3.4.5.
The error message was from an improper def in the config.sub in gcc source, I fix it to
Then it can compile some libstdc++, but stopped atIndex: package/gnuconfig/config.sub =================================================================== --- package/gnuconfig/config.sub (revision 13473) +++ package/gnuconfig/config.sub (working copy) @@ -299,8 +299,8 @@ basic_machine=mt-unknown ;; nios2 | nios2-* | nios2 | nios2-*) - basic_machine=nios2-altera - os=-none + basic_machine=nios2-uclibc +# os=-none ;; # We use `pc' rather than `unknown'
I will try other gcc 3.4.x.from /home/jack/buildroot/toolchain_build_nios2/gcc-3.4.5/libstdc++-v3/src/allocator.cc:35: /home/jack/buildroot/toolchain_build_nios2/gcc-3.4.5-final/nios2-linux-uclibc/mno-hw-mul/libstdc++-v3/include/nios2-linux-uclibc/bits/c++locale.h: In function `int std::__convert_from_v(char*, int, const char*, _Tv, int* const&, int)': /home/jack/buildroot/toolchain_build_nios2/gcc-3.4.5-final/nios2-linux-uclibc/mno-hw-mul/libstdc++-v3/include/nios2-linux-uclibc/bits/c++locale.h:103: error: `snprintf' is not a member of `std' - Altera_Forum
Honored Contributor
Hippo,
Thanks for the time you put in this. I'll try the same you did so far. If it is so difficult, I just can not understand how the tools get build at Altera Corporation. Stefaan - Altera_Forum
Honored Contributor
I checked the altera's config by "strings nios2-elf-c++.exe".
There is no problem in your config. But they didn't have libstdc++ ... Do you use libstdc++ ? I am still checking... http://gcc.gnu.org/install/ (http://gcc.gnu.org/install/) - Altera_Forum
Honored Contributor
Using the source from Nios2 window cd,
I try remove the dir libstc++-v3 from gcc source tree, and it build nios2-elf-c++ http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif - Altera_Forum
Honored Contributor
Hippo,
Yes, I need the stdc++ library, otherwise I can not use classes in a proper way. I don't need the C++ exception handling. Stefaan - Altera_Forum
Honored Contributor
We can try to enable more features in uclibc config using buildroot.
- Altera_Forum
Honored Contributor
hippo,
Sorry that I can not support you very much, I'm not a linux/gnu... specialist, but I'm learning, ... - Altera_Forum
Honored Contributor
Thank you anyways.
It doesn't matter to me. I am not a c++ user. I just want to find out the problem. I think the configure does not work well. I will let you know if I have progess.