Commit 1633a69e authored by agoncharov's avatar agoncharov
Browse files

Keep the settings common to all x86 platforms in Config.x86_common.

Use a new (much smaller) Config.x86_freebsd, named consistently with (some) other files.
parent 423bb6de
# -*- Mode: makefile -*-
PATH1 = ../../src/lisp
vpath %.h $(PATH1)
vpath %.c $(PATH1)
vpath %.S $(PATH1)
CPP_DEFINE_CPU_ARCH := -Di386
# Enable support for :linkage-table feature.
ifdef FEATURE_LINKAGE_TABLE
CPP_DEFINE_LINKAGE := -DLINKAGE_TABLE
endif
# Enable support for generational GC
ifdef FEATURE_GENCGC
CPP_DEFINE_GENCGC := -DGENCGC
GC_SRC := gencgc.c
endif
ifneq ($(or $(FEATURE_X87),$(FEATURE_SSE2)),)
CPP_DEFINE_SSE2 := -DFEATURE_SSE2
endif
CPP_DEFINE_OPTIONS := $(CPP_DEFINE_CPU_ARCH) $(CPP_DEFINE_GENCGC) $(CPP_DEFINE_LINKAGE) $(CPP_DEFINE_SSE2)
CC = gcc
LD = ld
CPP = cpp
ifeq ($(filter 2% 3%, $(shell $(CC) -dumpversion)),)
CPP_INCLUDE_OPTIONS := -iquote . -iquote $(PATH1)
else
CPP_INCLUDE_OPTIONS := -I. -I$(PATH1) -I-
endif
CPPFLAGS := $(CPP_DEFINE_OPTIONS) $(CPP_INCLUDE_OPTIONS)
CFLAGS := -Wstrict-prototypes -Wall -O2 -g
ASFLAGS = -g
ASSEM_SRC = x86-assem.S
ARCH_SRC = x86-arch.c
NM = nm -gp
# -*- Mode: makefile -*-
include Config.x86_common
UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
OS_SRC = FreeBSD-os.c os-common.c elf.c e_rem_pio2.c k_rem_pio2.c undefineds.c
OS_LINK_FLAGS = -dynamic -export-dynamic
OS_LIBS = -lutil
# This has aliasing problems, so turn off aliasing.
e_rem_pio2.o : e_rem_pio2.c
$(CC) -c -fno-strict-aliasing -ffloat-store $(CFLAGS) $<
......@@ -33,7 +33,7 @@ if [ $# = 1 ]; then
i386) LISP_VARIANT=x86_darwin ;;
esac
;;
FreeBSD) LISP_VARIANT=FreeBSD_gencgc ;;
FreeBSD|freebsd) LISP_VARIANT=x86_freebsd ;;
# Please fill in some other common systems
*) echo "Sorry, please specify the desired Lisp variant."
exit 1 ;;
......@@ -66,7 +66,7 @@ if [ "$MOTIF_VARIANT" = "" ]; then
case $LISP_VARIANT in
alpha_linux) MOTIF_VARIANT=alpha_linux ;;
alpha_osf1) MOTIF_VARIANT=alpha_osf1 ;;
FreeBSD*) MOTIF_VARIANT=FreeBSD ;;
FreeBSD*|freebsd*) MOTIF_VARIANT=FreeBSD ;;
NetBSD*) MOTIF_VARIANT=NetBSD ;;
OpenBSD*) MOTIF_VARIANT=OpenBSD ;;
*_darwin) MOTIF_VARIANT=Darwin ;;
......@@ -91,8 +91,11 @@ find src -name 'CVS' -prune -o -type d -print \
| sed "s:^src:$TARGET:g" | xargs mkdir
# Link Makefile and Config files
( cd $TARGET/lisp ; ln -s ../../src/lisp/GNUmakefile ./Makefile )
( cd $TARGET/lisp ; ln -s ../../src/lisp/Config.$LISP_VARIANT ./Config )
cd $TARGET/lisp
ln -s ../../src/lisp/GNUmakefile ../../src/lisp/Config.$LISP_VARIANT ../../src/lisp/Config.*_common .
ln -s Config.$LISP_VARIANT Config
cd -
# Create empty initial map file
echo 'Map file for lisp version 0' > $TARGET/lisp/lisp.nm
......@@ -121,12 +124,9 @@ case $LISP_VARIANT in
esac
sed "s;@@gcname@@;$gcname;" $SETENV/openbsd-features.lisp >> $TARGET/setenv.lisp
;;
*FreeBSD*)
case $LISP_VARIANT in
*_gencgc*) gcname=":gencgc" ;;
*) gcname=":cgc" ;;
esac
sed "s;@@gcname@@;$gcname;" $SETENV/freebsd-features.lisp >> $TARGET/setenv.lisp
*FreeBSD*|*freebsd*)
gcname=":gencgc"
sed "s;@@gcname@@;$gcname;" $SETENV/freebsd-features.lisp >> $TARGET/setenv.lisp
;;
*solaris*)
cat $SETENV/solaris-features.lisp >> $TARGET/setenv.lisp
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment