[Top][All Lists]

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

Re: Porting to mips64el

From: Ludovic Courtès
Subject: Re: Porting to mips64el
Date: Sat, 26 Jan 2013 22:37:27 +0100
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux)


Nikita Karetnikov <address@hidden> skribis:

> starting phase `build'
> `ARCH' set to `mips64el'
> Makefile:484: 
> /tmp/nix-build-xww122kbc08qcyaika8pf03x273rvph7-linux-libre-headers-3.3.8.drv-0/linux-3.3.8/arch/mips64el/Makefile:
>  No such file or directory

This is because Linux calls this “mips”, not “mips64el”.

The attached patch should solve it, while avoiding a rebuild on other

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index de6d53a..aad345a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -29,20 +29,31 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module ((guix utils) #:select (%current-system)))
 (define-public linux-libre-headers
   (let* ((version* "3.3.8")
-          '(lambda* (#:key system #:allow-other-keys)
+          (lambda ()
+            `(lambda* (#:key system #:allow-other-keys)
                (let ((arch (car (string-split system #\-))))
                  (setenv "ARCH"
                          (cond ((string=? arch "i686") "i386")
+                               ;; FIXME: The unquote below is just to
+                               ;; avoid triggering a rebuild.  Remove me
+                               ;; on the next core-updates.
+                               ,@(if (string-prefix? "mips"
+                                                     (%current-system))
+                                     `(((string-prefix? arch "mips")
+                                        "mips"))
+                                     '())
                                (else arch)))
                  (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
                (and (zero? (system* "make" "defconfig"))
-                  (zero? (system* "make" "mrproper" "headers_check")))))
+                    (zero? (system* "make" "mrproper" "headers_check"))))))
           `(lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
@@ -73,7 +84,7 @@
                   (guix build utils)
                   (srfi srfi-1))
        #:phases (alist-replace
-                 'build ,build-phase
+                 'build ,(build-phase)
                   'install ,install-phase
                   (alist-delete 'configure %standard-phases)))
Can you confirm?


reply via email to

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