public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2318] driver/101383 - handle -gtoggle in driver
@ 2021-07-15 5:56 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2021-07-15 5:56 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:4f3b383cf8825197e714a4a21852eca071f8e67e
commit r12-2318-g4f3b383cf8825197e714a4a21852eca071f8e67e
Author: Richard Biener <rguenther@suse.de>
Date: Fri Jul 9 11:13:11 2021 +0200
driver/101383 - handle -gtoggle in driver
The driver amends assembler options with for example --gdwarf-5
when debugging is enabled but the check for that does not consider
the effect of -gtoggle which is not handled in the common option
machinery. The following alters debug_info_level according to
-gtoggle mimicing what process_options later does in the compiler.
This in particular avoids changing of the cc1-checksum with every
bootstrap (debug) cycle as we compute that from stage2 where we
use -g -gtoggle but with --gdwarf-5 and no debug info from the
compiler the assembler will fill the line table with the temporary
assembler file names.
2021-07-09 Richard Biener <rguenther@suse.de>
PR driver/101383
* gcc.c (process_command): Process -gtoggle like process_options
would after parsing options.
Diff:
---
gcc/gcc.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 12b3440c342..3e98bc7973e 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -4927,6 +4927,16 @@ process_command (unsigned int decoded_options_count,
#endif
}
+ /* Handle -gtoggle as it would later in toplev.c:process_options to
+ make the debug-level-gt spec function work as expected. */
+ if (flag_gtoggle)
+ {
+ if (debug_info_level == DINFO_LEVEL_NONE)
+ debug_info_level = DINFO_LEVEL_NORMAL;
+ else
+ debug_info_level = DINFO_LEVEL_NONE;
+ }
+
if (output_file
&& strcmp (output_file, "-") != 0
&& strcmp (output_file, HOST_BIT_BUCKET) != 0)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-15 5:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 5:56 [gcc r12-2318] driver/101383 - handle -gtoggle in driver Richard Biener
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).