mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
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.
This commit is contained in:
parent
28ba01aec6
commit
f3418f58dc
1 changed files with 16 additions and 1 deletions
|
@ -1507,7 +1507,22 @@ (define-public libjpeg-turbo
|
|||
`(("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
|
||||
|
|
Loading…
Reference in a new issue