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 via email to