GNU bug report logs - #75051
[PATCH 00/14] Add loongarch64 platform support.

Previous Next

Package: guix-patches;

Reported by: Zheng Junjie <873216071 <at> qq.com>

Date: Mon, 23 Dec 2024 17:04:01 UTC

Severity: normal

Tags: patch

Done: Z572 <z572 <at> z572.online>

Bug is archived. No further changes may be made.

Full log


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

From: Zheng Junjie <873216071 <at> qq.com>
To: 75051 <at> debbugs.gnu.org
Subject: [PATCH 09/14] gnu: libatomic-ops: Fix cross-compiling to loongarch64.
Date: Tue, 24 Dec 2024 01:13:09 +0800
* gnu/packages/bdw-gc.scm (libatomic-ops)[native-inputs]: When cross-compiling
to loongarch64, Add config.
[arguments]: When cross-compiling to loongarch64, Add update-config-scripts
phase.

Change-Id: I7a56860910e38985573482d4a4cfa622d8158f7c
---
 gnu/packages/bdw-gc.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
index 8eed98d1fd7..d33c51663bc 100644
--- a/gnu/packages/bdw-gc.scm
+++ b/gnu/packages/bdw-gc.scm
@@ -29,6 +29,7 @@ (define-module (gnu packages bdw-gc)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages hurd))
 
 (define-public libgc
@@ -155,6 +156,24 @@ (define-public libatomic-ops
                 "0glzah695wsf6c27hs5wwlw4mnq1vfivdshz1rb8pq7w4mp5dazh"))))
     (build-system gnu-build-system)
     (outputs '("out" "debug"))
+    (native-inputs (if (and (target-loongarch64?)
+                            (%current-target-system))
+                       (list config)
+                       '()))
+    (arguments (if (and (target-loongarch64?)
+                        (%current-target-system))
+                   (list #:phases
+                         #~(modify-phases %standard-phases
+                             (add-after 'unpack 'update-config-scripts
+                               (lambda* (#:key inputs native-inputs #:allow-other-keys)
+                                 ;; Replace outdated config.guess and config.sub.
+                                 (for-each (lambda (file)
+                                             (install-file
+                                              (search-input-file
+                                               (or native-inputs inputs)
+                                               (string-append "/bin/" file)) "."))
+                                           '("config.guess" "config.sub"))))))
+                   '()))
     (synopsis "Accessing hardware atomic memory update operations")
     (description
      "This C library provides semi-portable access to hardware-provided atomic
-- 
2.46.0





This bug report was last modified 81 days ago.

Previous Next


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