tcc: Explicitly require -l<lib> for libraries

Previously it was possible to specify e.g. -q<lib> and still link with
lib. Avoid such behaviour by checking for '-l' instead of '-l.'
master
Kirill Smelkov 2010-06-20 19:18:58 +04:00
parent 441a089aa4
commit 93de8d8038
1 changed files with 1 additions and 1 deletions

2
tcc.c
View File

@ -474,7 +474,7 @@ int main(int argc, char **argv)
const char *filename;
filename = files[i];
if (filename[0] == '-' && filename[1]) {
if (filename[0] == '-' && filename[1] == 'l') {
if (tcc_add_library(s, filename + 2) < 0) {
error_noabort("cannot find %s", filename);
ret = 1;