distro: Linux-Libre: Set $ARCH based on the actual system type.

* distro/packages/linux.scm (linux-libre-headers): Set $ARCH based on
  the `system' keyword argument.
This commit is contained in:
Ludovic Courtès 2012-12-19 00:47:39 +01:00
parent 325285d581
commit 45298f8fd2

View file

@ -32,8 +32,13 @@ (define-module (distro packages linux)
(define-public linux-libre-headers (define-public linux-libre-headers
(let* ((version* "3.3.8") (let* ((version* "3.3.8")
(build-phase (build-phase
'(lambda* (#:key outputs #:allow-other-keys) '(lambda* (#:key system #:allow-other-keys)
(setenv "ARCH" "x86_64") ; XXX (let ((arch (car (string-split system #\-))))
(setenv "ARCH"
(cond ((string=? arch "i686") "i386")
(else arch)))
(format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
(and (zero? (system* "make" "defconfig")) (and (zero? (system* "make" "defconfig"))
(zero? (system* "make" "mrproper" "headers_check"))))) (zero? (system* "make" "mrproper" "headers_check")))))
(install-phase (install-phase