unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#72751] [PATCH 0/2] Rework cmake cross compiling.
@ 2024-08-21 18:05 Dariqq
  2024-08-21 18:34 ` [bug#72751] [PATCH 1/2] guix: build-system: cmake: Rework cross compilation Dariqq
  2024-08-21 18:34 ` [bug#72751] [PATCH 2/2] gnu: ath9k-firmware: Remove CMAKE_SYSTEM_NAME override Dariqq
  0 siblings, 2 replies; 3+ messages in thread
From: Dariqq @ 2024-08-21 18:05 UTC (permalink / raw)
  To: 72751; +Cc: Dariqq, Efraim Flashner, Vagrant Cascadian

Hi,

This is an attempt to move the cross compile logic out of the build side.

This should fix https://issues.guix.gnu.org/72697 and technically supersedes https://issues.guix.gnu.org/68366 .
Also cleans up after https://issues.guix.gnu.org/69476 by removing the need for CMAKE_SYSTEM_NAME override.

Main benefit is that this decouples the cmake native compilation and cmake cross compilation, i.e. if a new target needs a new CMAKE_SYSTEM_NAME we don't need to touch build code to enable it and thus don't need to rebuild everything natively for something only affecting cross building.

Also use the target-*? functions and c*-for-target instead of reimplementing them in build code.

The new cmake-system-name-for-target (a bit long, idk) now also supports hurd and bare-metal targets.

I have tested this with the package i had troubles in #72697, and also verified that the ath9k firmware hashes are unchanged.

Output of guix hash:

/gnu/store/0r075s8g9pr9i6yd3pvwfjl2g4mkm7s8-ath9k-htc-ar9271-firmware-1.4.0/lib/firmware/htc_9271.fw 
0bi0m4y1g8i47mal4m11pry88kjqqyk2209hw5yj2awngp31qj55

/gnu/store/msjnrh864a2c8k44hvwqs6fra7c7bb6v-ath9k-htc-ar7010-firmware-1.4.0/lib/firmware/htc_7010.fw 
01hl01gv66k8g5avw85fbfyzblsy1ccmv64wq7g3zbgdwcb4ry7f


Unfortunely this will cause a lot of rebuilds (but this will be hopefully easier in the future).

Dariqq (2):
  guix: build-system: cmake: Rework cross compilation.
  gnu: ath9k-firmware: Remove CMAKE_SYSTEM_NAME override.

 gnu/packages/firmware.scm         |  6 ++----
 guix/build-system/cmake.scm       | 19 ++++++++++++++++++-
 guix/build/cmake-build-system.scm | 11 -----------
 3 files changed, 20 insertions(+), 16 deletions(-)


base-commit: 7a149c6003d25e8b2794b113d34062be134d7710
-- 
2.45.2





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

end of thread, other threads:[~2024-08-21 18:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-21 18:05 [bug#72751] [PATCH 0/2] Rework cmake cross compiling Dariqq
2024-08-21 18:34 ` [bug#72751] [PATCH 1/2] guix: build-system: cmake: Rework cross compilation Dariqq
2024-08-21 18:34 ` [bug#72751] [PATCH 2/2] gnu: ath9k-firmware: Remove CMAKE_SYSTEM_NAME override Dariqq

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