Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By Hari Narasimhan H.N
#14057 Hi,

I tried configuring and building a gcc toolchain for our customized xtensa microcontroller(not a DSP), a bare metal system . It builds fine without C library and C++ support. However

1. If I select the newlib option in the C library

[INFO ] Installing C library
[ERROR] make[2]: *** [configure-target-newlib] Error 1
[ERROR] make[1]: *** [all] Error 2
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Installing C library'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR] >> called from: do_libc[scripts/build/libc/newlib.sh@118]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@632]
[ERROR] >>
[ERROR] >> For more info on this error, look at the file: 'build.log'
[ERROR] >> There is a list of known issues, some with workarounds, in:
[ERROR] >> 'usr/share/doc/crosstool-ng/ct-ng.hg+unknown-20150409.101032/B - Known issues.txt'
[ERROR]
[ERROR] (elapsed: 31:42.89)
[31:43] / make: *** [build] Error 2


2. If I select the C++ option the build breaks with the error message

[ERROR] checking for the value of EOF... configure: error: computing EOF failed
[ERROR] make[1]: *** [configure-target-libstdc++-v3] Error 1
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Installing final compiler'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR] >> called from: do_cc_core_backend[scripts/build/cc/gcc.sh@464]
[ERROR] >> called from: do_cc_for_host[scripts/build/cc/gcc.sh@574]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@632]
[ERROR] >>
[ERROR] >> For more info on this error, look at the file: 'build.log'
[ERROR] >> There is a list of known issues, some with workarounds, in:
[ERROR] >> 'usr/share/doc/crosstool-ng/ct-ng.hg+unknown-20150409.101032/B - Known issues.txt'
[ERROR]
[ERROR] (elapsed: 17:28.39)
[17:29] / make: *** [build] Error 2

Please let me know how to solve this.

Thanks and Regards,
Hari
User avatar
By jcmvbkbc
#14071
Hari Narasimhan H.N wrote:I tried configuring and building a gcc toolchain for our customized xtensa microcontroller(not a DSP), a bare metal system.

Not esp8266, right? Then this question is not relevant to this board.
Please use linux-xtensa@linux-xtensa.org mailing list for such questions.
User avatar
By jcmvbkbc
#42054
xtensa_00 wrote:Without newlibc and without C++, xtensa gcc builds fine through crosstool-ng. When either newlibc is enabled in ct-ng, or C++ is enabled in ct-ng, the build fails.

Guys, mainline crosstool-ng only supports building uclibc-based toolchain for linux.
Elf toolchain with newlib is only supported in my tree here: https://github.com/jcmvbkbc/crosstool-NG
And you need libc to have C++.