This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Reproducible gcc builds, gfortran, and -grecord-gcc-switches
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Simon Baldwin <simonb at google dot com>
- Cc: Michael Matz <matz at suse dot de>, gcc-patches at gcc dot gnu dot org, Gerald Pfeifer <gerald at pfeifer dot com>
- Date: Thu, 16 Aug 2012 21:28:50 +0200
- Subject: Re: Reproducible gcc builds, gfortran, and -grecord-gcc-switches
- References: <CAPTY64p0=m3O6TOfPf1w1rtF944gHe_ODOsH+Ryx-tdTupVzUA@mail.gmail.com> <alpine.LNX.2.00.1208160912270.2871@gerinyyl.fvgr> <CAPTY64ofrdhFVrYNJcHhyrA3J7vpZ=Y6EPrdoWJEwsv3tm3xyw@mail.gmail.com> <alpine.LNX.2.00.1208161634250.2706@wotan.suse.de> <CAPTY64pVuBoW9Tu-6GNLtfeGLYj62wA_8zZS3hOxtyHFmxwCXw@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Aug 16, 2012 at 06:59:09PM +0200, Simon Baldwin wrote:
> On 16 August 2012 16:40, Michael Matz <matz@suse.de> wrote:
> >
> > ,,,
> >
> > Do you have considered to use a new option flag (usable in the .opt files)
> > instead of a langhook? I.e. add a flag cl_dont_record to cl_option, a
> > string Norecord for the .opt files, some handling for it in
> > opt-functions.awk and the like?
> >
> > Adding lang-hooks used by debug producers make me twitch :)
>
> Okay. Below is an alternative approach.
>
> I've moved discussion to gcc-patches, since it's now more concrete
> than abstract.
You could have just added
case OPT_cpp_:
to the switch in gen_producer_string, instead of all this.
> --- gcc/dwarf2out.c (revision 190442)
> +++ gcc/dwarf2out.c (working copy)
> @@ -18101,6 +18101,9 @@ gen_producer_string (void)
> /* Ignore these. */
> continue;
> default:
> + if (cl_options[save_decoded_options[j].opt_index].flags
> + & CL_NO_DWARF_RECORD)
> + continue;
> gcc_checking_assert (save_decoded_options[j].canonical_option[0][0]
> == '-');
> switch (save_decoded_options[j].canonical_option[0][1])
Jakub