GNU bug report logs - #69549
[PATCH 0/2] libtheora: Fix cross-compiling to riscv64-linux.

Previous Next

Package: guix-patches;

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

Date: Mon, 4 Mar 2024 17:06:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>
To: 69549 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: libtheora: Fix cross-compiling to riscv64-linux.
Date: Tue,  5 Mar 2024 01:19:35 +0800
* gnu/packages/xiph.scm (libtheora):
[native-inputs]: When cross compiling to riscv64-linux-gnu, add config.
[arguments]: When target riscv64-linux-gnu, add update-config phase.

Change-Id: Ie055cd4f6cb9d2a4601b93d1f9db227598349c7c
---
 gnu/packages/xiph.scm | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/xiph.scm b/gnu/packages/xiph.scm
index 879d8e8d39..f3603c39bb 100644
--- a/gnu/packages/xiph.scm
+++ b/gnu/packages/xiph.scm
@@ -46,6 +46,7 @@ (define-module (gnu packages xiph)
   #:use-module (gnu packages xml)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
+  #:use-module (guix utils)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
@@ -117,7 +118,26 @@ (define-public libtheora
              (patches (search-patches "libtheora-config-guess.patch"))))
     (build-system gnu-build-system)
     (arguments
-     (list #:configure-flags #~'("--disable-static")))
+     (append
+      (if (and (target-riscv64?)
+               (%current-target-system))
+          (list #:phases
+                #~(modify-phases %standard-phases
+                    (add-after 'unpack 'update-config
+                      (lambda* (#:key native-inputs inputs #:allow-other-keys)
+                        (for-each (lambda (file)
+                                    (install-file
+                                     (search-input-file
+                                      (or native-inputs inputs)
+                                      (string-append "/bin/" file)) "."))
+                                  '("config.guess" "config.sub"))))))
+          '())
+      (list #:configure-flags #~'("--disable-static"))))
+    (native-inputs
+     (if (and (target-riscv64?)
+              (%current-target-system))
+         (list config)
+         '()))
     (inputs (list libvorbis))
     ;; The .pc files refer to libogg.
     (propagated-inputs (list libogg))
-- 
2.41.0





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

Previous Next


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