Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ok, so I've built a LFS system...but technically its not really from COMPLETE scratch...i wanna do something that you build from absolute scratch!! is that possible?
but thats not the question i've been pondering...the question is: how do you compile say, gcc, without a compiler??? hehe...so how do you compile a compiler (without one already installed, however they got it there..)...how did the first compiler get compiled, lol....just a little question...
so would it be possible to start from the absolute scratch?
opcodes, opcode macroing -> assembler compiler. and so on.
The trick is that the first compiler was probably just a macro expander. From that on they got more and more complex.
I guess, I was not around at that time
How to compile a compiler is a chicken-and-egg kind of problem. I've been pondering the same. I suppose if one were knowledgable enough, one could write a compiler in assembly...?
Grim, you could, in theory do this (with something like Assembly). I am just about as green as they come when it comes to coding, so I really don't even know the depth it would take to undertake such a project.
But for now, we are lucky enough to not have to, with the LFS project's way, or with just using a precompiled binary on a truly nekkid drive. Either way, it's something the average (and probably even the more advanced) user doesn't have to worry too much about.
If you wanted to undertake a project like that, I'd see about joining a mailing list: http://www.gnu.org/software/gcc/
Or you might even find the actual answer to your question just pluggin around that site. Either way, I'm sure it will be a lot of work, and if you do decide to try it out, let us know how things go, some sort of progression thread.
Just out of curiosity, I found some links and pages over at the link to gcc I posted in that last thread, I came upon the above link. I didn't read through it, however this person seems to have a similar idea as you
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304
Rep:
gcc can compile itself before its installed. its
a minimal sort of compile, and you have to recompile
it later.
i remember something like
make bootstrap
or something like that
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.