This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c/2678: gcc/g++ should stick compilation options into the .o file
- To: nobody at gcc dot gnu dot org
- Subject: Re: c/2678: gcc/g++ should stick compilation options into the .o file
- From: Phil Edwards <pedwards at disaster dot jaj dot com>
- Date: 29 Apr 2001 11:16:02 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: Phil Edwards <pedwards at disaster dot jaj dot com>
The following reply was made to PR c/2678; it has been noted by GNATS.
From: Phil Edwards <pedwards@disaster.jaj.com>
To: rfg@monkeys.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/2678: gcc/g++ should stick compilation options into the .o file
Date: Sun, 29 Apr 2001 05:56:24 -0400
On Sat, Apr 28, 2001 at 08:36:49PM -0000, rfg@monkeys.com wrote:
> And I don't think that it would
> be very hard to get the front-end gcc/g++ driver to pass
> ALL compilation options down to cc1 and/or cc1plus.
We already do; see print_switch_values in toplev.c for an example usage.
In verbose mode, almost all the switches are dumped to stderr; if
-fverbose-asm is used, they are dumped as comments to the assembly file.
I say "dumped" when they're actually formatted nicely. And I say "almost"
all the switches because the language-specific ones can't be seen.
(I tried cleaning this up once for this specific purpose, but it involved
touching a lot of files, and nobody was interested.)
> They
> in turn could easily still the options into a suitable ELF
> section.
I can't see any obvious documentation of .note sections in the gas source,
and I don't see .command mentioned at all. I wouldn't mind playing with this
idea while waiting on compiles, if you can point me towards some usage docs.
Phil
--
pedwards at disaster dot jaj dot com | pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools. Fools are protected by more capable fools.