guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/5] gnu: linux-libre: Use system->architecture.


From: Ludovic Courtès
Subject: Re: [PATCH 3/5] gnu: linux-libre: Use system->architecture.
Date: Mon, 05 Sep 2016 10:27:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

David Craven <address@hidden> 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 via email to

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