From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Craven Subject: [PATCH 3/5] gnu: linux-libre: Use system->architecture. Date: Fri, 2 Sep 2016 18:09:26 +0200 Message-ID: <20160902160928.9458-4-david@craven.ch> References: <20160902160928.9458-1-david@craven.ch> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfr2W-000688-2i for guix-devel@gnu.org; Fri, 02 Sep 2016 12:10:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfr2O-0005aR-26 for guix-devel@gnu.org; Fri, 02 Sep 2016 12:09:58 -0400 Received: from so254-10.mailgun.net ([198.61.254.10]:44684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfr2L-0005Z0-6A for guix-devel@gnu.org; Fri, 02 Sep 2016 12:09:51 -0400 In-Reply-To: <20160902160928.9458-1-david@craven.ch> 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" To: guix-devel@gnu.org * gnu/packages/linux.scm (linux-libre): Use system->architecture. --- gnu/packages/linux.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index dc7ea78..19851d2 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -286,7 +286,7 @@ for SYSTEM and optionally VARIANT, or #f if there is no such configuration." (modify-phases %standard-phases (delete 'configure) (replace 'build - (lambda* (#:key system inputs #:allow-other-keys #:rest args) + (lambda* (#:key inputs #:allow-other-keys #:rest args) ;; Avoid introducing timestamps (setenv "KCONFIG_NOTIMESTAMP" "1") (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH")) @@ -295,12 +295,12 @@ for SYSTEM and optionally VARIANT, or #f if there is no such configuration." (system* "patch" "-p1" "--force" "-i" (assoc-ref inputs "patch/freedo+gnu")) - (let ((arch (car (string-split system #\-)))) - (setenv "ARCH" - (cond ((string=? arch "i686") "i386") - ((string=? arch "mips64el") "mips") - (else arch))) - (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))) + (let ((arch ,(system->linux-architecture + (or (%current-target-system) + (%current-system))))) + (setenv "ARCH" arch)) + + (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) (let ((build (assoc-ref %standard-phases 'build)) (config (assoc-ref inputs "kconfig"))) -- 2.9.0