unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Z572 via Guix-patches via <guix-patches@gnu.org>
To: 62438@debbugs.gnu.org
Subject: [bug#62438] [PATCH] gnu: llvm: fix riscv64 cross-compile.
Date: Sat, 25 Mar 2023 20:13:21 +0800	[thread overview]
Message-ID: <tencent_59877F623A46E5A925ECB59E9B3CA9655908@qq.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 2611 bytes --]

* 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





             reply	other threads:[~2023-03-25 12:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-25 12:13 Z572 via Guix-patches via [this message]
2023-04-03 11:11 ` [bug#62438] [PATCH] gnu: llvm: fix riscv64 cross-compile 宋文武 via Guix-patches via
     [not found]   ` <87v8idq9wf.fsf_-_@qq.com>
2023-04-03 15:10     ` Z572 via Guix-patches via
2023-04-08  5:32 ` [bug#62438] [PATCH] gnu: llvm: Fix riscv64 cross-compilation Z572 via Guix-patches via
2023-06-09 21:12   ` [bug#62438] [PATCH] gnu: llvm: fix riscv64 cross-compile Ludovic Courtès
     [not found]     ` <87jzwarpt9.fsf@qq.com>
2023-06-11 14:57       ` Z572 via Guix-patches via
2023-09-07 10:42 ` [bug#62438] [PATCH v2] gnu: llvm: Fix riscv64 cross-compilation iyzsong--- via Guix-patches via
2023-10-19 19:55   ` Ludovic Courtès
2023-10-20  9:58     ` bug#62438: " 宋文武 via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_59877F623A46E5A925ECB59E9B3CA9655908@qq.com \
    --to=guix-patches@gnu.org \
    --cc=62438@debbugs.gnu.org \
    --cc=873216071@qq.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).