[PATCH 0/1] guix: cmake-build-system: Handle unknown systems.

  • Done
  • quality assurance status badge
Details
2 participants
  • Dariqq
  • Jean-Pierre De Jesus DIAZ
Owner
unassigned
Submitted by
Jean-Pierre De Jesus DIAZ
Severity
normal
J
J
Jean-Pierre De Jesus DIAZ wrote on 10 Jan 2024 12:39
(address . guix-patches@gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundationdevices.com)
cover.1704886539.git.jean@foundationdevices.com
Hello,

This patch series sets `-DCMAKE_SYSTEM_NAME=Generic' when the system
name is not known, else set it to Linux or Windows when applicable.

Causes a rebuild of all packages depending on CMAKE-BUILD-SYSTEM as a
result, but this is necessary to build packages for bare-metal
architectures, e.g. for `avr' or `or1k-elf'.

Cheers,

Jean-Pierre De Jesus DIAZ (1):
guix: cmake-build-system: Handle unknown systems.

guix/build/cmake-build-system.scm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)


base-commit: 537768018ee03a6a9a5562022a16b47ac287d131
--
2.41.0
J
J
Jean-Pierre De Jesus DIAZ wrote on 10 Jan 2024 12:40
[PATCH 1/1] guix: cmake-build-system: Handle unknown systems.
(address . 68366@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . me@jeandudey.tech)
faf954c7dce37b0fab0251e54d0bbaf651677c83.1704886539.git.jean@foundationdevices.com
From: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>

* 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 | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

Toggle diff (22 lines)
diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm
index d1ff5071be..6790e1db2b 100644
--- a/guix/build/cmake-build-system.scm
+++ b/guix/build/cmake-build-system.scm
@@ -69,9 +69,12 @@ (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")))
'())
,@configure-flags)))
(format #t "running 'cmake' with arguments ~s~%" args)
--
2.41.0
D
D
Dariqq wrote on 14 Jan 21:07 +0100
Closing bugs
839573a7-fc11-4622-922d-2d72d224176e@posteo.net
Hello,

I sent https://issues.guix.gnu.org/72751to move the cross compile logic
out of the build side code, also adding GNU as a CMAKE_SYSTEM_NAME with
a fallback of Generic.

Because this no longer lives in build code it should now be easier to
add a new SYSTEM_NAME without recompiling the cmake world.

This is now in master.
ad672d80d7 * build-system: cmake: Rework cross compilation

So I am closing these.
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 68366@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 68366
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch