* [PATCH] ld-wrapper: Add '-rpath' flag for libraries passed by file name not ending in .so.
@ 2015-02-26 22:57 Andreas Enge
2015-02-26 23:18 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Enge @ 2015-02-26 22:57 UTC (permalink / raw)
To: guix-devel
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 <ludo@gnu.org>
+;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;;
;;; 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ld-wrapper: Add '-rpath' flag for libraries passed by file name not ending in .so.
2015-02-26 22:57 [PATCH] ld-wrapper: Add '-rpath' flag for libraries passed by file name not ending in .so Andreas Enge
@ 2015-02-26 23:18 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-02-26 23:18 UTC (permalink / raw)
To: Andreas Enge; +Cc: guix-devel
Andreas Enge <andreas@enge.fr> skribis:
> 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.
I ended up doing it slightly differently in f307947, mostly because we
can’t always rely on (ice-9 regex).
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-26 23:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-26 22:57 [PATCH] ld-wrapper: Add '-rpath' flag for libraries passed by file name not ending in .so Andreas Enge
2015-02-26 23:18 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.