Re: [google] record compiler options to .note sections

2011-10-11 Thread Cary Coutant
How about .gnu.switches.text.quote_paths? Sounds good to me. -cary

Re: [google] record compiler options to .note sections

2011-10-11 Thread Dehao Chen
Attached is the new patch. Bootstrapped on x86_64, no regressions. gcc/ChangeLog.google-4_6: 2011-10-08 Dehao Chen de...@google.com Add a flag (-frecord-gcc-switches-in-elf) to record compiler command line options to .gnu.switches.text sections of the object file. *

Re: [google] record compiler options to .note sections

2011-10-11 Thread Xinliang David Li
ok. David On Tue, Oct 11, 2011 at 9:51 PM, Dehao Chen de...@google.com wrote: Attached is the new patch. Bootstrapped on x86_64, no regressions. gcc/ChangeLog.google-4_6: 2011-10-08  Dehao Chen  de...@google.com       Add a flag (-frecord-gcc-switches-in-elf) to record compiler      

Re: [google] record compiler options to .note sections

2011-10-10 Thread Xinliang David Li
Ok for google branches. 1) document the difference of this option with -grecord-gcc-switches (this one only record codegen related options, and recorded in debug section), and with -frecord-gcc-switches? 2) may be better to use option name: -frecord-gcc-switches-in-object thanks, David On Sun,

Re: [google] record compiler options to .note sections

2011-10-10 Thread Cary Coutant
Ok for google branches. 1) document the difference of this option with -grecord-gcc-switches (this one only record codegen related options, and recorded in debug section), and with -frecord-gcc-switches? 2) may be better to use option name: -frecord-gcc-switches-in-object Sections whose

Re: [google] record compiler options to .note sections

2011-10-10 Thread Dehao Chen
How about .gnu.switches.text.quote_paths? Thanks, Dehao On Tue, Oct 11, 2011 at 8:42 AM, Cary Coutant ccout...@google.com wrote: Ok for google branches. 1) document the difference of this option with -grecord-gcc-switches (this one only record codegen related options, and recorded in debug

Re: [google] record compiler options to .note sections

2011-10-09 Thread Jakub Jelinek
On Sun, Oct 09, 2011 at 09:18:25AM +0800, Dehao Chen wrote: Unfortunately -frecord-gcc-switches cannot serve our purpose because the recorded switches are mergable, i.e. the linker will merge all options to a set of strings. However, object files may have distinct compile options. We want to

Re: [google] record compiler options to .note sections

2011-10-09 Thread Dehao Chen
On Sun, Oct 9, 2011 at 5:28 PM, Jakub Jelinek ja...@redhat.com wrote: On Sun, Oct 09, 2011 at 09:18:25AM +0800, Dehao Chen wrote: Unfortunately -frecord-gcc-switches cannot serve our purpose because the recorded switches are mergable, i.e. the linker will merge all options to a set of strings.

[google] record compiler options to .note sections

2011-10-08 Thread Dehao Chen
This patch records the compiler command-line flags to a .note section, which could be used by FDO/LIPO. Bootstrapped on x86_64, no regressions. Is it ok for google/gcc-4_6 and google/main branches? Thanks, Dehao gcc/ChangeLog.google-4_6: 2011-10-08 Dehao Chen de...@google.com Add a

Re: [google] record compiler options to .note sections

2011-10-08 Thread Jakub Jelinek
On Sat, Oct 08, 2011 at 06:43:47PM +0800, Dehao Chen wrote: This patch records the compiler command-line flags to a .note section, which could be used by FDO/LIPO. Bootstrapped on x86_64, no regressions. Is it ok for google/gcc-4_6 and google/main branches? Why yet another record switches

Re: [google] record compiler options to .note sections

2011-10-08 Thread Dehao Chen
Unfortunately -frecord-gcc-switches cannot serve our purpose because the recorded switches are mergable, i.e. the linker will merge all options to a set of strings. However, object files may have distinct compile options. We want to preserve every object file's compile options when doing LIPO