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

User avatar
By jcmvbkbc
#91260
eriksl wrote:the latest crosstool-NG available for lx106 (ESP8266) including gcc v10. I didn't yet test it thoroughly, but at the first sight it seems to work alright.

yay!
BTW, gcc-11 has just been released and it has a few small xtensa-specific code generation improvements: one, two, three, four, thanks to Takayuki 'January June' Suwa.
Last edited by jcmvbkbc on Thu Apr 29, 2021 5:01 am, edited 1 time in total.
User avatar
By eriksl
#91261 Great news!

Do you know or expect if for gcc11 additional patching will be required in CT-ng? For gcc10 it seems to work without any patching.

Did you consider applying for having your lx106 changes to be incorporated into upstream ctng? So lx106 will always have the latest state of ctng instead of having to rebase/repatch by us? If you already applied and got turned down, I won't try myself ;)
User avatar
By jcmvbkbc
#91262
eriksl wrote:Do you know or expect if for gcc11 additional patching will be required in CT-ng? For gcc10 it seems to work without any patching.

There's no need for xtensa-specific patches to the compiler or binutils, but you'd still need to apply an overlay.
I've tried to rework overlay application here, but haven't completed it as there were some change requests IIRC. I believe that that's a better way than including an overlay into the ct-ng.
User avatar
By eriksl
#91263 Interesting. I've been learning a lot of ctng over the past two weeks and not all makes sense to me yet.

In the meantime I understand that xtensa is a bit a of a challenge to support in ctng, because they can have all sorts of configurations. That's where the overlay comes in, where, in our case, the esp8266 (lx106) and esp32 (lx108) variants are added. It's a very flexible solution for a very flexible processor design. However, isn't it that only very few xtensa variants are actually used in the real world, in a such an open source way that public ctng support is required? Can't we just define lx106 and lx108 as "standard" processors? But then I guess they'd required to be named "lx106"/"lx108" and not "xtensa". I am not sure ctng can differentiate on processor-sub-arch for it's samples? And then the samples can be just included in upstream?

Just a thought ;)