GCC Developers Discuss New Option For Recording Compiler Flags / Details In Binaries

Written by Michael Larabel in GNU on 16 November 2019 at 12:14 PM EST. 19 Comments
GNU
GCC developers recently have been discussing a new proposal over an option for preserving the command-line flags/options used when building a binary as well as the associated compiler version.

The proposal sent out last week was over a --record-gcc-command-line option to save the compiler options into the produced object file. The proposal is in the name of helping debugging, reproducing bugs, and repeating build process. There is already a -frecord-gcc-switches option that is somewhat similar in behavior but with key differences as explained in the proposal.

Past proposals along similar lines haven't ultimately panned out though this time there does seem to be some traction by stakeholders.

Another one of the benefits of better tracking of compiler versions and options used to compile code is in the name of analyzing binaries when benchmarking for seeing how arbitrary binaries from vendors or other parties are actually compiled, should there end up ultimately being a widely adopted means across compilers and uniform manner of said tracking. But we'll see where this latest proposal plays out and if --record-gcc-command-line is ultimately accepted.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week