chiark
/
gitweb
/
~mdw
/
clg
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8d019b4
)
Added :ldflags option to component unix-dso
author
espen
<espen>
Thu, 31 Aug 2006 09:35:36 +0000
(09:35 +0000)
committer
espen
<espen>
Thu, 31 Aug 2006 09:35:36 +0000
(09:35 +0000)
tools/asdf-extensions.lisp
patch
|
blob
|
blame
|
history
diff --git
a/tools/asdf-extensions.lisp
b/tools/asdf-extensions.lisp
index 14a4db7862a7ea6d2297418ff71d76ce7e1a247e..cd69b8557f5fc7a6396315fc14562b87551c8c28 100644
(file)
--- a/
tools/asdf-extensions.lisp
+++ b/
tools/asdf-extensions.lisp
@@
-5,19
+5,12
@@
(export '*dso-extension*)
(defvar *dso-extension* #-darwin"so" #+darwin"dylib")
(defvar *dso-extension* #-darwin"so" #+darwin"dylib")
-(defun concatenate-strings (strings &optional delimiter)
- (if (not (rest strings))
- (first strings)
- (concatenate
- 'string
- (first strings)
- (if delimiter (string delimiter) "")
- (concatenate-strings (rest strings) delimiter))))
-
;;; The following code is more or less copied frm sb-bsd-sockets.asd,
;;; but extended to allow flags to be set in a general way
;;; The following code is more or less copied frm sb-bsd-sockets.asd,
;;; but extended to allow flags to be set in a general way
-(defclass unix-dso (module) ())
+(defclass unix-dso (module)
+ ((ldflags :initform nil :initarg :ldflags)))
+
(defun unix-name (pathname)
(namestring
(typecase pathname
(defun unix-name (pathname)
(namestring
(typecase pathname
@@
-41,12
+34,13
@@
(defmethod perform :after ((operation compile-op) (dso unix-dso))
(unless (zerop
(run-shell-command
"gcc ~A -o ~S ~{~S ~}"
(unless (zerop
(run-shell-command
"gcc ~A -o ~S ~{~S ~}"
- (concatenate 'string
-;; (sb-ext:posix-getenv "EXTRA_LDFLAGS")
-;; " "
- #+sunos "-shared -lresolv -lsocket -lnsl"
- #+darwin "-bundle"
- #-(or darwin sunos) "-shared")
+ (clg-utils:concatenate-strings
+ (cons
+ #+sunos "-shared -lresolv -lsocket -lnsl"
+ #+darwin "-bundle"
+ #-(or darwin sunos) "-shared"
+ (slot-value dso 'ldflags))
+ #\sp)
dso-name
(mapcar #'unix-name
(mapcan (lambda (c)
dso-name
(mapcar #'unix-name
(mapcan (lambda (c)
@@
-87,7
+81,7
@@
(defmethod output-files ((op compile-op) (c c-source-file))
(defmethod perform ((op compile-op) (c c-source-file))
(unless
(= 0 (run-shell-command "gcc ~A -o ~S -c ~S"
(defmethod perform ((op compile-op) (c c-source-file))
(unless
(= 0 (run-shell-command "gcc ~A -o ~S -c ~S"
- (concatenate-strings
+ (c
lg-utils:c
oncatenate-strings
(append
(list "-fPIC")
(when (slot-value c 'optimization)
(append
(list "-fPIC")
(when (slot-value c 'optimization)