Unified · Split
| @@ -2410,8 +2410,10 @@ PUB_FUNC int tcc_parse_args(TCCState *s, int argc, char **argv) · 2409 unmodified lines | |||
| 2410 | if (s->output_type == 0) | 2410 | if (s->output_type == 0) |
| 2411 | s->output_type = TCC_OUTPUT_EXE; | 2411 | s->output_type = TCC_OUTPUT_EXE; |
| 2412 | 2412 | ||
| 2413 | if (pas->pthread && s->output_type != TCC_OUTPUT_OBJ) | 2413 | if (pas->pthread && s->output_type != TCC_OUTPUT_OBJ) { |
| 2414 | tcc_set_options(s, "-lpthread"); | 2414 | args_parser_add_file(s, "-lpthread", TCC_FILETYPE_BINARY); |
| 2415 | s->nb_libraries++; | ||
| 2416 | } | ||
| 2415 | 2417 | ||
| 2416 | if (s->output_type == TCC_OUTPUT_EXE) | 2418 | if (s->output_type == TCC_OUTPUT_EXE) |
| 2417 | tcc_set_linker(s, (const char *)pas->linker_arg.data); | 2419 | tcc_set_linker(s, (const char *)pas->linker_arg.data); |