mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: nss: Fix cross-compiling.
* gnu/packages/nss.scm (nss)[arguments]: Adjust configure-flags when cross-compiling to correctly set the target architecture and kernel. Adjust the custom 'configure-phase when cross-compiling to use the correct C++ compiler.
This commit is contained in:
parent
2aab62fe24
commit
a888342f89
1 changed files with 15 additions and 0 deletions
|
@ -143,6 +143,17 @@ (define-public nss
|
|||
#$@(if (target-riscv64?)
|
||||
#~("NSS_DISABLE_GTESTS=1")
|
||||
#~())
|
||||
;; Ensure we are building for the (%current-target-system).
|
||||
#$@(if (%current-target-system)
|
||||
#~((string-append
|
||||
"OS_TEST="
|
||||
(string-take #$(%current-target-system)
|
||||
(string-index #$(%current-target-system) #\-)))
|
||||
(string-append
|
||||
"KERNEL=" (cond (#$(target-hurd?) "gnu")
|
||||
(#$(target-linux?) "linux")
|
||||
(else ""))))
|
||||
#~())
|
||||
(string-append "NSPR_INCLUDE_DIR="
|
||||
(search-input-directory %build-inputs
|
||||
"include/nspr"))
|
||||
|
@ -163,6 +174,10 @@ (define-public nss
|
|||
(replace 'configure
|
||||
(lambda _
|
||||
(setenv "CC" #$(cc-for-target))
|
||||
;; TODO: Set this unconditionally
|
||||
#$@(if (%current-target-system)
|
||||
#~((setenv "CCC" #$(cxx-for-target)))
|
||||
#~())
|
||||
;; No VSX on powerpc-linux.
|
||||
#$@(if (target-ppc32?)
|
||||
#~((setenv "NSS_DISABLE_CRYPTO_VSX" "1"))
|
||||
|
|
Loading…
Reference in a new issue