Commit de39fd0a authored by rtoy's avatar rtoy
Browse files

Config.x86_common:

o Use += to append to variables instead of setting them.
o Add common OS_SRC files.
o Move rule for building e_rem_pio2.c to here.  Add CPPFLAGS too.

Config.x86_common:
o Remove common files from OS_SRC.
o Remove rele for e_rem_pio2.c

Config.x86_darwin:
o Update to use Config.x86_common.

GNUmakefile:
o Use CPPFLAGS when building version.o
parent 23f7ec4b
# -*- Mode: makefile -*-
# These tell gmake where to look for .h, .c and .S files. Mostly for
# building the binary outside of the src tree.
PATH1 = ../../src/lisp
vpath %.h $(PATH1)
vpath %.c $(PATH1)
vpath %.S $(PATH1)
CPP_DEFINE_CPU_ARCH := -Di386
CPP_DEFINE_OPTIONS := -Di386
# Enable support for :linkage-table feature.
ifdef FEATURE_LINKAGE_TABLE
CPP_DEFINE_LINKAGE := -DLINKAGE_TABLE
CPP_DEFINE_OPTIONS += -DLINKAGE_TABLE
endif
# Enable support for generational GC
ifdef FEATURE_GENCGC
CPP_DEFINE_GENCGC := -DGENCGC
CPP_DEFINE_OPTIONS += -DGENCGC
GC_SRC := gencgc.c
else
GC_SRC := cgc.c
CPP_DEFINE_OPTIONS += -DWANT_CGC
endif
ifneq ($(or $(FEATURE_X87),$(FEATURE_SSE2)),)
CPP_DEFINE_SSE2 := -DFEATURE_SSE2
CPP_DEFINE_OPTIONS += -DFEATURE_SSE2
endif
CPP_DEFINE_OPTIONS := $(CPP_DEFINE_CPU_ARCH) $(CPP_DEFINE_GENCGC) $(CPP_DEFINE_LINKAGE) $(CPP_DEFINE_SSE2)
CC = gcc
CC ?= gcc
LD = ld
CPP = cpp
......@@ -35,10 +39,18 @@ CPP_INCLUDE_OPTIONS := -I. -I$(PATH1) -I-
endif
CPPFLAGS := $(CPP_DEFINE_OPTIONS) $(CPP_INCLUDE_OPTIONS)
CFLAGS := -Wstrict-prototypes -Wall -O2 -g
CFLAGS += -Wstrict-prototypes -Wall -O2 -g
ASFLAGS = -g
ASSEM_SRC = x86-assem.S
ARCH_SRC = x86-arch.c
OS_SRC = os-common.c e_rem_pio2.c k_rem_pio2.c
NM = nm -gp
# This has aliasing problems, so turn off aliasing and also turn on
# float-store so x87 arithmetic behaves like double-precision
# arithmetic. And with SSE2 support, we don't want the C code to be
# compiled differently. Hence, we need -ffloat-store with SSE2.
e_rem_pio2.o : e_rem_pio2.c
$(CC) -c -fno-strict-aliasing -ffloat-store $(CFLAGS) $(CPPFLAGS) $<
# -*- Mode: makefile -*-
PATH1 = ../../src/lisp
vpath %.h $(PATH1)
vpath %.c $(PATH1)
vpath %.S $(PATH1)
INCLUDES = -iquote . -iquote $(PATH1)
CC = gcc
LD = ld
CPP = cpp
ifdef FEATURE_LINKAGE_TABLE
RUNTIME += -DLINKAGE_TABLE
endif
# Enable support for generational GC
ifdef FEATURE_GENCGC
RUNTIME += -DGENCGC
GC_SRC = gencgc.c
endif
# If either FEATURE_X7 or FEATURE_SSE2 is defined, compile the code
# for SSE2 support.
ifdef FEATURE_X87
RUNTIME += -DFEATURE_SSE2
endif
ifdef FEATURE_SSE2
RUNTIME += -DFEATURE_SSE2
endif
include Config.x86_common
# Compile code that will run on OSX 10.4 (Tiger)
MIN_VER = -mmacosx-version-min=10.4
RUNTIME += $(MIN_VER)
CPPFLAGS = -Di386 -DDARWIN $(RUNTIME)
CFLAGS = -Wstrict-prototypes -Wall -g3 $(CPPFLAGS) $(INCLUDES)
ASFLAGS = -g3 $(INCLUDES) $(RUNTIME)
NM = nm -gp
CPPFLAGS += -DDARWIN $(MIN_VER)
CFLAGS += -g3
ASFLAGS += -g3 $(MIN_VER)
UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
ASSEM_SRC = x86-assem.S
ARCH_SRC = x86-arch.c
OS_SRC = Darwin-os.c os-common.c e_rem_pio2.c k_rem_pio2.c
OS_SRC += Darwin-os.c
OS_LINK_FLAGS = $(MIN_VER)
OS_LIBS =
# This has aliasing problems, so turn off aliasing.
e_rem_pio2.o : e_rem_pio2.c
$(CC) -c -fno-strict-aliasing -ffloat-store $(CFLAGS) $<
......@@ -2,10 +2,6 @@
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_SRC += FreeBSD-os.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) $<
# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/GNUmakefile,v 1.31 2008/12/27 17:35:50 rtoy Exp $
# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/GNUmakefile,v 1.32 2009/01/11 17:52:44 rtoy Exp $
all: lisp.nm
......@@ -33,7 +33,7 @@ lisp.nm: lisp lisp.a
version.o : version.c version
echo '1 + ' `cat version` | bc > ,version
mv ,version version
$(CC) ${CFLAGS} -DVERSION=`cat version` -c $<
$(CC) ${CFLAGS} $(CPPFLAGS) -DVERSION=`cat version` -c $<
lisp: ${OBJS} version.o
$(CC) -g ${OS_LINK_FLAGS} -o ,lisp \
......
Markdown is supported
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