From: Christophe Rhodes Date: Sat, 29 Nov 2003 20:41:47 +0000 (+0000) Subject: 0.8.6.14: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=99501797db3d77ff2a7f32071d7fab0db3fdacae;p=sbcl.git 0.8.6.14: Ouch. That was hard work. ... contrib fix primarily for SunOS but also I think for Darwin; at least, if it was working it was only by accident. ... uname -m never returns either "solaris" or "darwin", so that code was wrong to start with; ... change the protocol so that we do EXTRA_CFLAGS rather than a complete override; now we don't need the solaris or darwin clauses in asdf-module.mk that weren't being used anyway; ... delete more stuff in make-target-contrib.sh so that we can actually see the effect of these changes rather than blindly reusing an old alien.so (which explains why I hadn't noticed this before, *sigh*; I ran a completely clean build on Solaris for the first time in months yesterday) ... now sb-bsd-sockets and dependents work again. I hope I haven't broken x86-64 in the process. --- diff --git a/contrib/asdf-module.mk b/contrib/asdf-module.mk index c646b9d..8087ab9 100644 --- a/contrib/asdf-module.mk +++ b/contrib/asdf-module.mk @@ -1,29 +1,19 @@ CC=gcc -# Need to set CFLAGS and LDFLAGS here. sb-posix, sb-grovel, and -# sb-bsd-sockets depends upon these being set on x86_64. Setting these -# in their Makefile's is not adequate since their asd files are -# invoked when loaded from other modules which don't require these -# environmental values in their Makefile's. +# We need to extend flags to the C compiler and the linker +# here. sb-posix, sb-grovel, and sb-bsd-sockets depends upon these +# being set on x86_64. Setting these in their Makefiles is not +# adequate since, while we're building contrib, they can be compiled +# directly via ASDF from a non-C-aware module which has these tricky +# ones as dependencies. UNAME:=$(shell uname -m) -export CFLAGS=-fPIC -ifeq (solaris,$(UNAME)) - export LDFLAGS=-shared -lresolv -lsocket -lnsl -else - ifeq (Darwin,$(UNAME)) - export LDFLAGS=-bundle - else - ifeq (x86_64,$(UNAME)) - export LDFLAGS=-m32 -shared - export CFLAGS+= -m32 - else - export LDFLAGS=-shared - endif - endif +ifeq (x86_64,$(UNAME)) + export EXTRA_LDFLAGS=-m32 -shared + export EXTRA_CFLAGS+=-m32 endif -export CC SBCL CFLAGS LDFLAGS +export CC SBCL EXTRA_CFLAGS EXTRA_LDFLAGS all: $(EXTRA_ALL_TARGETS) $(MAKE) -C ../asdf diff --git a/contrib/sb-bsd-sockets/sb-bsd-sockets.asd b/contrib/sb-bsd-sockets/sb-bsd-sockets.asd index 6056a5a..fd251d6 100644 --- a/contrib/sb-bsd-sockets/sb-bsd-sockets.asd +++ b/contrib/sb-bsd-sockets/sb-bsd-sockets.asd @@ -30,11 +30,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) @@ -51,9 +52,10 @@ (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))) diff --git a/contrib/sb-grovel/def-to-lisp.lisp b/contrib/sb-grovel/def-to-lisp.lisp index 88e4bae..b16560b 100644 --- a/contrib/sb-grovel/def-to-lisp.lisp +++ b/contrib/sb-grovel/def-to-lisp.lisp @@ -105,8 +105,8 @@ printf(\"(in-package ~S)\\\n\");~%" package-name) filename tmp-c-source (constants-package component)) (and (= (run-shell-command "gcc ~A -o ~S ~S" - (if (sb-ext:posix-getenv "CFLAGS") - (sb-ext:posix-getenv "CFLAGS") + (if (sb-ext:posix-getenv "EXTRA_CFLAGS") + (sb-ext:posix-getenv "EXTRA_CFLAGS") "") (namestring tmp-a-dot-out) (namestring tmp-c-source)) 0) diff --git a/contrib/sb-posix/sb-posix.asd b/contrib/sb-posix/sb-posix.asd index 3fd109a..b2a87ab 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))) @@ -70,7 +73,6 @@ #+cmu (ext:load-foreign filename) #+sbcl (sb-alien:load-1-foreign filename)))) - (defsystem sb-posix :depends-on (sb-grovel) #+sb-building-contrib :pathname diff --git a/make-target-contrib.sh b/make-target-contrib.sh index 2af8c5f..d541ea9 100644 --- a/make-target-contrib.sh +++ b/make-target-contrib.sh @@ -30,7 +30,7 @@ export SBCL SBCL_BUILDING_CONTRIB # as SB-RT and SB-GROVEL, but FIXME: there's probably a better # solution. -- CSR, 2003-05-30 -find contrib/ \( -name '*.fasl' -o -name 'foo.c' -o -name 'a.out' \) \ +find contrib/ \( -name '*.fasl' -o -name 'foo.c' -o -name 'a.out' -o -name 'alien.so' -o -name '*.o' \) \ -print | xargs rm -f mkdir -p contrib/systems diff --git a/version.lisp-expr b/version.lisp-expr index 4081e2c..051ada2 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.6.13" +"0.8.6.14"