aboutsummaryrefslogtreecommitdiff
path: root/tcc.c
diff options
context:
space:
mode:
authorKirill Smelkov <kirr@mns.spb.ru>2010-06-20 19:18:58 +0400
committerKirill Smelkov <kirr@mns.spb.ru>2010-06-21 20:49:46 +0400
commit93de8d803876f88091effb45cfcfbdcaf8c25823 (patch)
tree326ebad7d2545aa00996d1e174e00acac2e84463 /tcc.c
parent441a089aa494f4018963ebf19ca3e29639e4eee3 (diff)
downloadtinycc-93de8d803876f88091effb45cfcfbdcaf8c25823.tar.gz
tinycc-93de8d803876f88091effb45cfcfbdcaf8c25823.tar.bz2
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.'
Diffstat (limited to 'tcc.c')
-rw-r--r--tcc.c2
1 files changed, 1 insertions, 1 deletions
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;