On Thu, Apr 21, 2011 at 12:07 PM, Michael Meissner
<meiss...@linux.vnet.ibm.com> wrote:
> On Tue, Apr 19, 2011 at 12:02:08PM -0700, Easwaran Raman 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
>>       --save-temps to the assembler.
>>
>> Index: gcc/gcc.c
>> ===================================================================
>> --- gcc/gcc.c (revision 172727)
>> +++ gcc/gcc.c (working copy)
>> @@ -780,7 +780,7 @@ static const char *asm_options =
>>  #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}";
>
> This patch should also support -save-temps=obj.
>
When using gcc with a post-assembly tool, we use a wrapper that
invokes the tool and needs to know if the tool's output (another
assembly file) needs to be saved. The wrapper doesn't generate any
additional .o files and hence doesn't need to know whether the obj
file is to be saved (which is done by the driver). Why do we need to
pass -save-temps=obj in that case?

-Easwaran


> --
> Michael Meissner, IBM
> 5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA
> meiss...@linux.vnet.ibm.com     fax +1 (978) 399-6899
>

Reply via email to