all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: David Craven <david@craven.ch>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 3/5] gnu: linux-libre: Use system->architecture.
Date: Mon, 05 Sep 2016 10:27:51 +0200	[thread overview]
Message-ID: <87twdupx88.fsf@gnu.org> (raw)
In-Reply-To: <20160902160928.9458-4-david@craven.ch> (David Craven's message of "Fri, 2 Sep 2016 18:09:26 +0200")

David Craven <david@craven.ch> skribis:

> * 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))

Important note: (%current-target-system) returns a GNU triplet such as
“arm-linux-gnueabihf”, whereas (%current-system) returns a “system type”
such as “armhf-linux”.

In practice it works here, and ‘linux-libre-headers’ already does that,
so this patch is OK (can go to master).

However, we should augment the docstring of ‘system->linux-architecture’
to clarify that it accepts both a triplet and a system string.  Could
you do that?

Thanks,
Ludo’.

  reply	other threads:[~2016-09-05  8:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02 16:09 [PATCH] gnu: linux-libre-headers: Use modify-phases David Craven
2016-09-02 16:09 ` [PATCH 1/5] gnu: module-init-tools: Prevent line wrapping David Craven
2016-09-05  8:22   ` Ludovic Courtès
2016-09-02 16:09 ` [PATCH 2/5] gnu: linux-libre: Use modify-phases David Craven
2016-09-05  8:23   ` Ludovic Courtès
2016-09-02 16:09 ` [PATCH 3/5] gnu: linux-libre: Use system->architecture David Craven
2016-09-05  8:27   ` Ludovic Courtès [this message]
2016-09-02 16:09 ` [PATCH 4/5] gnu: kernel-config: Add armhf kernel config David Craven
2016-09-05  8:29   ` Ludovic Courtès
2016-09-05 14:25     ` Danny Milosavljevic
2016-09-05 14:29       ` David Craven
2016-09-05 20:44         ` Leo Famulari
2016-09-02 16:09 ` [PATCH 5/5] gnu: linux-libre: Add support for cross-compilation David Craven
2016-09-02 16:24   ` David Craven
2016-09-05  8:33   ` Ludovic Courtès
2016-09-05  8:23 ` [PATCH] gnu: linux-libre-headers: Use modify-phases 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87twdupx88.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=david@craven.ch \
    --cc=guix-devel@gnu.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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.