From: Andreas Enge <andreas@enge.fr>
To: guix-devel@gnu.org
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 [thread overview]
Message-ID: <20150226225757.GA30907@debian> (raw)
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
next reply other threads:[~2015-02-26 22:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 22:57 Andreas Enge [this message]
2015-02-26 23:18 ` [PATCH] ld-wrapper: Add '-rpath' flag for libraries passed by file name not ending in .so Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150226225757.GA30907@debian \
--to=andreas@enge.fr \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).