Skip to content
Snippets Groups Projects
Commit 184c40f3 authored by pmai's avatar pmai
Browse files

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.
parent 48af484e
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (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." ...@@ -648,6 +648,9 @@ to skip undefined symbols which don't have an address."
#+(or solaris linux) "-G" #+irix "-shared" #+(or solaris linux) "-G" #+irix "-shared"
"-o" "-o"
output-file output-file
;; Cause all specified libs to be loaded in full
#+linux "--whole-archive"
#+solaris "-z" #+solaris "allextract"
(append (mapcar (append (mapcar
#'(lambda (name) #'(lambda (name)
(or (unix-namestring name) (or (unix-namestring name)
...@@ -660,6 +663,10 @@ to skip undefined symbols which don't have an address." ...@@ -660,6 +663,10 @@ to skip undefined symbols which don't have an address."
(if (atom files) (if (atom files)
(list files) (list files)
files)) files))
;; Return to default ld behaviour for libs
(list
#+linux "--no-whole-archive"
#+solaris "-z" #+solaris "defaultextract")
libraries)) libraries))
:env env :env env
:input nil :input nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment