From 184c40f371b1578aa2d81409de616d1212ca63e5 Mon Sep 17 00:00:00 2001 From: pmai <pmai> Date: Tue, 30 Oct 2001 22:14:36 +0000 Subject: [PATCH] This change causes archives passed as a file argument to load-foreign to be loaded in-full, which is the only useful behaviour when trying to link with static libraries. Currently this change only corrects the situation for Linux and Solaris, since I don't know the relevant flags for other platforms, and/or don't have access to machines for testing. --- code/foreign.lisp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/foreign.lisp b/code/foreign.lisp index a5b9211db..6c8aceba5 100644 --- a/code/foreign.lisp +++ b/code/foreign.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/foreign.lisp,v 1.33 2001/05/14 14:22:53 toy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/foreign.lisp,v 1.34 2001/10/30 22:14:36 pmai Exp $") ;;; ;;; ********************************************************************** ;;; @@ -648,6 +648,9 @@ to skip undefined symbols which don't have an address." #+(or solaris linux) "-G" #+irix "-shared" "-o" output-file + ;; Cause all specified libs to be loaded in full + #+linux "--whole-archive" + #+solaris "-z" #+solaris "allextract" (append (mapcar #'(lambda (name) (or (unix-namestring name) @@ -660,6 +663,10 @@ to skip undefined symbols which don't have an address." (if (atom files) (list files) files)) + ;; Return to default ld behaviour for libs + (list + #+linux "--no-whole-archive" + #+solaris "-z" #+solaris "defaultextract") libraries)) :env env :input nil -- GitLab