From 45298f8fd28635763507417e6ac026a52d51c060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 19 Dec 2012 00:47:39 +0100 Subject: [PATCH] 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. --- distro/packages/linux.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/distro/packages/linux.scm b/distro/packages/linux.scm index 0ec18300fc..bbb583455c 100644 --- a/distro/packages/linux.scm +++ b/distro/packages/linux.scm @@ -32,8 +32,13 @@ (define-public linux-libre-headers (let* ((version* "3.3.8") (build-phase - '(lambda* (#:key outputs #:allow-other-keys) - (setenv "ARCH" "x86_64") ; XXX + '(lambda* (#:key system #:allow-other-keys) + (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")) (zero? (system* "make" "mrproper" "headers_check"))))) (install-phase