ld-wrapper: Ignore .so files specified after "-plugin" for RUNPATH purposes.
Reported by Mark H Weaver at <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20102#58>. * gnu/packages/ld-wrapper.in (library-files-linked): Handle "-plugin" similarly to "-dynamic-linker".
This commit is contained in:
parent
16cae799db
commit
b5616bc33d
|
@ -143,12 +143,16 @@ exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line))
|
|||
(define path+files+args
|
||||
(fold (lambda (argument result)
|
||||
(match result
|
||||
((library-path library-files ("-dynamic-linker" . rest))
|
||||
;; When passed '-dynamic-linker ld.so', ignore 'ld.so'.
|
||||
;; See <http://bugs.gnu.org/20102>.
|
||||
((library-path library-files
|
||||
((and flag
|
||||
(or "-dynamic-linker" "-plugin"))
|
||||
. rest))
|
||||
;; When passed '-dynamic-linker ld.so', ignore 'ld.so'; when
|
||||
;; passed '-plugin liblto_plugin.so', ignore
|
||||
;; 'liblto_plugin.so'. See <http://bugs.gnu.org/20102>.
|
||||
(list library-path
|
||||
library-files
|
||||
(cons* argument "-dynamic-linker" rest)))
|
||||
(cons* argument flag rest)))
|
||||
((library-path library-files previous-args)
|
||||
(cond ((string-prefix? "-L" argument) ;augment the search path
|
||||
(list (append library-path
|
||||
|
|
Loading…
Reference in New Issue