Unified · Split
| @@ -47,7 +47,7 @@ static void help(void) · 46 unmodified lines | |||
| 47 | " -v display current version, increase verbosity\n" | 47 | " -v display current version, increase verbosity\n" |
| 48 | " -c compile only - generate an object file\n" | 48 | " -c compile only - generate an object file\n" |
| 49 | " -o outfile set output filename\n" | 49 | " -o outfile set output filename\n" |
| 50 | " -Bdir set tcc internal library path\n" | 50 | " -Bdir set tcc internal library and include path\n" |
| 51 | " -bench output compilation statistics\n" | 51 | " -bench output compilation statistics\n" |
| 52 | " -run run compiled source\n" | 52 | " -run run compiled source\n" |
| 53 | " -fflag set or reset (with 'no-' prefix) 'flag' (see man page)\n" | 53 | " -fflag set or reset (with 'no-' prefix) 'flag' (see man page)\n" |
| @@ -374,6 +374,12 @@ static int parse_args(TCCState *s, int argc, char **argv) · 320 unmodified lines | |||
| 374 | case TCC_OPTION_B: | 374 | case TCC_OPTION_B: |
| 375 | /* set tcc utilities path (mainly for tcc development) */ | 375 | /* set tcc utilities path (mainly for tcc development) */ |
| 376 | tcc_set_lib_path(s, optarg); | 376 | tcc_set_lib_path(s, optarg); |
| 377 | /* append /include and add it as -isystem, as gcc does */ | ||
| 378 | r = tcc_strdup(optarg); | ||
| 379 | r = tcc_realloc(r, strlen(r) + 8 + 1); | ||
| 380 | strcat(r, "/include"); | ||
| 381 | tcc_add_sysinclude_path(s, r); | ||
| 382 | tcc_free(r); | ||
| 377 | break; | 383 | break; |
| 378 | case TCC_OPTION_l: | 384 | case TCC_OPTION_l: |
| 379 | dynarray_add((void ***)&files, &nb_files, r); | 385 | dynarray_add((void ***)&files, &nb_files, r); |