From 4b4d4d7baef00df6e5b8ee14359195292fd37e36 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 6 Jul 2021 16:23:30 +0300 Subject: [PATCH] gnu: openblas: Fix building on powerpc64le-linux. * gnu/packages/maths.scm (openblas)[arguments]: Add make-flags to enable building for powerpc64le-linux. --- gnu/packages/maths.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 3d3d20d609..cd40e8eb99 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -3843,13 +3843,17 @@ parts of it.") ;; Build the library for all supported CPUs. This allows ;; switching CPU targets at runtime with the environment variable ;; OPENBLAS_CORETYPE=, where "type" is a supported CPU type. - ;; Unfortunately, this is not supported on non-x86 architectures, + ;; Unfortunately, this is not supported on all architectures, ;; where it leads to failed builds. ,@(let ((system (or (%current-target-system) (%current-system)))) (cond ((or (string-prefix? "x86_64" system) (string-prefix? "i686" system)) '("DYNAMIC_ARCH=1")) + ;; On some of these architectures the CPU can't be detected. + ((string-prefix? "powerpc64le" system) + '("DYNAMIC_ARCH=1" + "TARGET=GENERIC")) ;; On MIPS we force the "SICORTEX" TARGET, as for the other ;; two available MIPS targets special extended instructions ;; for Loongson cores are used. -- 2.20.1