public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Anyway to get compile flags from objects?
@ 2001-09-17  6:34 nbecker
  2001-09-17  6:41 ` Christoph Maurer
  2001-09-17  8:41 ` Phil Edwards
  0 siblings, 2 replies; 4+ messages in thread
From: nbecker @ 2001-09-17  6:34 UTC (permalink / raw)
  To: gcc

Are compilation flags recorded in obj files?  Any way to get the info?
If not, it seems to me to be a useful feature.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Anyway to get compile flags from objects?
  2001-09-17  6:34 Anyway to get compile flags from objects? nbecker
@ 2001-09-17  6:41 ` Christoph Maurer
  2001-09-17  8:41 ` Phil Edwards
  1 sibling, 0 replies; 4+ messages in thread
From: Christoph Maurer @ 2001-09-17  6:41 UTC (permalink / raw)
  To: gcc

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 609 bytes --]

Am Mon, 17 Sep 2001, schrieb nbecker@fred.net:

> Are compilation flags recorded in obj files?  Any way to get the info?
> If not, it seems to me to be a useful feature.


I tried a few days ago ans found the following solution:
(probably not the most beatuiful way, but it worked for me)

Compile with -S and -fverbose-asm. You'll find the Compiler-Flags in
the resulting assembler code as a comment.

Christoph

-- 
Christoph Maurer - Paul-Röntgen-Straße 7 - D - 52072 Aachen
mailto:christoph-maurer@gmx.de - http://www.christophmaurer.de
On my Homepage: SuSE 7.0 on an Acer Travelmate 508 T Notebook

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Anyway to get compile flags from objects?
  2001-09-17  6:34 Anyway to get compile flags from objects? nbecker
  2001-09-17  6:41 ` Christoph Maurer
@ 2001-09-17  8:41 ` Phil Edwards
  1 sibling, 0 replies; 4+ messages in thread
From: Phil Edwards @ 2001-09-17  8:41 UTC (permalink / raw)
  To: nbecker; +Cc: gcc

On Mon, Sep 17, 2001 at 09:33:00AM -0400, nbecker@fred.net wrote:
> Are compilation flags recorded in obj files?  Any way to get the info?
> If not, it seems to me to be a useful feature.

There's a feature request, PR 2678, for this.  I worked up an initial patch
but nobody was interested in reviewing it.  It seems to be of somewhat
marginal usefulness without an accompanying tool to extract the flags
from the object file, and the libbfd documentation is hellishly outdated.
So I stopped.

You might follow 2678; if anybody works further on it, there should probably
be traffic under that PR.

Phil

-- 
Would I had phrases that are not known, utterances that are strange, in
new language that has not been used, free from repetition, not an utterance
which has grown stale, which men of old have spoken.
                                     - anonymous Egyptian scribe, c.1700 BC

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Anyway to get compile flags from objects?
@ 2001-09-18  3:57 dewar
  0 siblings, 0 replies; 4+ messages in thread
From: dewar @ 2001-09-18  3:57 UTC (permalink / raw)
  To: christoph-maurer, gcc

In GNAT, we record compilation arguments in the ALI file (which is logically,
though not physically, part of the object file). The ada make utility
(gnatmake) has an option to consider a change of compiler options as reason
to recompile.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-09-18  3:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-17  6:34 Anyway to get compile flags from objects? nbecker
2001-09-17  6:41 ` Christoph Maurer
2001-09-17  8:41 ` Phil Edwards
2001-09-18  3:57 dewar

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).