[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] ld-wrapper: Add '-rpath' flag for libraries passed by file name
From: |
Andreas Enge |
Subject: |
[PATCH] ld-wrapper: Add '-rpath' flag for libraries passed by file name not ending in .so. |
Date: |
Thu, 26 Feb 2015 23:57:57 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hello,
the attached patch should help to add an rpath for libraries passed by
an absolute file name on the command line, and that need not end in ".so",
but in ".so." followed by some version.
As it entails a full rebuild, I did not even test it yet and wait for
comments first.
Andreas
* gnu/packages/ld-wrapper.scm (library-files-linked): Include not only
names of libraries ending in ".so", but also libraries ending in ".so.",
followed by the version.
---
gnu/packages/ld-wrapper.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/ld-wrapper.scm b/gnu/packages/ld-wrapper.scm
index 1985617..3abae88 100644
--- a/gnu/packages/ld-wrapper.scm
+++ b/gnu/packages/ld-wrapper.scm
@@ -12,6 +12,7 @@ exec @GUILE@ -c "(load-compiled \"$0.go\") (apply $main (cdr
(command-line)))" "
!#
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <address@hidden>
+;;; Copyright © 2015 Andreas Enge <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -31,6 +32,7 @@ exec @GUILE@ -c "(load-compiled \"$0.go\") (apply $main (cdr
(command-line)))" "
(define-module (gnu build-support ld-wrapper)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match)
+ #:use-module (ice-9 regex)
#:export (ld-wrapper))
;;; Commentary:
@@ -125,7 +127,9 @@ exec @GUILE@ -c "(load-compiled \"$0.go\") (apply $main
(cdr (command-line)))" "
(cons full library-files))
result)))
((and (string-prefix? %store-directory argument)
- (string-suffix? ".so" argument)) ;add library
+ (regexp-match?
+ (string-match "\\.so(\\.[0-9]+)*$"
+ argument))) ; add library
(cons library-path
(cons argument library-files)))
(else
--
2.2.1
- [PATCH] ld-wrapper: Add '-rpath' flag for libraries passed by file name not ending in .so.,
Andreas Enge <=