Closed mountain closed 9 years ago
Yes, I have a plan to support setjmp/longjmp. It will take some time because even though these functions look like function, they are actually more like intrinsic to alter the control flow. But it shouldn't be that hard to support them.
Inline assembly is sometimes helpful for implementing these sorts of functions. I'm not sure how difficult gcc style inline assembly is to handle correctly, but it would be nice to look at it. tcc does handle it, and 8cc needs to do less work than tcc because tcc needed to write an integrated assembler.
On Thu, Nov 27, 2014 at 6:06 AM, Rui Ueyama notifications@github.com wrote:
Yes, I have a plan to support setjmp/longjmp. It will take some time because even though these functions look like function, but they are actually more like intrinsic to alter the control flow. But it shouldn't be that hard to support them.
— Reply to this email directly or view it on GitHub https://github.com/rui314/8cc/issues/21#issuecomment-64677971.
Thanks for your answers. I will take another try in next months.
The reason I try to compile tiny-py is that I want to build a minimal-style toolchain from scratch, the gcc toolchain is too complicated for any newcomers. Some modern tools like ninja build is my favorite.
I agree with you, getting a complete toolchain for pure C is hard. I wish for 8cc to work with a tiny assembler in the future too so gcc + binutils is not necessary for hobby operating systems.
On Thu, Nov 27, 2014 at 4:11 PM, Mingli Yuan notifications@github.com wrote:
Closed #21 https://github.com/rui314/8cc/issues/21.
— Reply to this email directly or view it on GitHub https://github.com/rui314/8cc/issues/21#event-199330421.
@mountain You could also consider using lcc, pcc, or tcc - all of which are more complete. tcc does not even require an assembler.
Thanks for you information, Andrew. I will take tcc a try.
Here is the link to the website, the version on github don't seem to be official.
On Thu, Nov 27, 2014 at 8:01 PM, Mingli Yuan notifications@github.com wrote:
Thanks for you information, Andrew. I will take tcc a try.
— Reply to this email directly or view it on GitHub https://github.com/rui314/8cc/issues/21#issuecomment-64752936.
Thanks for your contribution first. Recently I wanted to use 8cc to compile tinypy, a very tiny python interpreter, but failed due to the missing file of setjmp.h. I checked with the include directory of 8cc, and did not found setjmp.h.
I know a good compiler is not an easy work. But do you have any plan to fully support the standard c headers?
Or could I use another solution to build a libc implementation by 8cc? If it is yes, which one is a better choice?