distro: ld-wrapper: Use the current Bash instead of /bin/sh.

* distro/packages/ld-wrapper.scm: Use @BASH@ in shebang.  Change module
  name to (gnu build-support ld-wrapper).
* distro/packages/base.scm (ld-wrapper-boot3): Substitute @BASH@.
  (ld-wrapper): Use BASH-FINAL.
This commit is contained in:
Ludovic Courtès 2012-12-19 23:49:31 +01:00
parent ea8fbbf2f2
commit dfb53ee232
2 changed files with 13 additions and 7 deletions

View File

@ -872,9 +872,10 @@ exec ~a/bin/~a-gcc -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(source #f) (source #f)
(build-system trivial-build-system) (build-system trivial-build-system)
(inputs `(("binutils" ,binutils-final) (inputs `(("binutils" ,binutils-final)
("guile" ,%bootstrap-guile) ("guile" ,%bootstrap-guile)
("wrapper" ,(search-path %load-path ("bash" ,@(assoc-ref %boot2-inputs "bash"))
"distro/packages/ld-wrapper.scm")))) ("wrapper" ,(search-path %load-path
"distro/packages/ld-wrapper.scm"))))
(arguments (arguments
`(#:guile ,%bootstrap-guile `(#:guile ,%bootstrap-guile
#:modules ((guix build utils)) #:modules ((guix build utils))
@ -898,6 +899,9 @@ exec ~a/bin/~a-gcc -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(("@GUILE@") (("@GUILE@")
(string-append (assoc-ref %build-inputs "guile") (string-append (assoc-ref %build-inputs "guile")
"/bin/guile")) "/bin/guile"))
(("@BASH@")
(string-append (assoc-ref %build-inputs "bash")
"/bin/bash"))
(("@LD@") (("@LD@")
(string-append (assoc-ref %build-inputs "binutils") (string-append (assoc-ref %build-inputs "binutils")
"/bin/ld"))) "/bin/ld")))
@ -946,7 +950,9 @@ store.")
(package (inherit ld-wrapper-boot3) (package (inherit ld-wrapper-boot3)
(name "ld-wrapper") (name "ld-wrapper")
(inputs `(("guile" ,guile-final) (inputs `(("guile" ,guile-final)
,@(alist-delete "guile" (package-inputs ld-wrapper-boot3)))))) ("bash" ,bash-final)
,@(fold alist-delete (package-inputs ld-wrapper-boot3)
'("guile" "bash"))))))
(define-public %final-inputs (define-public %final-inputs
;; Final derivations used as implicit inputs by `gnu-build-system'. ;; Final derivations used as implicit inputs by `gnu-build-system'.

View File

@ -1,4 +1,4 @@
#!/bin/sh #!@BASH@
# -*- mode: scheme; coding: utf-8; -*- # -*- mode: scheme; coding: utf-8; -*-
# XXX: We have to go through Bash because there's no command-line switch to # XXX: We have to go through Bash because there's no command-line switch to
@ -7,7 +7,7 @@
# Use `load-compiled' because `load' (and `-l') doesn't otherwise load our # Use `load-compiled' because `load' (and `-l') doesn't otherwise load our
# .go file (see <http://bugs.gnu.org/12519>). # .go file (see <http://bugs.gnu.org/12519>).
main="(@ (distro packages ld-wrapper) ld-wrapper)" 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 \"$0.go\") (apply $main (cdr (command-line)))" "$@"
!# !#
;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*- ;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
@ -28,7 +28,7 @@ exec @GUILE@ -c "(load-compiled \"$0.go\") (apply $main (cdr (command-line)))" "
;;; You should have received a copy of the GNU General Public License ;;; You should have received a copy of the GNU General Public License
;;; along with Guix. If not, see <http://www.gnu.org/licenses/>. ;;; along with Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (distro packages ld-wrapper) (define-module (gnu build-support ld-wrapper)
#:use-module (srfi srfi-1) #:use-module (srfi srfi-1)
#:export (ld-wrapper)) #:export (ld-wrapper))