diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-06-14 01:00:27 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-06-14 01:00:27 +0200 |
commit | b5616bc33d43f9507ffb8ac87d1e2158752c42c3 (patch) | |
tree | e44c2a4bf4f9c5d1cad9960b8d8a132ee831505d | |
parent | 16cae799dbddc621026c230d058e0317db0a1b95 (diff) | |
download | guix-b5616bc33d43f9507ffb8ac87d1e2158752c42c3.tar guix-b5616bc33d43f9507ffb8ac87d1e2158752c42c3.tar.gz |
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".
-rw-r--r-- | gnu/packages/ld-wrapper.in | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gnu/packages/ld-wrapper.in b/gnu/packages/ld-wrapper.in index db662e7d76..c3d6fa1005 100644 --- a/gnu/packages/ld-wrapper.in +++ b/gnu/packages/ld-wrapper.in @@ -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 |