-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building tcc with pnut #63
Comments
We're still working on TCC support. |
Thanks, it's good to know that tcc is one of your aims. It will be good to have another C compiler that is capable of bootstrapping tcc. Are you aware of the live-bootstrap project (https://github.com/fosslinux/live-bootstrap/)? They bootstrap from a couple of hundred bytes of commented machine code all the way up to modern versions of GCC. tcc is part of their bootstrap chain. They use a "bootstrapable" version of tcc 0.9.26 (https://gitlab.com/janneke/tinycc (mes-0.27 branch I think) which is actually closer to 0.9.27 than 26). This version of tcc can be built by mescc (which is a C compiler written in scheme). I mention this because their bootstrapable version can be built by simplified C compilers and is used as a stepping stone to a stock 2017 era tcc-0.9.27 release (and then on to modern versions of gcc). Live Bootstrap actually goes through several C compilers on its way to tcc: cc_x86 (a C compiler written in a simple macro assembly language. There are also other arch versions) I have also been working on a means of bootstrapping tcc but replacing mescc with a chain of previous versions of tcc (plus some cut down versions of tcc). My project is very i386 specific, but it can bootstrap from nothing up to tcc 0.9.27 much more quickly than a stock live-bootstrap can. https://github.com/cosinusoidally/tcc_bootstrap_alt . The thing that got me interested in pnut is potentially allowing me to eliminate some intermediate versions of tcc from my project. |
@cosinusoidally We should definitely talk some more about how we can combine our efforts. We see pnut as a more practical seed than used by live bootstrap (depends only on the shell, more maintainable source, and fewer steps to get TCC built). We could add more C language features to pnut as needed and you could simplify TCC to avoid "advanced" features. |
In the readme file it indicates that pnut.exe is capable of building tcc. I can't seem to figure out how to actually do that though. Can you please advise whether this is possible? Simply passing
--cc=pnut.exe
to the tcc configure script won't work:If I try this (which works with gcc after the configure script has been run):
I get the following error:
I'm using a stock tcc 0.9.27 release from 2017 (rather than a random version of their mob branch). Same issue when i use the i386 backend.
The text was updated successfully, but these errors were encountered: