aboutsummaryrefslogtreecommitdiff
path: root/tcc.c
diff options
context:
space:
mode:
authorHenry Kroll III <henry@comptune.com>2010-11-30 13:58:18 -0800
committerHenry Kroll III <henry@comptune.com>2010-11-30 13:58:18 -0800
commit9e406656c739f67e5fdf8b115da40b8381b9286b (patch)
treeb7e2c32a401afc89787d754175dc060f64570de6 /tcc.c
parent0d38e3b66348d914ac5c1a19d75edb5e3212a89b (diff)
downloadtinycc-9e406656c739f67e5fdf8b115da40b8381b9286b.tar.gz
tinycc-9e406656c739f67e5fdf8b115da40b8381b9286b.tar.bz2
tcc.c: skip -lpthread when -c option specified
Diffstat (limited to 'tcc.c')
-rw-r--r--tcc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tcc.c b/tcc.c
index 969e022..6bd4ca1 100644
--- a/tcc.c
+++ b/tcc.c
@@ -298,8 +298,10 @@ static int parse_args(TCCState *s, int argc, char **argv)
break;
case TCC_OPTION_pthread:
/* fixme: these options could be different on your platform */
- dynarray_add((void ***)&files, &nb_files, "-lpthread");
- nb_libraries++;
+ if(output_type != TCC_OUTPUT_OBJ){
+ dynarray_add((void ***)&files, &nb_files, "-lpthread");
+ nb_libraries++;
+ }
tcc_define_symbol(s, "_REENTRANT", "1");
break;
case TCC_OPTION_bench: