Discuss here different C compiler set ups, and compiling executables for the ESP8266
User avatar
By jcmvbkbc
#991
jcmvbkbc wrote:I've taken stab at adding call0 support in gcc: https://github.com/jcmvbkbc/gcc-xtensa/ ... all0-4.8.2
The cross-compiler is now able to bootstrap, but
- stack frame support is broken (-fomit-frame-pointer "fixes" that)
- callee-saved registers are not saved, a0 is not saved in non-leaf functions
- non-local jump code is just commented out, needs more attention.


Ok, spent some time on it, current status:
- stack frame support is fixed;
- callee-saved registers and a0 are saved and restored properly;
- generated code looks sane.

This should be enough to build self-hosted code. I'll look at commented out library code, but I think it's 1) not critical 2) it's *really* easy to fix anyway.
Code is in the same git tree. Testing feedback, pointers and patches are welcome.
User avatar
By Sprite_tm
#1056
jcmvbkbc wrote:Ok, spent some time on it, current status:
- stack frame support is fixed;
- callee-saved registers and a0 are saved and restored properly;
- generated code looks sane.

This should be enough to build self-hosted code. I'll look at commented out library code, but I think it's 1) not critical 2) it's *really* easy to fix anyway.
Code is in the same git tree. Testing feedback, pointers and patches are welcome.


Awesome! I'll give it a try as soon as I can.
User avatar
By mamalala
#1057 Any quick hints about how to compile it? It's been a very, very long time since i compiled a GCC suite myself. I downloaded the archive for that branch and unpacked it. My host is Linux 64 Bit, but the 32 Bit support libs are also present.

Now, what do i tell configure as parameters, etc? Obviously i don't want to overwrite the system-wide installed GCC ;)

Thanks,

Chris