aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/ld-wrapper.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-03-04 14:07:23 +0100
committerLudovic Courtès <ludo@gnu.org>2015-03-04 14:07:23 +0100
commit1289062522e3d08259740e59243c6cd0642a9916 (patch)
tree65857ae41001e3b33db621073cf1504de601dda1 /gnu/packages/ld-wrapper.scm
parentcb4d3d863b3fb44d97b3b568ff9e6cfe38f1f630 (diff)
parentda699774d4d839a45daa3ae3b9189331c490b315 (diff)
downloadguix-1289062522e3d08259740e59243c6cd0642a9916.tar
guix-1289062522e3d08259740e59243c6cd0642a9916.tar.gz
Merge branch 'core-updates'.
Diffstat (limited to 'gnu/packages/ld-wrapper.scm')
-rw-r--r--gnu/packages/ld-wrapper.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/packages/ld-wrapper.scm b/gnu/packages/ld-wrapper.scm
index 19856176b3..4fa2962bb9 100644
--- a/gnu/packages/ld-wrapper.scm
+++ b/gnu/packages/ld-wrapper.scm
@@ -104,6 +104,15 @@ exec @GUILE@ -c "(load-compiled \"$0.go\") (apply $main (cdr (command-line)))" "
(< depth %max-symlink-depth)
(loop (readlink file) (+ 1 depth))))))))
+(define (shared-library? file)
+ ;; Return #t when FILE denotes a shared library.
+ (or (string-suffix? ".so" file)
+ (let ((index (string-contains file ".so.")))
+ ;; Since we cannot use regexps during bootstrap, roll our own.
+ (and index
+ (string-every (char-set-union (char-set #\.) char-set:digit)
+ (string-drop file (+ index 3)))))))
+
(define (library-files-linked args)
;; Return the file names of shared libraries explicitly linked against via
;; `-l' or with an absolute file name in ARGS.
@@ -125,7 +134,7 @@ 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
+ (shared-library? argument)) ;add library
(cons library-path
(cons argument library-files)))
(else