Article View: gnu.gcc.help
Article #362Imbedding compilation information into binaries
From: Roger West
Date: Thu, 03 Sep 1992 20:27
Date: Thu, 03 Sep 1992 20:27
18 lines
1324 bytes
1324 bytes
I'm trying to implement software configuration procedures which automatically track how binaries are derived from source code. I'm using RCS keywords to keep track of which source revision a binary is compiled from, but I also want to keep track of the compiler version and options that were used. Using gcc, part of what I want is provided by the builtin macro __VERSION__, which allows for something like... static char rcsid[] = "@(#) $Id$ GCC Version: " __VERSION__; The what(1) command can then be used to show version information. In order to provide the remaining information I need, I'm considering implementing a similar builtin macro called __OPTIONS__ which would expand to a string containing all the compilation options used. Has anyone already done this, or solved this traceability problem in some other way? Roger
Technical Details
Message-ID:
<WEST.92Sep3142709@chance.dsg.ti.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!sun-barr!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!fstop.csc.ti.com!fstop!westShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!sun-barr!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!fstop.csc.ti.com!fstop!west From: west@chance.dsg.ti.com (Roger West) Subject: Imbedding compilation information into binaries Message-ID: <WEST.92Sep3142709@chance.dsg.ti.com> Sender: usenet@csc.ti.com Nntp-Posting-Host: chance.tsd.itg.ti.com Organization: Texas Instruments, Speech Mushrooms. Date: Thu, 3 Sep 1992 20:27:09 GMT Lines: 18