tcc.c: skip -lpthread when -c option specified

master
Henry Kroll III 2010-11-30 13:58:18 -08:00
parent 0d38e3b663
commit 9e406656c7
1 changed files with 4 additions and 2 deletions

6
tcc.c
View File

@ -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: