Patchwork [google] save -std to lipo profile (issue5754067)

login
register
mail settings
Submitter Rong Xu
Date March 9, 2012, 6:59 p.m.
Message ID <20120309185924.290E7C1614@rong.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/145750/
State New
Headers show

Comments

Rong Xu - March 9, 2012, 6:59 p.m.
Hi,

This patch is for google branches only.

It saves -std=* option to lipo profile so that non-c99 primary module
can include c99 auxiliay modules with restrict keyword.

Tested with bootstrap and google internal benchmarks.

-Rong

2012-03-09   Rong Xu  <xur@google.com>

	* opts-global.c (lipo_save_cl_args): save -std option.
        Google ref b/6117980.


--
This patch is available for review at http://codereview.appspot.com/5754067
Xinliang David Li - March 9, 2012, 7:39 p.m.
ok for google branches.

David

On Fri, Mar 9, 2012 at 10:59 AM, Rong Xu <xur@google.com> wrote:
> Hi,
>
> This patch is for google branches only.
>
> It saves -std=* option to lipo profile so that non-c99 primary module
> can include c99 auxiliay modules with restrict keyword.
>
> Tested with bootstrap and google internal benchmarks.
>
> -Rong
>
> 2012-03-09   Rong Xu  <xur@google.com>
>
>        * opts-global.c (lipo_save_cl_args): save -std option.
>        Google ref b/6117980.
>
> Index: opts-global.c
> ===================================================================
> --- opts-global.c       (revision 185148)
> +++ opts-global.c       (working copy)
> @@ -210,10 +210,12 @@
>      (3) -W...
>      (4) -O...
>      (5) --param...
> +     (6) -std=... (-std=c99 for restrict keyword)
>   */
>   if (opt[0] == '-'
>       && (opt[1] == 'f' || opt[1] == 'm' || opt[1] == 'W' || opt[1] == 'O'
> -         || (strstr (opt, "--param") == opt))
> +         || (strstr (opt, "--param") == opt)
> +         || (strstr (opt, "-std=")))
>       && !strstr(opt, "-frandom-seed")
>       && !strstr(opt, "-fripa-disallow-opt-mismatch")
>       && !strstr(opt, "-Wripa-opt-mismatch"))
>
> --
> This patch is available for review at http://codereview.appspot.com/5754067

Patch

Index: opts-global.c
===================================================================
--- opts-global.c	(revision 185148)
+++ opts-global.c	(working copy)
@@ -210,10 +210,12 @@ 
      (3) -W...
      (4) -O...
      (5) --param...
+     (6) -std=... (-std=c99 for restrict keyword)
   */
   if (opt[0] == '-'
       && (opt[1] == 'f' || opt[1] == 'm' || opt[1] == 'W' || opt[1] == 'O'
-	  || (strstr (opt, "--param") == opt))
+	  || (strstr (opt, "--param") == opt)
+	  || (strstr (opt, "-std=")))
       && !strstr(opt, "-frandom-seed")
       && !strstr(opt, "-fripa-disallow-opt-mismatch")
       && !strstr(opt, "-Wripa-opt-mismatch"))