[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1692480040377476.png (460 KB, 487x490)
460 KB
460 KB PNG
Wait a god damn second, if you need GCC to compile GCC...
How was first GCC compiled?

Also is it rust written in rust?
Was it first written in C/C++ then re-written in rust?
>>
>Wait a god damn second, if you need GCC to compile GCC...
>How was first GCC compiled?
https://en.wikipedia.org/wiki/Bootstrapping_(compilers)
>Also is it rust written in rust?
>Was it first written in C/C++ then re-written in rust?
https://en.wikipedia.org/wiki/LLVM
>>
I can't believe this isn't the accepted answer on that page.
https://stackoverflow.com/a/65708958
https://bootstrappable.org/projects.html
>>
>fucking firefox ruined the screenshot again
>>
There was already a C compiler when GCC started. GCC started in 1987. C started in 1972.
>>
>>100116330
Also rust was written in OCaml first.
>>
>>100116495
And OCaml is bootstrapped from C
LLVM is bootstrapped from g++ which is bootstrapped from gcc
>>
>>100116270
it goes like this
>primitive baremetal, balls to the wall, 0 and 1 programming to make assembler
>use said assembler to make a ""super"" assembler
>Write C compiler in super assembler
>rewrite said compiler on C compiler and compile again
>now it is self-hosting
>...
>write C++ compiler on said C Compiler and compile it against itself again
>memelang adds a custom frontend to the C++ compiler, compiles it, rewrites it into new memelang compiler and compiles it again.
>now you have a Tranny++
Its turtles all the way down
>>
>>100116270
>Also is it rust written in rust?
It was originally written in OcaML.
>>
>Also is it rust written in rust?
The first Rust compiler was written in OCaml. All subsequent compilers use a Rust front end, but use LLVM as the backend. LLVM is written in C++, and is used as the backend for a wide variety of languages.
>>
>>100116386
Neat read
>>
>>100116270
It was compiled by hand, they translated each single line of C codo to binary.
>>
>>100116386
bootstrapping the bootstrappers, essentially going a few generations of pure assembly to full blown compiler, it'd be nice to do a "linux from scratch" using this approach
>>
>>100116386
>GNU Mes
GNU/Based & LISPilled
https://www.gnu.org/software/mes/manual/html_node/LISP-as-Maxwell_0027s-Equations-of-Software.html



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.