diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2023-10-15 13:02:26 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2023-10-15 13:02:26 +0300 |
commit | a888342f8924601055aaf320db78449510abdd29 (patch) | |
tree | 0e5f31834f0970539cb525eef3c312a6649817a9 /gnu | |
parent | 2aab62fe24307cd0b9a5f168bae0a004b1f54f67 (diff) |
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.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/nss.scm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm index 640eb5b2e4..54b9e5041a 100644 --- a/gnu/packages/nss.scm +++ b/gnu/packages/nss.scm @@ -143,6 +143,17 @@ in the Mozilla clients.") #$@(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 @@ in the Mozilla clients.") (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")) |