[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/04: gnu: sdrangel: Don't detect CPU extensions at build time.
From: |
guix-commits |
Subject: |
01/04: gnu: sdrangel: Don't detect CPU extensions at build time. |
Date: |
Sun, 30 Oct 2022 18:11:48 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit 157db85f6d2a37c51e93249eed5f1c0cb06f746d
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sun Oct 23 02:00:00 2022 +0200
gnu: sdrangel: Don't detect CPU extensions at build time.
* gnu/packages/radio.scm (sdrangel)[arguments]:
Add a new 'fix-CPU-extension-detection phase.
---
gnu/packages/radio.scm | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm
index f466678289..e1774169ec 100644
--- a/gnu/packages/radio.scm
+++ b/gnu/packages/radio.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2020, 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org>
;;; Copyright © 2020 Charlie Ritter <chewzerita@posteo.net>
-;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020–2022 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2021 João Pedro Simas <jpsimas@gmail.com>
;;; Copyright © 2021 Jack Hill <jackhill@jackhill.us>
;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
@@ -2291,6 +2291,18 @@ voice formats.")
#$(this-package-input "soapysdr")))
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'fix-CPU-extension-detection
+ ;; ‘Fix’ in the static sense. TODO: Make this -tune'able.
+ (lambda _
+ (let ((file "cmake/Modules/DetectArchitecture.cmake"))
+ ;; Disable all build-time CPU extension detection…
+ (substitute* file
+ (("detect_extensions\\(.*") ""))
+ (when ,(target-x86-64?)
+ ;; …but force extensions that are guaranteed to be available.
+ (substitute* file
+ ((".*cmake_pop_check_state" eof)
+ (string-append "force_ext_available(SSE2)\n" eof)))))))
(add-after 'unpack 'fix-boost-compatibility
(lambda _
(substitute*