[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/09: gnu: libjpeg-turbo: Fix cross-compilation.
From: |
guix-commits |
Subject: |
05/09: gnu: libjpeg-turbo: Fix cross-compilation. |
Date: |
Sun, 26 Jan 2020 07:46:13 -0500 (EST) |
mbakke pushed a commit to branch core-updates
in repository guix.
commit f3418f58dc6fc2698183a46dacdf01fe16d685f0
Author: Marius Bakke <address@hidden>
AuthorDate: Sun Jan 26 12:57:56 2020 +0100
gnu: libjpeg-turbo: Fix cross-compilation.
* gnu/packages/image.scm (libjpeg-turbo)[arguments]: In #:configure-flags,
add
"-DCMAKE_SYSTEM_PROCESSOR" for known architectures when cross-compiling.
---
gnu/packages/image.scm | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index ebb3074..ecd1867 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1507,7 +1507,22 @@ is hereby granted."))))
`(("nasm" ,nasm)))
(arguments
`(#:configure-flags '("-DCMAKE_INSTALL_LIBDIR:PATH=lib"
- "-DENABLE_STATIC=0")
+ "-DENABLE_STATIC=0"
+ ;; The build system probes for the current CPU, but
+ ;; that fails when cross-compiling.
+ ,@(let ((target (%current-target-system)))
+ (if target
+ (cond
+ ((string-prefix? "arm" target)
+ `("-DCMAKE_SYSTEM_PROCESSOR=arm"))
+ ((string-prefix? "aarch64" target)
+ `("-DCMAKE_SYSTEM_PROCESSOR=aarch64"))
+ ((string-prefix? "i686" target)
+ `("-DCMAKE_SYSTEM_PROCESSOR=x86"))
+ ((string-prefix? "x86_64" target)
+ `("-DCMAKE_SYSTEM_PROCESSOR=x86_64"))
+ (else '()))
+ '())))
,@(if (%current-target-system)
'()
;; Use a special "bootstrap" CMake for the native build to work
- branch core-updates updated (ed24dda -> ac84175), guix-commits, 2020/01/26
- 03/09: gnu: cmake: Remove bundled LibUV., guix-commits, 2020/01/26
- 01/09: build-system/cmake: Enable parallel tests by default., guix-commits, 2020/01/26
- 05/09: gnu: libjpeg-turbo: Fix cross-compilation.,
guix-commits <=
- 02/09: gnu: cmake, cmake-minimal: Use cmake-build-system., guix-commits, 2020/01/26
- 07/09: gnu: jsoncpp: Fix cross-compilation., guix-commits, 2020/01/26
- 06/09: build-system/cmake: Specify C++ compiler when cross-compiling., guix-commits, 2020/01/26
- 09/09: gnu: cmake: Fix cross-compilation., guix-commits, 2020/01/26
- 04/09: gnu: cmake: Enable debugging information., guix-commits, 2020/01/26
- 08/09: gnu: rhash: Fix cross-compilation., guix-commits, 2020/01/26