X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-posix%2Fsb-posix.asd;h=3902c119ece33b01ddb8693a52b4d2b8d6a9dd14;hb=fb8533122551bbb7aea669f40bc91c1211809b58;hp=d307ef007754b1a9e6a1d822b843d7d9b4850434;hpb=6ffb09605de7f990332aee146d8f69ba4cc907c9;p=sbcl.git diff --git a/contrib/sb-posix/sb-posix.asd b/contrib/sb-posix/sb-posix.asd index d307ef0..3902c11 100644 --- a/contrib/sb-posix/sb-posix.asd +++ b/contrib/sb-posix/sb-posix.asd @@ -33,11 +33,12 @@ (unless (zerop (run-shell-command "gcc ~A -o ~S ~{~S ~}" - (if (sb-ext:posix-getenv "LDFLAGS") - (sb-ext:posix-getenv "LDFLAGS") - #+sunos "-shared -lresolv -lsocket -lnsl" - #+darwin "-bundle" - #-(or darwin sunos) "-shared") + (concatenate 'string + (sb-ext:posix-getenv "EXTRA_LDFLAGS") + " " + #+sunos "-shared -lresolv -lsocket -lnsl" + #+darwin "-bundle" + #-(or darwin sunos) "-shared") dso-name (mapcar #'unix-name (mapcan (lambda (c) @@ -54,9 +55,11 @@ (defmethod perform ((op compile-op) (c c-source-file)) (unless (= 0 (run-shell-command "gcc ~A -o ~S -c ~S" - (if (sb-ext:posix-getenv "CFLAGS") - (sb-ext:posix-getenv "CFLAGS") - "-fPIC") + (concatenate + 'string + (sb-ext:posix-getenv "EXTRA_CFLAGS") + " " + "-fPIC") (unix-name (car (output-files op c))) (unix-name (component-pathname c)))) (error 'operation-error :operation op :component c))) @@ -68,8 +71,7 @@ (let ((co (make-instance 'compile-op))) (let ((filename (car (output-files co c)))) #+cmu (ext:load-foreign filename) - #+sbcl (sb-alien:load-1-foreign filename)))) - + #+sbcl (sb-alien:load-shared-object filename)))) (defsystem sb-posix :depends-on (sb-grovel) @@ -97,5 +99,21 @@ (operate 'test-op 'sb-posix-tests)) (defmethod perform ((o test-op) (c (eql (find-system :sb-posix-tests)))) - (or (funcall (intern "DO-TESTS" (find-package "SB-RT"))) - (error "test-op failed"))) + (funcall (intern "DO-TESTS" (find-package "SB-RT"))) + (let ((failures (funcall (intern "PENDING-TESTS" "SB-RT"))) + (ignored-failures (loop for sym being the symbols of :sb-posix-tests + if (search ".ERROR" (symbol-name sym)) + collect sym))) + (cond + ((null failures) + t) + ((null (set-difference failures ignored-failures)) + (warn "~@") + t) + (t + (error "non-errno tests failed!")))))