summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tcc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tcc.c b/tcc.c
index cd887d1..ee55ddd 100644
--- a/tcc.c
+++ b/tcc.c
@@ -298,8 +298,10 @@ redo:
if (n > 1 && s->outfile)
tcc_error("cannot specify output file with -c many files");
} else {
- if (s->option_pthread)
+ if (s->option_pthread) {
tcc_set_options(s, "-lpthread");
+ n = s->nb_files;
+ }
}
if (s->do_bench)