From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: <20150226225757.GA30907@debian> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR7Ng-0007jD-Ow for guix-devel@gnu.org; Thu, 26 Feb 2015 17:58:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YR7Nc-0004sR-Om for guix-devel@gnu.org; Thu, 26 Feb 2015 17:58:08 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:61857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR7Nc-0004sI-GH for guix-devel@gnu.org; Thu, 26 Feb 2015 17:58:04 -0500 Content-Disposition: inline List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org 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 +;;; Copyright © 2015 Andreas Enge ;;; ;;; 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