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 <x...@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