From 157db85f6d2a37c51e93249eed5f1c0cb06f746d Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 23 Oct 2022 02:00:00 +0200 Subject: 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(-) (limited to 'gnu/packages') 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 ;;; Copyright © 2020 Danny Milosavljevic ;;; Copyright © 2020 Charlie Ritter -;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice +;;; Copyright © 2020–2022 Tobias Geerinckx-Rice ;;; Copyright © 2021 João Pedro Simas ;;; Copyright © 2021 Jack Hill ;;; Copyright © 2022 Jai Vetrivelan @@ -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* -- cgit v1.2.3