From f56be9ed6d6a46f558dfa4e65bc261b61739d91d Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 23 Jun 2011 03:41:08 +0000 Subject: * driver/Makefile.in (open_axiom_LDADD): Use library archives for linking, to prevent accidental use of dynamic libraries. --- src/ChangeLog | 5 +++++ src/driver/Makefile.in | 7 ++++++- src/lisp/core.lisp.in | 7 +++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a041ef1a..9b13be6f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-06-22 Gabriel Dos Reis + + * driver/Makefile.in (open_axiom_LDADD): Use library archives for + linking, to prevent accidental use of dynamic libraries. + 2011-06-22 Gabriel Dos Reis * interp/br-con.boot: Remove reference to asharp constructors. diff --git a/src/driver/Makefile.in b/src/driver/Makefile.in index 6682602b..5db6e056 100644 --- a/src/driver/Makefile.in +++ b/src/driver/Makefile.in @@ -36,8 +36,13 @@ open_axiom_SOURCES = main.cc open_axiom_objects = $(open_axiom_SOURCES:.cc=.lo) +## Ideally, we want a standalone binary driver unencounbered by +## any sort of dependencies. However, static program linking is not +## available on all plaforms (think Mac OS, Solaris, etc.) So we must link +## against library archives. Thefore we avoid using $(axiom_target_libdir) +## below. On purpose. open_axiom_LDADD = \ - -L$(axiom_target_libdir)/ \ + -L$(builddir)/../utils \ -L$(builddir)/../lib \ -lOpenAxiom $(oa_c_libs) diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in index 1638f75d..17bde458 100644 --- a/src/lisp/core.lisp.in +++ b/src/lisp/core.lisp.in @@ -938,6 +938,9 @@ (progn (mapcar #'(lambda (p) (|loadOrElse| p)) lisp-files) (eval prologue) + (let ((d nil)) + (maphash #'(lambda (k v) (setq d (cons (cons k v) d))) |$driverTable|) + (format t "~%==> driver table before saveCore = ~s <==~%" d)) (|saveCore| core-image entry-point)) #+:ecl (let* ((compiler::*ld* oa-cxx) @@ -959,6 +962,7 @@ (|coreQuit|))) ) +(trace |link|) ;; ;; -*- Handling Command Line Arguments -*- @@ -1169,6 +1173,9 @@ (defun |topLevel|() (let ((*package* (find-package "AxiomCore")) (command-args (|getCommandLineArguments|))) + (let ((d nil)) + (maphash #'(lambda (k v) (setq d (cons (cons k v) d))) |$driverTable|) + (format t "~%==> driver table = ~s <==~%" d)) (when (null command-args) (|internalError| "empty command line args")) ;; Existing system programming practive, and POSIX, have it -- cgit v1.2.3