unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#55591] [PATCH] WIP: fix the linux build system
@ 2022-05-23  8:33 Christopher Baines
  2022-05-24  7:09 ` Liliana Marie Prikler
  2022-05-25  7:37 ` bug#55591: " Mathieu Othacehe
  0 siblings, 2 replies; 3+ messages in thread
From: Christopher Baines @ 2022-05-23  8:33 UTC (permalink / raw)
  To: 55591

---
 gnu/platform.scm                   | 6 +++++-
 guix/build-system/linux-module.scm | 3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnu/platform.scm b/gnu/platform.scm
index fdc3685e7c..91a1854e68 100644
--- a/gnu/platform.scm
+++ b/gnu/platform.scm
@@ -66,10 +66,14 @@ (define-record-type* <platform> platform make-platform
   platform?
   (target               platform-target)
   (system               platform-system)
-  (linux-architecture   platform-linux-architecture
+  (linux-architecture   platform-linux-architecture*
                         (default #f))
   (glibc-dynamic-linker platform-glibc-dynamic-linker))
 
+;; Provide a procedure so this can be used via module-ref
+(define (platform-linux-architecture platform)
+  (platform-linux-architecture* platform))
+
 \f
 ;;;
 ;;; Platforms.
diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm
index 761ebe25b1..78a3ba95b2 100644
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@ -51,7 +51,8 @@ (define (default-linux)
 
 (define (system->arch system)
   (let ((module (resolve-interface '(gnu platform))))
-    ((module-ref module 'lookup-platform-by-target-or-system) system)))
+    ((module-ref module 'platform-linux-architecture)
+     ((module-ref module 'lookup-platform-by-target-or-system) system))))
 
 (define (make-linux-module-builder linux)
   (package
-- 
2.34.0





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#55591] [PATCH] WIP: fix the linux build system
  2022-05-23  8:33 [bug#55591] [PATCH] WIP: fix the linux build system Christopher Baines
@ 2022-05-24  7:09 ` Liliana Marie Prikler
  2022-05-25  7:37 ` bug#55591: " Mathieu Othacehe
  1 sibling, 0 replies; 3+ messages in thread
From: Liliana Marie Prikler @ 2022-05-24  7:09 UTC (permalink / raw)
  To: Christopher Baines, 55591

Am Montag, dem 23.05.2022 um 09:33 +0100 schrieb Christopher Baines:
> ---
>  gnu/platform.scm                   | 6 +++++-
>  guix/build-system/linux-module.scm | 3 ++-
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/gnu/platform.scm b/gnu/platform.scm
> index fdc3685e7c..91a1854e68 100644
> --- a/gnu/platform.scm
> +++ b/gnu/platform.scm
> @@ -66,10 +66,14 @@ (define-record-type* <platform> platform make-
> platform
>    platform?
>    (target               platform-target)
>    (system               platform-system)
> -  (linux-architecture   platform-linux-architecture
> +  (linux-architecture   platform-linux-architecture*
>                          (default #f))
>    (glibc-dynamic-linker platform-glibc-dynamic-linker))
>  
> +;; Provide a procedure so this can be used via module-ref
> +(define (platform-linux-architecture platform)
> +  (platform-linux-architecture* platform))
> +
I'd use a percent prefix if the problem is that platform-linux-
architecture can not be called.

>  ;;;
>  ;;; Platforms.
> diff --git a/guix/build-system/linux-module.scm b/guix/build-
> system/linux-module.scm
> index 761ebe25b1..78a3ba95b2 100644
> --- a/guix/build-system/linux-module.scm
> +++ b/guix/build-system/linux-module.scm
> @@ -51,7 +51,8 @@ (define (default-linux)
>  
>  (define (system->arch system)
>    (let ((module (resolve-interface '(gnu platform))))
> -    ((module-ref module 'lookup-platform-by-target-or-system)
> system)))
> +    ((module-ref module 'platform-linux-architecture)
> +     ((module-ref module 'lookup-platform-by-target-or-system)
> system))))
Why not add a helper function named lookup-platform-architecture-by-
target-or-system to (gnu platform), which performs the lookup followed
by the platform-linux-architecture accessor?

Cheers




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#55591: [PATCH] WIP: fix the linux build system
  2022-05-23  8:33 [bug#55591] [PATCH] WIP: fix the linux build system Christopher Baines
  2022-05-24  7:09 ` Liliana Marie Prikler
@ 2022-05-25  7:37 ` Mathieu Othacehe
  1 sibling, 0 replies; 3+ messages in thread
From: Mathieu Othacehe @ 2022-05-25  7:37 UTC (permalink / raw)
  To: Christopher Baines; +Cc: 55591-done


Hello Chris,

> +;; Provide a procedure so this can be used via module-ref
> +(define (platform-linux-architecture platform)
> +  (platform-linux-architecture* platform))

Thanks for the patch! I guess it could have been a way to fix the
issue. Josselin proposed to move the platform part to (guix platform)
instead in the merged 55602 ticket.

Closing that one as it is not needed anymore.

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-25  7:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-23  8:33 [bug#55591] [PATCH] WIP: fix the linux build system Christopher Baines
2022-05-24  7:09 ` Liliana Marie Prikler
2022-05-25  7:37 ` bug#55591: " Mathieu Othacehe

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