|
|
Created:
13 years, 2 months ago by eraman Modified:
13 years, 2 months ago Reviewers:
meissner, pinskia CC:
Diego Novillo, gcc-patches_gcc.gnu.org Base URL:
svn://gcc.gnu.org/svn/gcc/branches/google/main/ Visibility:
Public. |
Patch Set 1 #MessagesTotal messages: 10
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 <eraman@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 is available for review at http://codereview.appspot.com/4436049
Sign in to reply to this message.
On Tue, Apr 19, 2011 at 15:02, Easwaran Raman <eraman@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 <eraman@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.
Sign in to reply to this message.
On Tue, Apr 19, 2011 at 12:19 PM, Diego Novillo <dnovillo@google.com> wrote: > On Tue, Apr 19, 2011 at 15:02, Easwaran Raman <eraman@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 <eraman@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? This is to work with the assembler wrapper that has to know whether to save the assembly file after running any post-assembly tools like MAO. > 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. >
Sign in to reply to this message.
On Tue, Apr 19, 2011 at 12:19 PM, Diego Novillo <dnovillo@google.com> wrote: > On Tue, Apr 19, 2011 at 15:02, Easwaran Raman <eraman@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 <eraman@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
Sign in to reply to this message.
On Tue, Apr 19, 2011 at 20:32, Easwaran Raman <eraman@google.com> wrote: > The revised patch has a comment that this should be used with an > assembler wrapper that can recognize --save-temps. Thanks. Will commit after testing finishes. Diego.
Sign in to reply to this message.
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 <eraman@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. -- Michael Meissner, IBM 5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA meissner@linux.vnet.ibm.com fax +1 (978) 399-6899
Sign in to reply to this message.
On Thu, Apr 21, 2011 at 12:07 PM, Michael Meissner <meissner@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 <eraman@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 > meissner@linux.vnet.ibm.com fax +1 (978) 399-6899 >
Sign in to reply to this message.
On Thu, Apr 21, 2011 at 3:18 PM, Easwaran Raman <eraman@google.com> wrote: > 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? -save-temps=obj means place the save temps in the same directory as the object file would be put rather than the current directory. Thanks, Andrew Pinski
Sign in to reply to this message.
On Thu, Apr 21, 2011 at 3:20 PM, Andrew Pinski <pinskia@gmail.com> wrote: > On Thu, Apr 21, 2011 at 3:18 PM, Easwaran Raman <eraman@google.com> wrote: >> 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? > > -save-temps=obj means place the save temps in the same directory as > the object file would be put rather than the current directory. > > Thanks, > Andrew Pinski > Sorry, I misunderstood that option. Is the following patch ok? Configured with --with-gnu-as option, verified that it bootstraps and gcc passes --save-temps to 'as' when run with -save-temps=obj. Diego, OK for google/main? -Easwaran 2011-04-25 Easwaran Raman <eraman@google.com> * gcc/gcc.c (asm_options): Pass --save-temps to assembler when invoked with -save-temps= option. Index: gcc/gcc.c =================================================================== --- gcc/gcc.c (revision 172932) +++ gcc/gcc.c (working copy) @@ -784,7 +784,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*} %{save-temps:--save-temps} " +"%{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}";
Sign in to reply to this message.
On Mon, Apr 25, 2011 at 15:00, Easwaran Raman <eraman@google.com> wrote: > 2011-04-25 Easwaran Raman <eraman@google.com> > > * gcc/gcc.c (asm_options): Pass --save-temps to assembler > when invoked with -save-temps= option. OK. Diego.
Sign in to reply to this message.
|