On Tue, Apr 19, 2011 at 12:19 PM, Diego Novillo <dnovi...@google.com> wrote: > On Tue, Apr 19, 2011 at 15:02, Easwaran Raman <era...@google.com> wrote: >> This makes the gcc driver pass the --save-temps option to the assembler or >> assembler wrapper so that post-assembly tools like MAO can be integrated. >> Bootstraps on x86_64. Ok for google/main? >> >> 2011-04-19 Easwaran Raman <era...@google.com> >> >> * gcc/gcc.c (static const char *asm_options): Pass > > No need to specify 'static const char *'. Just 'asm_options'. > >> --save-temps to the assembler. > > Could you add a comment stating what version of binutils we need to use this? > > I will commit this patch for you. Given that you will be sending > other patches, please fill in the write access form at > http://sourceware.org/cgi-bin/pdw/ps_form.cgi > > > Diego. >
The revised patch has a comment that this should be used with an assembler wrapper that can recognize --save-temps. -Easwaran
2011-04-19 Easwaran Raman <era...@google.com> * gcc/gcc.c (asm_options): Pass --save-temps to assembler. Index: gcc/gcc.c =================================================================== --- gcc/gcc.c (revision 172727) +++ gcc/gcc.c (working copy) @@ -775,12 +775,16 @@ static const char *cc1_options = %{fmudflap|fmudflapth:-fno-builtin -fno-merge-constants}\ %{coverage:-fprofile-arcs -ftest-coverage}"; +/* If an assembler wrapper is used to invoke post-assembly tools + like MAO, --save-temps need to be passed to save the output of + such post-processing tools. This is not compatible with vanilla + binutils gas which does not recognize --save-temps. */ static const char *asm_options = "%{-target-help:%:print-asm-header()} " #if HAVE_GNU_AS /* If GNU AS is used, then convert -w (no warnings), -I, and -v to the assembler equivalents. */ -"%{v} %{w:-W} %{I*} " +"%{v} %{w:-W} %{I*} %{save-temps:--save-temps} " #endif "%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}";