File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,8 @@ const char *gcc_options_without_argument[]=
163
163
" -print-multi-directory" ,
164
164
" -print-multi-lib" ,
165
165
" -print-search-dirs" ,
166
+ " -print-sysroot" ,
167
+ " -print-sysroot-headers-suffix" ,
166
168
" -Q" ,
167
169
" -Qn" ,
168
170
" -Qy" ,
Original file line number Diff line number Diff line change @@ -380,12 +380,24 @@ int gcc_modet::doit()
380
380
return EX_OK; // Exit!
381
381
}
382
382
383
- if (cmdline.isset (" dumpversion" ))
383
+ if (
384
+ cmdline.isset (" dumpmachine" ) || cmdline.isset (" dumpspecs" ) ||
385
+ cmdline.isset (" dumpversion" ) || cmdline.isset (" print-sysroot" ) ||
386
+ cmdline.isset (" print-sysroot-headers-suffix" ))
384
387
{
385
388
if (produce_hybrid_binary)
386
389
return run_gcc (compiler);
387
390
388
- std::cout << " 3.4.4\n " ;
391
+ // GCC will only print one of these, even when multiple arguments are
392
+ // passed, so we do the same
393
+ if (cmdline.isset (" dumpmachine" ))
394
+ std::cout << config.this_architecture () << ' \n ' ;
395
+ else if (cmdline.isset (" dumpversion" ))
396
+ std::cout << " 3.4.4\n " ;
397
+
398
+ // we don't have any meaningful output for the other options, and GCC
399
+ // doesn't necessarily produce non-empty output either
400
+
389
401
return EX_OK;
390
402
}
391
403
You can’t perform that action at this time.
0 commit comments