guix-patches
[Top][All Lists]
Advanced

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

[bug#69476] [PATCH 7/8] guix: cmake-build-system: Handle unknown systems


From: Ludovic Courtès
Subject: [bug#69476] [PATCH 7/8] guix: cmake-build-system: Handle unknown systems.
Date: Wed, 17 Apr 2024 11:54:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com> skribis:

> * guix/build/cmake-build-system.scm (configure): Use Generic as the
>   system name if the system is unknown.
>
> Change-Id: Ifd4a618ef67eb420b02d48f05291571aea44e46e
> ---
>  guix/build/cmake-build-system.scm | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/guix/build/cmake-build-system.scm 
> b/guix/build/cmake-build-system.scm
> index d1ff5071be..0774124c95 100644
> --- a/guix/build/cmake-build-system.scm
> +++ b/guix/build/cmake-build-system.scm
> @@ -69,9 +69,13 @@ (define* (configure #:key outputs (configure-flags '()) 
> (out-of-source? #t)
>                                               target "-gcc")
>                                (string-append "-DCMAKE_CXX_COMPILER="
>                                               target "-g++")
> -                              (if (string-contains target "mingw")
> -                                  "-DCMAKE_SYSTEM_NAME=Windows"
> -                                  "-DCMAKE_SYSTEM_NAME=Linux"))
> +                              (cond
> +                                ((string-contains target "mingw")
> +                                 "-DCMAKE_SYSTEM_NAME=Windows")
> +                                ((string-contains target "linux")
> +                                 "-DCMAKE_SYSTEM_NAME=Linux")
> +                                (else
> +                                 "-DCMAKE_SYSTEM_NAME=Generic")))

I spoke too fast.

This patch is good but it triggers a rebuild of everything that depends
on CMake.

So for now, I instead amended the last patch of the series like this:

diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 373ed0e81f..6f0c2da806 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -113,7 +113,9 @@ (define-public ath9k-htc-ar7010-firmware
     (arguments
      (list #:target "xtensa-ath9k-elf"
            #:tests? #f
-           #:configure-flags #~'("-DTARGET_MAGPIE=ON")
+           #:configure-flags
+           #~'("-DCMAKE_SYSTEM_NAME=Generic"      ;override default value
+               "-DTARGET_MAGPIE=ON")
            #:phases
            #~(modify-phases %standard-phases
                (add-before 'configure 'change-directory
@@ -140,7 +142,9 @@ (define-public ath9k-htc-ar9271-firmware
     (arguments
      (substitute-keyword-arguments
        (package-arguments ath9k-htc-ar7010-firmware)
-       ((#:configure-flags flags) #~'("-DTARGET_K2=ON"))))
+       ((#:configure-flags flags)
+        #~'("-DCMAKE_SYSTEM_NAME=Generic"         ;override default value
+            "-DTARGET_K2=ON"))))
     (synopsis "Firmware for the Atheros AR9271 USB 802.11n NICs")
     (description
      "This is the firmware for the Qualcomm Atheros AR9271 802.11n USB NICs
I confirmed that this builds and that I get the same hashes.

That said, we should arrange to land the ‘cmake-build-system.scm’ patch
either on the next ‘core-updates’ branch or on a topic branch.

Thoughts?

Thanks,
Ludo’.

reply via email to

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