public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dan <sedevdkw@gmail.com>
To: gcc@gcc.gnu.org
Subject: Modifying GCC source code
Date: Fri, 5 Apr 2024 09:58:15 +0500	[thread overview]
Message-ID: <CADt4qZm7yqBK6VyuT46Jyzc8W12bz9_WYdcfxTriX7m0AL+4fA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1049 bytes --]

Hello!

I am trying to slightly modify the source code of GCC to display some
messages when the compiler is executed in the terminal. For example, when
'gcc source.c' is executed, I want a print message saying "Building with
GCC..." and if the build is successful, "Build Successful!" should be
displayed otherwise "Build Failed!" should be displayed.

I have tried adding the print statements in the driver code file (gcc.cc)
but haven't had any success. Adding the print statement in driver::main
function breaks everything and the code doesn't even build. I have tried
adding the print statements in all the major methods in the driver code
such as, driver::execute, driver::finalize, driver::init_spec,
driver::main, etc but the result that I get is that either the code breaks
while building the GCC from source, or it builds successfully but the print
statements do not get displayed.

I'm uncertain how to proceed. Any guidance on how to begin and what files
or functions I need to check out would be greatly appreciated.

Thanks in advance!

                 reply	other threads:[~2024-04-05  4:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CADt4qZm7yqBK6VyuT46Jyzc8W12bz9_WYdcfxTriX7m0AL+4fA@mail.gmail.com \
    --to=sedevdkw@gmail.com \
    --cc=gcc@gcc.gnu.org \
    /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).