From 9e406656c739f67e5fdf8b115da40b8381b9286b Mon Sep 17 00:00:00 2001 From: Henry Kroll III Date: Tue, 30 Nov 2010 13:58:18 -0800 Subject: [PATCH] tcc.c: skip -lpthread when -c option specified --- tcc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tcc.c b/tcc.c index 969e0227..6bd4ca1e 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: