tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] [PATCH 10/11] tcc: Explicitly require -l<lib> for librari


From: Kirill Smelkov
Subject: [Tinycc-devel] [PATCH 10/11] tcc: Explicitly require -l<lib> for libraries
Date: Mon, 21 Jun 2010 18:31:29 +0400

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.'
---
 tcc.c |    2 +-
 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;
-- 
1.7.1.427.g9562c




reply via email to

[Prev in Thread] Current Thread [Next in Thread]