Skip to content

Commit

Permalink
tidied up OpenBSD-vs.-FreeBSD stuff, and src/runtime/Config.x86-*
Browse files Browse the repository at this point in the history
  • Loading branch information
William Harold Newman committed Oct 2, 2000
1 parent 3aba915 commit eaf8fba
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 41 deletions.
7 changes: 5 additions & 2 deletions make-config.sh
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/cold/warm.lisp
Expand Up @@ -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
Expand Down
20 changes: 1 addition & 19 deletions 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
7 changes: 7 additions & 0 deletions 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
14 changes: 2 additions & 12 deletions 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
10 changes: 10 additions & 0 deletions 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
27 changes: 22 additions & 5 deletions src/runtime/GNUmakefile
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion version.lisp-expr
Expand Up @@ -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"

0 comments on commit eaf8fba

Please sign in to comment.