Skip to content
Snippets Groups Projects
Commit 03cd24a9 authored by rtoy's avatar rtoy
Browse files

Apply patch from Stelian Ionescu on cmucl-imp, 2008/12/24 to allow

custom CFLAGS, CC, and LDFLAGS.  Slightly modified to move -m32 from
CC to RUNTIME.

Cleaned some other items for Linux.

lisp/Config.linux_gencgc:
o Define CC only if not already defined.
o Remove -m32 flag from CC and put it in RUNTIME.
o Incrementally add to RUNTIME, removing the LINKAGE, GENCGC, and SSE2
  variables.
o Add -m32 flag to OS_LINK_FLAGS

lisp/GNUmakefile:
o Define CC only if not already defined.  (Do this after loading
  Config).

motif/server/Config.x86:
o Allow custom LDFLAGS and CFLAGS when building the motif server.
parent e1284111
No related branches found
No related tags found
No related merge requests found
......@@ -3,18 +3,21 @@ PATH1 = ../../src/lisp
vpath %.h $(PATH1)
vpath %.c $(PATH1)
vpath %.S $(PATH1)
CC = gcc -m32
CC ?= gcc
LD = ld
CPP = cpp
# Enable support for :linkage-table feature.
RUNTIME += -m32 -Di386
# Enable support for :linkage-table feature.
ifdef FEATURE_LINKAGE_TABLE
LINKAGE = -DLINKAGE_TABLE
RUNTIME += -DLINKAGE_TABLE
endif
# Enable support for generational GC
ifdef FEATURE_GENCGC
GENCGC = -DGENCGC
RUNTIME += -DGENCGC
GC_SRC = gencgc.c
endif
......@@ -23,14 +26,13 @@ endif
# cases. If neither is set, then we don't want any SSE2 support at
# all.
ifdef FEATURE_X87
SSE2 = -DFEATURE_SSE2
RUNTIME += -DFEATURE_SSE2
else
ifdef FEATURE_SSE2
SSE2 = -DFEATURE_SSE2
RUNTIME += -DFEATURE_SSE2
endif
endif
RUNTIME = -Di386 $(GENCGC) $(LINKAGE) $(SSE2)
# __NO_CTYPE so builds on glibc 2.3 will run on (some) older glibc's.
ifneq (,$(filter 2% 3%, $(shell $(CC) -dumpversion)))
CPPFLAGS = -D__NO_CTYPE -D_GNU_SOURCE -I. -I$(PATH1) -I- $(RUNTIME)
......@@ -38,14 +40,14 @@ else
CPPFLAGS = -D__NO_CTYPE -D_GNU_SOURCE -iquote. -iquote $(PATH1) $(RUNTIME)
endif
CFLAGS = -rdynamic -Wstrict-prototypes -Wall -O2 -g $(RUNTIME)
CFLAGS += -rdynamic -Wstrict-prototypes -Wall -O2 -g $(RUNTIME)
ASFLAGS = -g $(RUNTIME)
NM = $(PATH1)/linux-nm
UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
ASSEM_SRC = x86-assem.S linux-stubs.S
ARCH_SRC = x86-arch.c
OS_SRC = Linux-os.c os-common.c elf.c e_rem_pio2.c k_rem_pio2.c
OS_LINK_FLAGS = -rdynamic -Xlinker --export-dynamic -Xlinker -Map -Xlinker foo
OS_LINK_FLAGS = -m32 -rdynamic -Xlinker --export-dynamic -Xlinker -Map -Xlinker foo
OS_LIBS = -ldl
#GC_SRC = gencgc.c
......
# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/GNUmakefile,v 1.30 2008/09/12 20:59:19 rtoy Exp $
# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/GNUmakefile,v 1.31 2008/12/27 17:35:50 rtoy Exp $
all: lisp.nm
CC = gcc
DEPEND = $(CC) -MM -E
DEPEND_FLAGS =
-include internals.inc
include Config
CC ?= gcc
ifndef GC_SRC
GC_SRC = gc.c
endif
......
CFLAGS = -O2 -I/usr/X11R6/include -I. -I$(VPATH)
LDFLAGS = -L/usr/X11R6/lib
CFLAGS += -O2 -I/usr/X11R6/include -I. -I$(VPATH)
LDFLAGS += -L/usr/X11R6/lib
LIBS = -lXm -lXt -lXext -lX11 -lSM -lICE -lXp -ldl -lpthread
# This def assumes you are building in the same or parallel
# tree to the CVS souce layout. Sites may need to customize
......
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