mirror of
https://github.com/frida/tinycc
synced 2025-01-11 14:19:19 +03:00
Revert "Fix -pthread option handling"
This reverts commit 3f8225509b
.
It fixes the linking case but introduces an ugly error with -c
about adding a library. To fix both uses the old code structure is
better.
This commit is contained in:
parent
3f8225509b
commit
1b1b270f1e
5
libtcc.c
5
libtcc.c
@ -1742,14 +1742,13 @@ reparse:
|
||||
tcc_set_lib_path(s, optarg);
|
||||
break;
|
||||
case TCC_OPTION_l:
|
||||
add_lib:
|
||||
args_parser_add_file(s, optarg, AFF_TYPE_LIB);
|
||||
s->nb_libraries++;
|
||||
break;
|
||||
case TCC_OPTION_pthread:
|
||||
parse_option_D(s, "_REENTRANT");
|
||||
optarg = "pthread";
|
||||
goto add_lib;
|
||||
s->option_pthread = 1;
|
||||
break;
|
||||
case TCC_OPTION_bench:
|
||||
s->do_bench = 1;
|
||||
break;
|
||||
|
3
tcc.c
3
tcc.c
@ -297,6 +297,9 @@ redo:
|
||||
tcc_error("cannot specify libraries with -c");
|
||||
if (n > 1 && s->outfile)
|
||||
tcc_error("cannot specify output file with -c many files");
|
||||
} else {
|
||||
if (s->option_pthread)
|
||||
tcc_set_options(s, "-lpthread");
|
||||
}
|
||||
|
||||
if (s->do_bench)
|
||||
|
Loading…
Reference in New Issue
Block a user