aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2022-10-23 02:00:00 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2022-10-23 02:00:00 +0200
commit157db85f6d2a37c51e93249eed5f1c0cb06f746d (patch)
tree3d0afedf68eb441f46c8d639ffd17eca9ecaf920 /gnu/packages
parent1f29136e2552998e90f204b7f5785c599a3ae056 (diff)
downloadguix-157db85f6d2a37c51e93249eed5f1c0cb06f746d.tar.gz
guix-157db85f6d2a37c51e93249eed5f1c0cb06f746d.zip
gnu: sdrangel: Don't detect CPU extensions at build time.
* gnu/packages/radio.scm (sdrangel)[arguments]: Add a new 'fix-CPU-extension-detection phase.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/radio.scm14
1 files changed, 13 insertions, 1 deletions
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*