Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
# -*- 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 ...@@ -33,7 +33,7 @@ if [ $# = 1 ]; then
i386) LISP_VARIANT=x86_darwin ;; i386) LISP_VARIANT=x86_darwin ;;
esac esac
;; ;;
FreeBSD) LISP_VARIANT=FreeBSD_gencgc ;; FreeBSD|freebsd) LISP_VARIANT=x86_freebsd ;;
# Please fill in some other common systems # Please fill in some other common systems
*) echo "Sorry, please specify the desired Lisp variant." *) echo "Sorry, please specify the desired Lisp variant."
exit 1 ;; exit 1 ;;
...@@ -66,7 +66,7 @@ if [ "$MOTIF_VARIANT" = "" ]; then ...@@ -66,7 +66,7 @@ if [ "$MOTIF_VARIANT" = "" ]; then
case $LISP_VARIANT in case $LISP_VARIANT in
alpha_linux) MOTIF_VARIANT=alpha_linux ;; alpha_linux) MOTIF_VARIANT=alpha_linux ;;
alpha_osf1) MOTIF_VARIANT=alpha_osf1 ;; alpha_osf1) MOTIF_VARIANT=alpha_osf1 ;;
FreeBSD*) MOTIF_VARIANT=FreeBSD ;; FreeBSD*|freebsd*) MOTIF_VARIANT=FreeBSD ;;
NetBSD*) MOTIF_VARIANT=NetBSD ;; NetBSD*) MOTIF_VARIANT=NetBSD ;;
OpenBSD*) MOTIF_VARIANT=OpenBSD ;; OpenBSD*) MOTIF_VARIANT=OpenBSD ;;
*_darwin) MOTIF_VARIANT=Darwin ;; *_darwin) MOTIF_VARIANT=Darwin ;;
...@@ -91,8 +91,11 @@ find src -name 'CVS' -prune -o -type d -print \ ...@@ -91,8 +91,11 @@ find src -name 'CVS' -prune -o -type d -print \
| sed "s:^src:$TARGET:g" | xargs mkdir | sed "s:^src:$TARGET:g" | xargs mkdir
# Link Makefile and Config files # 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 # Create empty initial map file
echo 'Map file for lisp version 0' > $TARGET/lisp/lisp.nm echo 'Map file for lisp version 0' > $TARGET/lisp/lisp.nm
...@@ -121,12 +124,9 @@ case $LISP_VARIANT in ...@@ -121,12 +124,9 @@ case $LISP_VARIANT in
esac esac
sed "s;@@gcname@@;$gcname;" $SETENV/openbsd-features.lisp >> $TARGET/setenv.lisp sed "s;@@gcname@@;$gcname;" $SETENV/openbsd-features.lisp >> $TARGET/setenv.lisp
;; ;;
*FreeBSD*) *FreeBSD*|*freebsd*)
case $LISP_VARIANT in gcname=":gencgc"
*_gencgc*) gcname=":gencgc" ;; sed "s;@@gcname@@;$gcname;" $SETENV/freebsd-features.lisp >> $TARGET/setenv.lisp
*) gcname=":cgc" ;;
esac
sed "s;@@gcname@@;$gcname;" $SETENV/freebsd-features.lisp >> $TARGET/setenv.lisp
;; ;;
*solaris*) *solaris*)
cat $SETENV/solaris-features.lisp >> $TARGET/setenv.lisp cat $SETENV/solaris-features.lisp >> $TARGET/setenv.lisp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment