source: release/1.8/source/lisp-kernel/linuxarm/Makefile @ 15278

Last change on this file since 15278 was 15278, checked in by rme, 7 years ago

Update linuxarm Makefile to specify the soft-float ABI
explicitly.

File size: 2.9 KB
Line 
1#
2#   Copyright (C) 2010 Clozure Associates
3#   This file is part of Clozure CL. 
4#
5#   Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
6#   License , known as the LLGPL and distributed with Clozure CL as the
7#   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
8#   which is distributed with Clozure CL as the file "LGPL".  Where these
9#   conflict, the preamble takes precedence. 
10#
11#   Clozure CL is referenced in the preamble as the "LIBRARY."
12#
13#   The LLGPL is also available online at
14#   http://opensource.franz.com/preamble.html
15
16SVN_REVISION := "$(shell svnversion || echo unknown)"
17
18VPATH = ../
19RM = /bin/rm
20# Versions of GNU as >= 2.9.1 all seem to work
21# AS = gas-2.9.1
22AS = as
23M4 = m4
24ASFLAGS = -mfpu=vfp -march=armv7-a -mfloat-abi=$(FLOAT_ABI)
25M4FLAGS = -DLINUX -DARM
26CDEFINES = -DLINUX -DARM -D_REENTRANT -D_GNU_SOURCE -DUSE_FUTEX -DSVN_REVISION=$(SVN_REVISION)
27CDEBUG = -g
28COPT = -O2
29# Once in a while, -Wformat says something useful.  The odds are against that,
30# however.
31WFORMAT = -Wno-format
32PLATFORM_H = platform-linuxarm.h
33FLOAT_ABI = softfp
34
35# If the linker supports a "--hash-style=" option, use traditional
36# Sysv hash tables.  (If it doesn't support that option, assume
37# that traditional hash tables will be used by default.)
38ld_has_hash_style = $(shell $(LD) --help | grep "hash-style=")
39ifeq ($(ld_has_hash_style),)
40HASH_STYLE=
41else
42HASH_STYLE="-Wl,--hash-style=sysv"
43endif
44
45
46# Likewise, some versions of GAS may need a "-a32" flag, to force the
47
48# output file to be 32-bit compatible.
49
50A32 = $(shell ($(AS) --help -v 2>&1 | grep -q -e "-a32") && /bin/echo "-a32")
51
52.s.o:
53        $(M4) $(M4FLAGS) -I../ $< | $(AS) $(A32) $(ASFLAGS) -o $@
54.c.o:
55        $(CC) -include ../$(PLATFORM_H) -c $< $(CDEFINES) $(CDEBUG) $(COPT) -marm -mfloat-abi=$(FLOAT_ABI) $(WFORMAT)  -o $@
56
57SPOBJ = pad.o  arm-spentry.o
58ASMOBJ = arm-asmutils.o imports.o
59
60COBJ  = pmcl-kernel.o gc-common.o arm-gc.o bits.o  arm-exceptions.o \
61        image.o thread_manager.o lisp-debug.o memory.o unix-calls.o
62
63DEBUGOBJ = lispdcmd.o plprint.o plsym.o albt.o arm_print.o
64KERNELOBJ= $(COBJ) arm-asmutils.o  imports.o
65
66SPINC = lisp.s m4macros.m4 arm-constants.s arm-macros.s errors.s arm-uuo.s \
67        lisp_globals.s
68
69CHEADERS = area.h bits.h arm-constants.h lisp-errors.h gc.h lisp.h \
70        lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
71        threads.h arm-exceptions.h $(PLATFORM_H)
72
73# Subprims linked into the kernel ?
74# Yes:
75
76KSPOBJ = $(SPOBJ)
77all:    ../../armcl
78
79
80# No:
81
82# KSPOBJ=
83# all:  ../../ppccl ../../subprims.so
84
85OSLIBS = -ldl -lm -lpthread
86
87
88../../armcl:    $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ)
89        $(CC)  $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE) -mfloat-abi=$(FLOAT_ABI) -o $@ -T ./armlinux.x $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) -Wl,--no-as-needed $(OSLIBS)
90
91
92$(SPOBJ): $(SPINC)
93$(ASMOBJ): $(SPINC)
94$(COBJ): $(CHEADERS)
95$(DEBUGOBJ): $(CHEADERS) lispdcmd.h
96
97
98cclean:
99        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../ppccl
100
101clean:  cclean
102        $(RM) -f $(SPOBJ)
103
104strip:  ../../ppccl
105        strip -g ../../ppccl
Note: See TracBrowser for help on using the repository browser.