aboutsummaryrefslogtreecommitdiff
path: root/src/lisp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-11-29 11:17:25 +0000
committerdos-reis <gdr@axiomatics.org>2010-11-29 11:17:25 +0000
commiteadaa332441dbb0bbc710e4803cd73970859cc1f (patch)
tree8cc4d27b343948366749718c21713f918b16b638 /src/lisp
parenteaf9fdfc5fb7d296c16df34384914e0a62639314 (diff)
downloadopen-axiom-eadaa332441dbb0bbc710e4803cd73970859cc1f.tar.gz
Fix GCL-based build issues related to the
fact that GCL does not provide a separate hook for linkers.
Diffstat (limited to 'src/lisp')
-rw-r--r--src/lisp/Makefile.in13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lisp/Makefile.in b/src/lisp/Makefile.in
index 295c5eeb..77c8edb8 100644
--- a/src/lisp/Makefile.in
+++ b/src/lisp/Makefile.in
@@ -47,7 +47,7 @@ build_libdir = ./$(top_builddir)/src/lib
## Consequently we temporarily give up here, e.g., we don't
## instruct GCL to use Libtool on Windows.
GCL_LTCC = $(if $(findstring mingw, $(target)),"","$(LIBTOOL) --tag=CC --mode=compile ")
-GCL_LTLD = $(if $(findstring mingw, $(target)),"$(CXX) $(LDFLAGS) -o ","$(CXXLINK) -o ")
+GCL_LTLD = $(if $(findstring mingw, $(target)),"$(CXX) $(LDFLAGS) ","$(CXXLINK) ")
## Again, ideally, we would like GCL to link with the compiled Lisp
## code from core.lisp. However, the general interface compiler::link
@@ -90,13 +90,22 @@ lisp_c_objects = \
$(build_libdir)/cfuns-c.$(OBJEXT) \
$(build_libdir)/sockio-c.$(OBJEXT)
+## The splitting shenaningan below about GCL's COMPILER::*LD* is because
+## GCL does not -- currently -- separate the linker proper from arguments,
+## therefore forcing us to use brittle tricks to guess what the linker is.
+
$(OUT)/lisp$(EXEEXT): base-lisp$(EXEEXT)
ifeq (@axiom_lisp_flavor@,gcl)
echo '(let* ((sys-cc compiler::*cc*) ' \
+ ' (sys-ld compiler::*ld*) ' \
' (compiler::*cc* (concatenate (quote string) ' \
' $(GCL_LTCC) ' \
' sys-cc)) ' \
- ' (compiler::*ld* (if (member :mingw32 *features*) compiler::*ld* $(GCL_LTLD)))) ' \
+ ' (compiler::*ld* ' \
+ ' (concatenate (quote string) ' \
+ ' $(GCL_LTLD) ' \
+ ' (subseq sys-ld ' \
+ ' (position (character " ") sys-ld))))) ' \
'(compiler::link (quote ($(FASLS))) "lisp$(EXEEXT)" ' \
' (format nil "(progn (let ((*load-path* (cons ~S *load-path*))'\
' (si::*load-types* ~S)))' \