guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: gnu: ld-wrapper: Use a hard-coded self-reference instead of $0.


From: Ludovic Courtès
Subject: 02/03: gnu: ld-wrapper: Use a hard-coded self-reference instead of $0.
Date: Fri, 03 Apr 2015 23:30:42 +0000

civodul pushed a commit to branch core-updates
in repository guix.

commit 9bab6bea86e83c1aae355a7654263a87f0a4c130
Author: Ludovic Courtès <address@hidden>
Date:   Fri Apr 3 22:27:45 2015 +0200

    gnu: ld-wrapper: Use a hard-coded self-reference instead of $0.
    
    * gnu/packages/ld-wrapper.scm: Use @SELF@ instead of $0.  This is so
      that the .go file is found even when the wrapper is invoked via a
      symlink to it.
    * gnu/packages/base.scm (make-ld-wrapper): Substitute @address@hidden
---
 gnu/packages/base.scm       |    2 ++
 gnu/packages/ld-wrapper.scm |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 9eb90dc..c935784 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -393,6 +393,8 @@ wrapper uses GUILE and BASH."
                      (mkdir-p bin)
                      (copy-file (assoc-ref %build-inputs "wrapper") ld)
                      (substitute* ld
+                       (("@SELF@")
+                        ld)
                        (("@GUILE@")
                         (string-append (assoc-ref %build-inputs "guile")
                                        "/bin/guile"))
diff --git a/gnu/packages/ld-wrapper.scm b/gnu/packages/ld-wrapper.scm
index 4fa2962..cc533f5 100644
--- a/gnu/packages/ld-wrapper.scm
+++ b/gnu/packages/ld-wrapper.scm
@@ -8,7 +8,7 @@
 # .go file (see <http://bugs.gnu.org/12519>).
 
 main="(@ (gnu build-support ld-wrapper) ld-wrapper)"
-exec @GUILE@ -c "(load-compiled \"$0.go\") (apply $main (cdr (command-line)))" 
"$@"
+exec @GUILE@ -c "(load-compiled \"@address@hidden") (apply $main (cdr 
(command-line)))" "$@"
 !#
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]