From eaf8fba81bf664086f8f0d5618147a049f168cd5 Mon Sep 17 00:00:00 2001 From: William Harold Newman Date: Mon, 2 Oct 2000 17:27:10 +0000 Subject: [PATCH] tidied up OpenBSD-vs.-FreeBSD stuff, and src/runtime/Config.x86-* --- make-config.sh | 7 +++++-- src/cold/warm.lisp | 2 -- src/runtime/Config.x86-bsd | 20 +------------------- src/runtime/Config.x86-freebsd | 7 +++++++ src/runtime/Config.x86-linux | 14 ++------------ src/runtime/Config.x86-openbsd | 10 ++++++++++ src/runtime/GNUmakefile | 27 ++++++++++++++++++++++----- version.lisp-expr | 2 +- 8 files changed, 48 insertions(+), 41 deletions(-) create mode 100644 src/runtime/Config.x86-freebsd create mode 100644 src/runtime/Config.x86-openbsd diff --git a/make-config.sh b/make-config.sh index 3b112dd..85eaea1 100644 --- a/make-config.sh +++ b/make-config.sh @@ -46,26 +46,29 @@ for d in src/compiler src/assembly; do done echo //setting up OS-dependent information +original_dir=`pwd` cd src/runtime/ rm -f Config if [ `uname` = Linux ]; then echo -n ' :linux' >> $ltf ln -s Config.x86-linux Config elif uname | grep BSD; then + echo -n ' :bsd' >> $ltf if [ `uname` = FreeBSD ]; then echo -n ' :freebsd' >> $ltf + ln -s Config.x86-freebsd Config elif [ `uname` = OpenBSD ]; then echo -n ' :openbsd' >> $ltf + ln -s Config.x86-openbsd Config else echo unsupported BSD variant: `uname` exit 1 fi - echo -n ' :bsd' >> $ltf - ln -s Config.x86-bsd Config else echo unsupported OS type: `uname` exit 1 fi +cd $original_dir echo //finishing $ltf echo ')' >> $ltf diff --git a/src/cold/warm.lisp b/src/cold/warm.lisp index 566fd7e..8efbc69 100644 --- a/src/cold/warm.lisp +++ b/src/cold/warm.lisp @@ -202,9 +202,7 @@ "src/code/inspect" ; FIXME: should be byte compiled "src/code/profile" "src/code/ntrace" - #+nil ; REMOVEME (for debugging 0.6.7.6 on OpenBSD only) "src/code/foreign" - #+nil ; REMOVEME (for debugging 0.6.7.6 on OpenBSD only) "src/code/run-program" ;; Code derived from PCL's pre-ANSI DESCRIBE-OBJECT ;; facility is still used in our ANSI DESCRIBE diff --git a/src/runtime/Config.x86-bsd b/src/runtime/Config.x86-bsd index 8017592..642c8d5 100644 --- a/src/runtime/Config.x86-bsd +++ b/src/runtime/Config.x86-bsd @@ -1,25 +1,7 @@ -CPPFLAGS = -I. - -CC = gcc -Wstrict-prototypes -fno-strength-reduce # -Wall -LD = ld -CPP = cpp -CFLAGS = -g -O2 -DGENCGC -DPOSIX_SIGS -ASFLAGS = -g -DGENCGC -LINKFLAGS = -g -NM = nm -gp +# stuff shared between various *BSD OSes ASSEM_SRC = x86-assem.S ARCH_SRC = x86-arch.c OS_SRC = bsd-os.c os-common.c undefineds.c -# Until version 0.6.7.3, we used "OS_LINK_FLAGS=-static" here, which -# worked fine for most things, but LOAD-FOREIGN & friends require -# dlopen() etc., which in turn depend on dynamic linking of the -# runtime. -#for OpenBSD: -OS_LINK_FLAGS=-static -#for FreeBSD: -#OS_LINK_FLAGS=-dynamic -export-dynamic OS_LIBS=-lm # -ldl - -GC_SRC= gencgc.c diff --git a/src/runtime/Config.x86-freebsd b/src/runtime/Config.x86-freebsd new file mode 100644 index 0000000..149a999 --- /dev/null +++ b/src/runtime/Config.x86-freebsd @@ -0,0 +1,7 @@ +include Config.x86-bsd + +# Until sbcl-0.6.7.3, we used "OS_LINK_FLAGS=-static" here, which +# worked fine for most things, but LOAD-FOREIGN & friends require +# dlopen() etc., which in turn depend on dynamic linking of the +# runtime. +OS_LINK_FLAGS = -dynamic -export-dynamic diff --git a/src/runtime/Config.x86-linux b/src/runtime/Config.x86-linux index ce7bf1f..13784ff 100644 --- a/src/runtime/Config.x86-linux +++ b/src/runtime/Config.x86-linux @@ -1,18 +1,8 @@ -CPPFLAGS = -I. - -CC = gcc -Wstrict-prototypes -O2 -fno-strength-reduce # -Wall -LD = ld -CPP = cpp -CFLAGS = -g -O2 -DGENCGC -ASFLAGS = -g -DGENCGC -LINKFLAGS = -g -NM = nm -p - ASSEM_SRC = x86-assem.S linux-stubs.S ARCH_SRC = x86-arch.c OS_SRC = linux-os.c os-common.c -OS_LINK_FLAGS= -OS_LIBS= -ldl +OS_LINK_FLAGS = +OS_LIBS = -ldl GC_SRC= gencgc.c diff --git a/src/runtime/Config.x86-openbsd b/src/runtime/Config.x86-openbsd new file mode 100644 index 0000000..98384cd --- /dev/null +++ b/src/runtime/Config.x86-openbsd @@ -0,0 +1,10 @@ +include Config.x86-bsd + +# KLUDGE: It might seem as though dynamic libraries should work the +# same way on both systems, but in fact gcc supports the "-export-dynamic" +# option on FreeBSD but not on OpenBSD. The documentation I've been +# able to find doesn't seem to begin to explain what's going on (e.g. I +# have never found documentation for the "-export-dynamic" option), +# so I've just punted and left link flags for OpenBSD in their +# pre-dynamic-library-support state. -- WHN 2000-10-02 +OS_LINK_FLAGS = -static diff --git a/src/runtime/GNUmakefile b/src/runtime/GNUmakefile index 9f96cd5..fcd391b 100644 --- a/src/runtime/GNUmakefile +++ b/src/runtime/GNUmakefile @@ -12,16 +12,33 @@ all: sbcl sbcl.nm .PHONY: all -# defaults which might be overridden by values in the Config file -CC = gcc +# defaults which might be overridden or modified by values in the +# Config file +# +# FIXME: The -fno-strength-reduce flag comes from before the fork +# from CMU CL. It's presumably to work around some optimizer bug in gcc, +# but the fork was a long time ago, and the optimizer could easily +# have been fixed since then. Try doing without it. +CFLAGS = -g -Wall -O2 -fno-strength-reduce -DGENCGC +ASFLAGS = -g -DGENCGC DEPEND_FLAGS = +CPPFLAGS = -I. # The Config file is the preferred place for tweaking options which -# are appropriate for particular setups (OS, CPU, whatever). Make -# a Config-foo file for setup foo, then set Config to be a symlink -# to Config-foo. +# are appropriate for particular setups (OS, CPU, whatever). Make a +# Config-foo file for setup foo, then arrange for Config to be a +# symlink to Config-foo. include Config +# Some of these things might be Config-dependent in future versions, +# but they're not right now, i.e., they happen to be the same for +# all supported systems. +CPP = cpp +GC_SRC = gencgc.c +LD = ld +LINKFLAGS = -g +NM = nm -gp + SRCS = alloc.c backtrace.c breakpoint.c coreparse.c \ dynbind.c globals.c interr.c interrupt.c \ monitor.c parse.c print.c purify.c \ diff --git a/version.lisp-expr b/version.lisp-expr index f08e56a..eae71cb 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -15,4 +15,4 @@ ;;; versions, and a string a la "0.6.5.12" is used for versions which ;;; aren't released but correspond only to CVS tags or snapshots. -"0.6.7.6" +"0.6.7.7" -- 1.7.10.4