Hi all,

I discussed this with Felix and we agree it's probably better to
be more explicit and use csc -L -lfoo instead of csc -lfoo.

Cheers,
Peter
From e0621f744ec58fd4f8e785e02ee356fe4fc1c8c4 Mon Sep 17 00:00:00 2001
From: Peter Bex <[email protected]>
Date: Sat, 14 Oct 2017 15:19:59 +0200
Subject: [PATCH] Remove ambiguous -l<libname> option (fixes #1193)

Instead, one should use -L -l<libname>
---
 NEWS     | 1 +
 csc.mdoc | 8 --------
 csc.scm  | 7 +------
 3 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/NEWS b/NEWS
index 3727dba0..d976ad0a 100644
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,7 @@
 
 - Tools
   - The new "-link" option to csc allows linking with objects from extensions.
+  - The ambiguous "-l<libname>" option for csc has been removed (#1193).
 
 - Core libraries
   - Removed support for memory-mapped files (posix), queues
diff --git a/csc.mdoc b/csc.mdoc
index 16341a12..9383290d 100644
--- a/csc.mdoc
+++ b/csc.mdoc
@@ -265,14 +265,6 @@ Select a C compiler other than the default.
 Select a C++ compiler other than the default.
 .It Fl ld Ar COMPILER
 Select a linker other than the default.
-.It Fl l Ns Ar LIBNAME
-Link with given library
-.Po
-.Sq lib Ns Ar LIBNAME
-on UNIX,
-.Sq Ar LIBNAME Ns .lib
-on Windows
-.Pc .
 .It Fl static-libs
 Link with static CHICKEN libraries and extensions.
 .It Fl F Ns Ar <DIR>
diff --git a/csc.scm b/csc.scm
index 15882f27..f1030c30 100644
--- a/csc.scm
+++ b/csc.scm
@@ -450,9 +450,6 @@ Usage: #{csc} [OPTION ...] [FILENAME ...]
     -cc COMPILER                   select other C compiler than the default
     -cxx COMPILER                  select other C++ compiler than the default
     -ld COMPILER                   select other linker than the default 
-    -lLIBNAME                      link with given library
-                                    (`libLIBNAME' on UNIX,
-                                     `LIBNAME.lib' on Windows)
     -static                        link with static CHICKEN libraries and
                                     extensions (if possible)
     -F<DIR>                        pass \"-F<DIR>\" to C compiler
@@ -766,9 +763,7 @@ EOF
 		       (t-options arg) ]
 		      [(and (> (string-length arg) 1)
 			    (char=? #\- (string-ref arg 0)) )
-		       (cond [(char=? #\l (string-ref arg 1))
-			      (set! link-options (append link-options (list arg))) ]
- 			     [(char=? #\L (string-ref arg 1))
+		       (cond [(char=? #\L (string-ref arg 1))
  			      (set! link-options (append link-options (list arg))) ]
  			     [(char=? #\I (string-ref arg 1))
  			      (set! compile-options (append compile-options (list arg))) ]
-- 
2.11.0

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Chicken-hackers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to