GNU bug report logs - #50201
[PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors

Previous Next

Package: guix-patches;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Wed, 25 Aug 2021 17:59:01 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxime Devos <maximedevos <at> telenet.be>
To: 50201 <at> debbugs.gnu.org
Cc: Maxime Devos <maximedevos <at> telenet.be>
Subject: [bug#50201] [PATCH 06/52] gnu: nspr: Adjust to Mozilla cross-compilation conventions.
Date: Wed, 25 Aug 2021 20:02:46 +0200
* gnu/packages/nss.scm
  (nspr)[arguments]<#:configure-flags>: Set --host and --target
  inappropriately when cross-compiling.
---
 gnu/packages/nss.scm | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index 55eddc0c91..6560aede56 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2020, 2021 Marius Bakke <marius <at> gnu.org>
 ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -51,11 +52,20 @@
      `(("perl" ,perl)))
     (arguments
      `(#:tests? #f ; no check target
-       #:configure-flags (list "--disable-static"
-                               "--enable-64bit"
-                               (string-append "LDFLAGS=-Wl,-rpath="
-                                              (assoc-ref %outputs "out")
-                                              "/lib"))
+       #:configure-flags
+       (list "--disable-static"
+             "--enable-64bit"
+             (string-append "LDFLAGS=-Wl,-rpath="
+                            (assoc-ref %outputs "out") "/lib")
+             ;; Mozilla deviates from Autotools conventions
+             ;; due to historical reasons.  Adjust to Mozilla conventions,
+             ;; otherwise the Makefile will try to use TARGET-gcc
+             ;; as a ‘native’ compiler.
+             ,@(if (%current-target-system)
+                   `(,(string-append "--host="
+                                     (nix-system->gnu-triplet (%current-system)))
+                     ,(string-append "--target=" (%current-target-system)))
+                   '()))
        ;; Use fixed timestamps for reproducibility.
        #:make-flags '("SH_DATE='1970-01-01 00:00:01'"
                       ;; This is epoch 1 in microseconds.
-- 
2.33.0





This bug report was last modified 3 years and 240 days ago.

Previous Next


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