GNU bug report logs -
#62438
[PATCH] gnu: llvm: fix riscv64 cross-compile.
Previous Next
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
[Message part 1 (text/plain, inline)]
Your bug report
#62438: [PATCH] gnu: llvm: fix riscv64 cross-compile.
which was filed against the guix-patches package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 62438 <at> debbugs.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)]
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!
[Message part 3 (message/rfc822, inline)]
* 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
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.