~ruther/guix-local

b5616bc33d43f9507ffb8ac87d1e2158752c42c3 — Ludovic Courtès 10 years ago 16cae79
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".
1 files changed, 8 insertions(+), 4 deletions(-)

M gnu/packages/ld-wrapper.in
M gnu/packages/ld-wrapper.in => gnu/packages/ld-wrapper.in +8 -4
@@ 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