From 93de8d803876f88091effb45cfcfbdcaf8c25823 Mon Sep 17 00:00:00 2001 From: Kirill Smelkov Date: Sun, 20 Jun 2010 19:18:58 +0400 Subject: [PATCH] tcc: Explicitly require -l for libraries Previously it was possible to specify e.g. -q and still link with lib. Avoid such behaviour by checking for '-l' instead of '-l.' --- tcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcc.c b/tcc.c index b9478d9..136612e 100644 --- a/tcc.c +++ b/tcc.c @@ -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;