source: trunk/source/lisp-kernel/linuxppc64/Makefile @ 15137

Last change on this file since 15137 was 15137, checked in by rme, 8 years ago

In the Makefiles for the Linux ports, use the --no-as-needed
linker flag to ensure that the libraries that we specify
really get loaded for us.

Undo r15132 and r15133, which added references to external
symbols in libm to ensure that it was linked in. Also
remove a similar kludge of long standing in ppc-asmutils.s.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1#
2#   Copyright (C) 1994-2001 Digitool, Inc
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 = -mregnames -mppc64 -a64 -maltivec
25M4FLAGS = -DLINUX -DPPC -DPPC64
26CDEFINES = -DLINUX -D_REENTRANT -DPPC -DPPC64 -D_GNU_SOURCE -DSVN_REVISION=$(SVN_REVISION)
27CDEBUG = -g
28COPT = -O2
29# word size issues are a little more relevant on a 64-bit platform
30# than elsewhere, but most gcc format warnings are still nonsense.
31WFORMAT = -Wno-format
32PLATFORM_H = platform-linuxppc64.h
33
34# If the linker supports a "--hash-style=" option, use traditional
35# Sysv hash tables.  (If it doesn't support that option, assume
36# that traditional hash tables will be used by default.)
37ld_has_hash_style = $(shell $(LD) --help | grep "hash-style=")
38ifeq ($(ld_has_hash_style),)
39HASH_STYLE=
40else
41HASH_STYLE="-Wl,--hash-style=sysv"
42endif
43
44
45.s.o:
46        $(M4) $(M4FLAGS) -I../ $< | $(AS)  $(ASFLAGS) -o $@
47.c.o:
48        $(CC) -include ../$(PLATFORM_H) -c $< $(CDEFINES) $(CDEBUG) $(COPT) $(WFORMAT) -m64 -o $@
49
50SPOBJ = pad.o ppc-spjump.o ppc-spentry.o ppc-subprims.o
51ASMOBJ = ppc-asmutils.o imports.o
52
53COBJ  = pmcl-kernel.o gc-common.o ppc-gc.o bits.o  ppc-exceptions.o \
54        image.o thread_manager.o lisp-debug.o memory.o unix-calls.o
55
56DEBUGOBJ = lispdcmd.o plprint.o plsym.o plbt.o ppc_print.o
57KERNELOBJ= $(COBJ) ppc-asmutils.o  imports.o
58
59SPINC = lisp.s m4macros.m4 ppc-constants.s ppc-macros.s errors.s ppc-uuo.s ppc-constants64.s
60
61CHEADERS = area.h bits.h ppc-constants.h lisp-errors.h gc.h lisp.h \
62        lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
63        threads.h ppc-constants64.h ppc-exceptions.h $(PLATFORM_H) \
64        constants.h os-linux.h
65
66# Subprims linked into the kernel ?
67# Yes:
68
69KSPOBJ = $(SPOBJ)
70all:    ../../ppccl64
71
72
73# No:
74
75# KSPOBJ=
76# all:  ../../ppccl64 ../../subprims.so
77
78OSLIBS = -ldl -lm -lpthread
79
80
81../../ppccl64:  $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ)
82        $(CC) -m64 $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE)  -o $@ -T ./elf64ppc.x $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) -Wl,--no-as-needed $(OSLIBS)
83
84
85$(SPOBJ): $(SPINC)
86$(ASMOBJ): $(SPINC)
87$(COBJ): $(CHEADERS)
88$(DEBUGOBJ): $(CHEADERS) lispdcmd.h
89
90
91cclean:
92        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../ppccl64
93
94clean:  cclean
95        $(RM) -f $(SPOBJ)
96
97strip:  ../../ppccl64
98        strip -g ../../ppccl64
Note: See TracBrowser for help on using the repository browser.