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

Message ID 20120607000312.65904C0D1E@rong.mtv.corp.google.com
State New
Headers show

Commit Message

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

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
          (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


Index: gcc.c
--- gcc.c	(revision 188282)
+++ gcc.c	(working copy)
@@ -708,7 +708,7 @@  proper position among the other output files.  */
 # 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"
@@ -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 */
-          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);