Patchwork [google-4_6] fix issues of streaming lipo (issue6297057)

login
register
mail settings
Submitter Rong Xu
Date June 7, 2012, 12:03 a.m.
Message ID <20120607000312.65904C0D1E@rong.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/163446/
State New
Headers show

Comments

Rong Xu - June 7, 2012, 12:03 a.m.
Hi,

This is for google-4_6 branch only.

It fixed a few issues:
(1) not passing pedantic flag from primary module to aux;
(2) not using pipe to generate iro file even -pipe specified;
(3) fix the case like -D"foo bar" option in auxiliary module.

Tested google internal benchmarks.

2012-06-06  Rong Xu  <xur@google.com>

	* gcc.c (RIPA_AUX_MOD_SPEC):not passing pedantic flag to aux
          modules.
          (ripa_invoke_as):not using pipe for iro file.
          (ripa_build_aux_mod_func):-D define can have space.
         


--
This patch is available for review at http://codereview.appspot.com/6297057

Patch

Index: gcc.c
===================================================================
--- gcc.c	(revision 188282)
+++ gcc.c	(working copy)
@@ -708,7 +708,7 @@  proper position among the other output files.  */
 #ifndef RIPA_AUX_MOD_SPEC
 # define RIPA_AUX_MOD_SPEC "\
  %{!Q:-quiet} %i -dumpbase %B_aux -auxbase %b\
- %{W*&pedantic*} %{w} %{fdump*} %{fopt-info*}\
+ %{w} %{fdump*} %{fopt-info*}\
  %{Qn:-fno-ident} %{Qy:} %{fripa*} %{fprofile*}\
  %{!fprofile-use*:-fprofile-use} -o %u.irs"
 #endif
@@ -759,7 +759,7 @@  static const char *ripa_asm_options =
 
 /* specs to call asm in streaming lipo.  */
 static const char *ripa_invoke_as =
-"|\n as %(ripa_asm_options) %U.irs %A\n ";
+"\n as %(ripa_asm_options) %U.irs %A\n ";
 
 /* specs to call asm in streaming lipo. This is for the primary ir assembly
    to ir object.  */
@@ -8619,7 +8619,7 @@  ripa_build_aux_mod_func (int argc, const char **ar
 
         case 'D': /* cpp defines */
           ++num_d;
-          str = strtok (buf+2, STR_DELIMITERS);
+          str = strtok (buf+2, "\n");
           strcpy (str_buf, "-");
           strcat (str_buf, str);
           store_arg (xstrdup (str_buf), 0, 0);