From eadaa332441dbb0bbc710e4803cd73970859cc1f Mon Sep 17 00:00:00 2001 From: dos-reis Date: Mon, 29 Nov 2010 11:17:25 +0000 Subject: Fix GCL-based build issues related to the fact that GCL does not provide a separate hook for linkers. --- src/lisp/Makefile.in | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/lisp') 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)))' \ -- cgit v1.2.3