GNU bug report logs - #62438
[PATCH] gnu: llvm: fix riscv64 cross-compile.

Previous Next

Package: guix-patches;

Reported by: Z572 <873216071 <at> qq.com>

Date: Sat, 25 Mar 2023 12:14:01 UTC

Severity: normal

Tags: patch

Done: 宋文武 <iyzsong <at> envs.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: 宋文武 <iyzsong <at> envs.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#62438: closed ([PATCH] gnu: llvm: fix riscv64 cross-compile.)
Date: Fri, 20 Oct 2023 09:59:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 20 Oct 2023 17:58:51 +0800
with message-id <8734y5aa3o.fsf <at> envs.net>
and subject line Re: [bug#62438] [PATCH v2] gnu: llvm: Fix riscv64 cross-compilation.
has caused the debbugs.gnu.org bug report #62438,
regarding [PATCH] gnu: llvm: fix riscv64 cross-compile.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
62438: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62438
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Z572 <873216071 <at> qq.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: llvm: fix riscv64 cross-compile.
Date: Sat, 25 Mar 2023 20:13:21 +0800
* gnu/packages/llvm.scm: (llvm-15 llvm-14 llvm-12): fix riscv64 cross-compile
[arguments]: <#:configure>: when target is riscv64, set -DLLVM_TARGET_ARCH=RISCV64.
---
 gnu/packages/llvm.scm | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index e5bf9f5cae..f8691414d8 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -26,6 +26,7 @@
 ;;; Copyright © 2022 John Kehayias <john.kehayias <at> protonmail.com>
 ;;; Copyright © 2022 Clément Lassieur <clement <at> lassieur.org>
 ;;; Copyright © 2022 Zhu Zihao <all_but_last <at> 163.com>
+;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -598,7 +599,9 @@ (define-public llvm-15
                    #$(string-append "-DLLVM_DEFAULT_TARGET_TRIPLE="
                                     (%current-target-system))
                    #$(string-append "-DLLVM_TARGET_ARCH="
-                                    (system->llvm-target))
+                                    (if (target-riscv64?)
+                                        "RISCV64"
+                                        (system->llvm-target)))
                    #$(string-append "-DLLVM_TARGETS_TO_BUILD="
                                     (system->llvm-target)))
                 '())
@@ -658,7 +661,9 @@ (define-public llvm-14
                    #$(string-append "-DLLVM_DEFAULT_TARGET_TRIPLE="
                                     (%current-target-system))
                    #$(string-append "-DLLVM_TARGET_ARCH="
-                                    (system->llvm-target))
+                                    (if (target-riscv64?)
+                                        "RISCV64"
+                                        (system->llvm-target)))
                    #$(string-append "-DLLVM_TARGETS_TO_BUILD="
                                     (system->llvm-target)))
                 '())
@@ -910,7 +915,9 @@ (define-public llvm-12
                       #$(string-append "-DLLVM_DEFAULT_TARGET_TRIPLE="
                                        (%current-target-system))
                       #$(string-append "-DLLVM_TARGET_ARCH="
-                                       (system->llvm-target))
+                                       (if (target-riscv64?)
+                                           "RISCV64"
+                                           (system->llvm-target)))
                       #$(string-append "-DLLVM_TARGETS_TO_BUILD="
                                        (system->llvm-target)))
                    #~())
-- 
2.39.2



[Message part 3 (message/rfc822, inline)]
From: 宋文武 <iyzsong <at> envs.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 62438-done <at> debbugs.gnu.org, Z572 <873216071 <at> qq.com>
Subject: Re: [bug#62438] [PATCH v2] gnu: llvm: Fix riscv64 cross-compilation.
Date: Fri, 20 Oct 2023 17:58:51 +0800
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi,
>
> iyzsong <at> envs.net skribis:
>
>> From: Z572 <873216071 <at> qq.com>
>>
>> * gnu/packages/llvm.scm (system->llvm-target-arch): New procedure.
>> (llvm-15,llvm-14,llvm-12): Use It.
>> (system->llvm-target): Rewrite in terms of 'system->llvm-target-arch'.
>>
>> Co-authored-by: 宋文武 <iyzsong <at> member.fsf.org>
>
> I guess you can go ahead and apply it (sorry for dropping the ball
> earlier!).
>

Pushed, thank you!


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

Previous Next


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