[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#62438] [PATCH] gnu: llvm: fix riscv64 cross-compile.
From: |
Z572 |
Subject: |
[bug#62438] [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@protonmail.com>
;;; Copyright ?? 2022 Cl??ment Lassieur <clement@lassieur.org>
;;; Copyright ?? 2022 Zhu Zihao <all_but_last@163.com>
+;;; Copyright ?? 2023 Zheng Junjie <873216071@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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug#62438] [PATCH] gnu: llvm: fix riscv64 cross-compile.,
Z572 <=