public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Modifying GCC source code
@ 2024-04-05  4:58 Dan
  0 siblings, 0 replies; only message in thread
From: Dan @ 2024-04-05  4:58 UTC (permalink / raw)
  To: gcc

[-- 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!

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-05  4:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-05  4:58 Modifying GCC source code Dan

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).