Re: gcc and simple C compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 4 Oct 2021, 00:56 Tom Kacvinsky via Gcc-help, <gcc-help@xxxxxxxxxxx>
wrote:

> On Sun, Oct 3, 2021 at 7:48 PM Bill Cunningham via Gcc-help <
> gcc-help@xxxxxxxxxxx> wrote:
>
> > Greetings I was wondering if there was a way I could compile a simple C
> > only compiler, as a learning experience, and just "extract" a simple C99
> > compiler. To explain better, would there be a log or pathway that gcc
> > would create if I properly set the switches ec cetra to compile a C99
> > compiler for the x86_64-pc-linux-gnu target and the log would show me
> > all the files used and I could "move" those files to a directory and
> > have a simple, smaller, gcc C compiler.
>


No, GCC does not support doing this. You can't separate the parts needed
for C from the other languages without a lot of manual effort and
refactoring.

It's intended to be a high quality, optimising compiler, not a teaching aid.

>
> >      This is for my own use to learn gcc and not to be made public.
>
>
> Use configure with --enable-languages=c
>
> This means only the C compiler is built. No C++, no Fortran, Objective C,
> etc...
>
> Of course you need a working C compiler to compile GCC.


No, you need a working C++ compiler. GCC has been implemented in C++ for
some years now.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux