summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2017-12-23 14:49:07 +0100
committerThomas Preud'homme <robotux@celest.fr>2018-02-28 21:00:59 +0000
commit7c2261b8eef7a22a9a33a73d0a5f12039973ed5b (patch)
treec8ff18298211fd70cf0747f2507df178373bac9e
parent849a2f5b4f59a0359d9d3f3620709d92e2beb8d1 (diff)
Fix -pthread option handling
Adding -pthread confused option parsing as the number of file counting came out wrong. Origin: upstream, http://repo.or.cz/tinycc.git/commit/3b27b3b1d1ae953f5ecb37f5bc95758499d66971 Bug-Debian: https://bugs.debian.org/891592 Last-Update: 2018-02-28 Applied-Upstream: commit:3b27b3b1d1ae953f5ecb37f5bc95758499d66971
-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)