From: ludo@gnu.org (Ludovic Courtès)
To: Nikita Karetnikov <nikita@karetnikov.org>
Cc: bug-guix@gnu.org
Subject: Re: Porting to mips64el
Date: Thu, 14 Feb 2013 12:33:47 +0100 [thread overview]
Message-ID: <87pq03b04k.fsf@gnu.org> (raw)
In-Reply-To: <871ucjs58v.fsf@karetnikov.org> (Nikita Karetnikov's message of "Thu, 14 Feb 2013 02:51:01 -0500")
Nikita Karetnikov <nikita@karetnikov.org> skribis:
> I'm attaching three patches.
> '0001-gnu-Disable-Libtool-s-testsuite.patch' and
> '0001-gnu-Set-ARCH-to-mips.patch' are for 'mips64el'. The other one is
> for 'core-updates', but it's also needed for 'mips64el'. (Should I push
> to both?)
>
> Could you test them? (Don't forget to adjust 'build-aux/download.scm'.)
I can’t test on MIPS, but here are some comments.
> I'll push them if they are fine.
To the ‘mips64el’ branch.
> From 41aeaf76e8c61d184f06e8c886e595e8a97ebd16 Mon Sep 17 00:00:00 2001
> From: Nikita Karetnikov <nikita@karetnikov.org>
> Date: Thu, 14 Feb 2013 06:25:38 +0000
> Subject: [PATCH] gnu: Remove a newline.
Change to “gnu: gcc: Remove extraneous newline in LIB_SPEC”. Otherwise
it sounds like it removes a non-significant newline in the code.
> * gnu/packages/base.scm (gcc-4.7): Remove the newline.
“Remove trailing newline when patching ‘LIB_SPEC’.”
You can already commit this one with these changes.
> From ad1536e4730b9d37a0519fdd29bdd8195554358d Mon Sep 17 00:00:00 2001
> From: Nikita Karetnikov <nikita@karetnikov.org>
> Date: Thu, 14 Feb 2013 06:36:23 +0000
> Subject: [PATCH] gnu: Disable Libtool's testsuite.
>
> * gnu/packages/autotools.scm (libtool): Add '#:tests? #f'.
> ---
> gnu/packages/autotools.scm | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
> index bc4dddc..e004dd9 100644
> --- a/gnu/packages/autotools.scm
> +++ b/gnu/packages/autotools.scm
> @@ -195,7 +195,8 @@ Standards. Automake requires the use of Autoconf.")
> "out")) ; libltdl.so, ltdl.h, etc.
>
> (arguments
> - `(#:patches (list (assoc-ref %build-inputs "patch/skip-tests"))
> + `(#:tests? #f
Instead of disabling tests for everyone, do something like:
`(;; XXX: Work around test failure on MIPS as reported at
;; <http://.../bug-libtool/...>.
#:tests? ,(not (string=? (%current-system) "mips64el-linux"))
;; ...
)
Once done, you can commit it as well.
> From 31a7f172941c592f04f8f741b89e04a2a6677a76 Mon Sep 17 00:00:00 2001
> From: Nikita Karetnikov <nikita@karetnikov.org>
> Date: Thu, 14 Feb 2013 06:14:48 +0000
> Subject: [PATCH] gnu: Set 'ARCH' to 'mips'.
>
> * gnu/packages/linux.scm (linux-libre-headers): Set 'ARCH' to 'mips'.
> ---
> gnu/packages/linux.scm | 19 +++++++++++++++----
> 1 file changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index 58cddc0..fe8148c 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")
> (build-phase
> - '(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? "mips" arch)
> + "mips"))
> + '())
Now that we’re triggering a rebuild anyway, let’s write it the normal
way, that is:
(setenv "ARCH"
(cond ((string=? arch "i686") "i386")
((string-prefix? "mips" arch") "mips")
(else arch)))
Actually, even better would be do that in host code, as done with
‘glibc-dynamic-linker’:
(define (system->linux-architecture arch)
(let ((arch (car (string-split arch #\-))))
(cond ((string=? arch "i686") "i386")
((string-prefix? "mips" arch") "mips")
(else arch))))
And then, change ‘build-phase’ to something like:
(let ((build-phase
(lambda (arch)
`(lambda _
(setenv "ARCH" ,(system->linux-architecture arch))
...))))
(arguments `(#:phase ... ,(build-phase (%current-system)) ...)))
Could you try that?
Thanks!
Ludo’.
next prev parent reply other threads:[~2013-02-14 11:34 UTC|newest]
Thread overview: 102+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-24 19:43 mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv" Nikita Karetnikov
2012-12-30 15:17 ` Ludovic Courtès
2012-12-30 16:14 ` Nikita Karetnikov
2012-12-30 17:58 ` Ludovic Courtès
2012-12-30 20:40 ` Nikita Karetnikov
2012-12-30 21:20 ` Ludovic Courtès
2012-12-30 22:43 ` Nikita Karetnikov
2012-12-31 12:21 ` Ludovic Courtès
2013-01-08 13:26 ` Porting to mips64el (was: mips64el: No such file or directory: "/nix/store/*-glibc-2.13.drv") Nikita Karetnikov
2013-01-08 13:34 ` Porting to mips64el Ludovic Courtès
2013-01-08 14:52 ` Nikita Karetnikov
2013-01-08 16:30 ` Ludovic Courtès
2013-01-08 18:18 ` Nikita Karetnikov
2013-01-08 20:50 ` Ludovic Courtès
2013-01-09 15:53 ` Nikita Karetnikov
2013-01-09 21:42 ` Ludovic Courtès
2013-01-11 4:08 ` Nikita Karetnikov
2013-01-11 13:28 ` Ludovic Courtès
2013-01-11 21:49 ` Nikita Karetnikov
2013-01-11 23:44 ` Ludovic Courtès
2013-01-12 14:49 ` Nikita Karetnikov
2013-01-12 15:06 ` Ludovic Courtès
2013-01-12 15:46 ` Nikita Karetnikov
2013-01-12 21:01 ` Ludovic Courtès
2013-01-12 23:00 ` Nikita Karetnikov
2013-01-13 20:49 ` Ludovic Courtès
2013-01-19 16:49 ` Nikita Karetnikov
2013-01-19 17:45 ` Ludovic Courtès
2013-01-20 7:39 ` Nikita Karetnikov
2013-01-20 14:33 ` Ludovic Courtès
2013-01-22 22:51 ` Nikita Karetnikov
2013-01-23 5:01 ` Nikita Karetnikov
2013-01-23 15:35 ` Ludovic Courtès
2013-01-23 22:08 ` Nikita Karetnikov
2013-01-24 15:56 ` Ludovic Courtès
2013-01-26 4:33 ` Nikita Karetnikov
2013-01-26 21:37 ` Ludovic Courtès
2013-01-27 5:47 ` Nikita Karetnikov
2013-01-27 21:15 ` Ludovic Courtès
2013-01-28 5:51 ` Nikita Karetnikov
2013-01-28 12:59 ` Ludovic Courtès
2013-01-29 17:57 ` Nikita Karetnikov
2013-01-29 21:00 ` Ludovic Courtès
2013-01-29 21:59 ` Nikita Karetnikov
2013-01-29 22:02 ` Ludovic Courtès
2013-01-29 23:29 ` Nikita Karetnikov
2013-01-30 20:58 ` Ludovic Courtès
2013-01-30 23:03 ` Nikita Karetnikov
2013-01-31 12:50 ` Ludovic Courtès
2013-01-31 19:32 ` Nikita Karetnikov
2013-01-31 22:08 ` Ludovic Courtès
2013-02-01 23:43 ` Nikita Karetnikov
2013-02-02 10:09 ` Ludovic Courtès
2013-02-02 12:32 ` Nikita Karetnikov
2013-02-02 17:34 ` Ludovic Courtès
2013-02-02 20:47 ` Nikita Karetnikov
2013-02-03 18:00 ` Ludovic Courtès
2013-02-05 20:53 ` Nikita Karetnikov
2013-02-05 22:00 ` Ludovic Courtès
2013-02-06 9:27 ` Nikita Karetnikov
2013-02-06 14:26 ` Ludovic Courtès
2013-02-08 22:43 ` Nikita Karetnikov
2013-02-08 23:11 ` Ludovic Courtès
2013-02-11 20:50 ` Ludovic Courtès
2013-02-11 21:34 ` Andreas Enge
2013-02-11 22:10 ` Ludovic Courtès
2013-02-12 2:37 ` Nikita Karetnikov
2013-02-12 2:42 ` Nikita Karetnikov
2013-02-12 7:43 ` Nikita Karetnikov
2013-02-14 7:50 ` Nikita Karetnikov
2013-02-14 11:33 ` Ludovic Courtès [this message]
2013-02-15 20:11 ` Nikita Karetnikov
2013-02-16 21:07 ` Ludovic Courtès
2013-02-19 9:49 ` Nikita Karetnikov
2013-02-19 10:19 ` Ludovic Courtès
2013-02-12 9:57 ` Ludovic Courtès
2013-02-13 5:35 ` Nikita Karetnikov
2013-02-13 14:43 ` Ludovic Courtès
2013-02-19 11:05 ` Nikita Karetnikov
2013-02-19 12:54 ` Andreas Enge
2013-02-19 16:54 ` Ludovic Courtès
2013-02-19 18:20 ` Andreas Enge
2013-02-19 18:44 ` Nikita Karetnikov
2013-02-19 21:26 ` Ludovic Courtès
2013-02-20 9:30 ` Andreas Enge
2013-02-20 11:40 ` Ludovic Courtès
2013-02-20 16:25 ` Andreas Enge
2013-02-20 17:05 ` Ludovic Courtès
2013-02-20 17:42 ` Nikita Karetnikov
2013-02-20 19:24 ` Andreas Enge
2013-02-20 20:03 ` Ludovic Courtès
2013-02-20 23:38 ` Porting to anything Andreas Enge
2013-02-21 9:36 ` Ludovic Courtès
2013-02-21 9:56 ` Andreas Enge
2013-02-21 16:48 ` Porting to mips64el Nikita Karetnikov
2013-02-21 18:44 ` Nikita Karetnikov
2013-02-21 21:47 ` Nikita Karetnikov
2013-02-23 18:53 ` Andreas Enge
2013-02-23 18:56 ` Ludovic Courtès
2013-03-03 15:01 ` Nikita Karetnikov
2013-03-03 21:26 ` Ludovic Courtès
2013-01-23 15:33 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pq03b04k.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=bug-guix@gnu.org \
--cc=nikita@karetnikov.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).