public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Tom Kacvinsky <tkacvins@gmail.com>
Cc: Bill Cunningham <bill.cu1234@gmail.com>, gcc-help@gnu.org
Subject: Re: gcc and simple C compiler
Date: Mon, 4 Oct 2021 07:36:19 +0100	[thread overview]
Message-ID: <CAH6eHdRsu+qk3+EAcmqDSWAC_F6YgwQwF4Bc30E3RZbrJKgQJg@mail.gmail.com> (raw)
In-Reply-To: <CAG_eJLd=QzFVqmcPtL6qvCwVMBV1i7BBPJpiJBdhBLxN2R=kdw@mail.gmail.com>

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

> On Sun, Oct 3, 2021 at 7:48 PM Bill Cunningham via Gcc-help <
> gcc-help@gcc.gnu.org> 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.

      reply	other threads:[~2021-10-04  6:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-03 23:48 Bill Cunningham
2021-10-03 23:55 ` Tom Kacvinsky
2021-10-04  6:36   ` Jonathan Wakely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH6eHdRsu+qk3+EAcmqDSWAC_F6YgwQwF4Bc30E3RZbrJKgQJg@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=bill.cu1234@gmail.com \
    --cc=gcc-help@gnu.org \
    --cc=tkacvins@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).