GNU bug report logs - #70509
[PATCH 0/2] fix nspr and nss cross-compilation.

Previous Next

Package: guix-patches;

Reported by: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>

Date: Mon, 22 Apr 2024 05:28:03 UTC

Severity: normal

Tags: patch

Done: Z572 <zhengjunjie <at> iscas.ac.cn>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 70509 <at> debbugs.gnu.org (full text, mbox):

From: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>
To: 70509 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: nss: Fix cross-compilation.
Date: Mon, 22 Apr 2024 13:29:17 +0800
* gnu/packages/nss.scm (nss)[arguments]<#:make-flags>: When
cross-compilation, Add CROSS_COMPILE=1.
<#:phases>: When cross-compilation, Set env NATIVE_CC to gcc.

Change-Id: I5c9559a4b8cecf2cfc6c47d136d69c01a335faaf
---
 gnu/packages/nss.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index a93406b9eb..00770f11a9 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -157,6 +157,9 @@ (define-public nss
                                             (#$(target-linux?) "linux")
                                             (else ""))))
                        #~())
+                #$@(if (%current-target-system)
+                       #~("CROSS_COMPILE=1")
+                       #~())
                 (string-append "NSPR_INCLUDE_DIR="
                                (search-input-directory %build-inputs
                                                        "include/nspr"))
@@ -179,7 +182,8 @@ (define-public nss
               (setenv "CC" #$(cc-for-target))
               ;; TODO: Set this unconditionally
               #$@(if (%current-target-system)
-                     #~((setenv "CCC" #$(cxx-for-target)))
+                     #~((setenv "CCC" #$(cxx-for-target))
+                        (setenv "NATIVE_CC" "gcc"))
                      #~())
               ;; No VSX on powerpc-linux.
               #$@(if (target-ppc32?)
-- 
2.41.0





This bug report was last modified 1 year and 27 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.