From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phil Edwards To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: c/2678: gcc/g++ should stick compilation options into the .o file Date: Sun, 29 Apr 2001 04:16:00 -0000 Message-id: <20010429111602.1811.qmail@sourceware.cygnus.com> X-SW-Source: 2001-04/msg00708.html List-Id: The following reply was made to PR c/2678; it has been noted by GNATS. From: Phil Edwards 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.