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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 62438 in the body.
You can then email your comments to 62438 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#62438; Package guix-patches. (Sat, 25 Mar 2023 12:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Z572 <873216071 <at> qq.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 25 Mar 2023 12:14:02 GMT) Full text and rfc822 format available.

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

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





Information forwarded to guix-patches <at> gnu.org:
bug#62438; Package guix-patches. (Mon, 03 Apr 2023 11:11:01 GMT) Full text and rfc822 format available.

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

From: 宋文武 <iyzsong <at> envs.net>
To: Z572 <873216071 <at> qq.com>
Cc: 62438 <at> debbugs.gnu.org
Subject: Re: bug#62438: [PATCH] gnu: llvm: fix riscv64 cross-compile.
Date: Mon, 03 Apr 2023 19:11:09 +0800
Z572 <873216071 <at> qq.com> writes:


> -                                    (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)))
>                  '())

Hello, our `system->llvm-target` has riscv => "RISCV", does it wrong
(should be changed to RISCV64) or does it right only for 32bit RISCV?
And can system->llvm-target be fixed instead of fix each its usage?

Thanks!




Information forwarded to guix-patches <at> gnu.org:
bug#62438; Package guix-patches. (Mon, 03 Apr 2023 15:11:02 GMT) Full text and rfc822 format available.

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

From: Z572 <873216071 <at> qq.com>
To: 宋文武 <iyzsong <at> envs.net>
Cc: 62438 <at> debbugs.gnu.org
Subject: Re: bug#62438: [PATCH] gnu: llvm: fix riscv64 cross-compile.
Date: Mon, 03 Apr 2023 23:10:24 +0800
宋文武 <iyzsong <at> envs.net> writes:

> Z572 <873216071 <at> qq.com> writes:
>
>
>> -                                    (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)))
>>                  '())
>
> Hello, our `system->llvm-target` has riscv => "RISCV", does it wrong
> (should be changed to RISCV64) or does it right only for 32bit RISCV?
> And can system->llvm-target be fixed instead of fix each its usage?
>
> Thanks!
>
>
>
>
hello, system->llvm-target work for LLVM_TARGETS_TO_BUILD, but not work
for LLVM_TARGET_ARCH.
llvm.scm (system->llvm-target) also have a commit
  ;; See the 'lib/Target' directory of LLVM for a list of supported targets.


see
https://github.com/llvm/llvm-project/blob/1fdec59bffc11ae37eb51a1b9869f0696bfd5312/llvm/cmake/config-ix.cmake#L393-#L441,
LLVM_TARGET_ARCH is work for RISCV64 and RISCV32, not RISCV.

xxx|..........cmake/config-ix.cmake..............
432| elseif (LLVM_NATIVE_ARCH MATCHES "wasm64")
433|   set(LLVM_NATIVE_ARCH WebAssembly)
434| elseif (LLVM_NATIVE_ARCH MATCHES "riscv32")
435|   set(LLVM_NATIVE_ARCH RISCV)
436| elseif (LLVM_NATIVE_ARCH MATCHES "riscv64")
437|   set(LLVM_NATIVE_ARCH RISCV)
xxx|.................other.......................


see
https://github.com/llvm/llvm-project/blob/1fdec59bffc11ae37eb51a1b9869f0696bfd5312/llvm/cmake/config-ix.cmake#L450-#L470,
RISCV is work for LLVM_TARGETS_TO_BUILD, it can find /lib/Target/RISCV
directory, if system->llvm_targets return "RISCV64", it cann't
work,because only have RISCV directory.

xxx|...............................cmake/config-ix.cmake.......................
450| list(FIND LLVM_TARGETS_TO_BUILD ${LLVM_NATIVE_ARCH} NATIVE_ARCH_IDX)
451| if (NATIVE_ARCH_IDX EQUAL -1)
452|   message(STATUS
453|     "Native target ${LLVM_NATIVE_ARCH} is not selected; lli will not JIT code")
454| else ()
455|   message(STATUS "Native target architecture is ${LLVM_NATIVE_ARCH}")
456|   set(LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target)
457|   set(LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo)
458|   set(LLVM_NATIVE_TARGETMC LLVMInitialize${LLVM_NATIVE_ARCH}TargetMC)
459|   set(LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter)
460| 
461|   # We don't have an ASM parser for all architectures yet.
462|   if (EXISTS ${PROJECT_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/CMakeLists.txt)
463|     set(LLVM_NATIVE_ASMPARSER LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser)
464|   endif ()
465| 
466|   # We don't have an disassembler for all architectures yet.
467|   if (EXISTS ${PROJECT_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/Disassembler/CMakeLists.txt)
468|     set(LLVM_NATIVE_DISASSEMBLER LLVMInitialize${LLVM_NATIVE_ARCH}Disassembler)
469|   endif ()
470| endif ()
xxx|...........................................other...........................

so a other idea is add a new procedure make -DLLVM_TARGETS_TO_BUILD and
-DLLVM_DEFAULT_TARGET_TRIPLE don't use same procedure.

or not set -DLLVM_TARGET_ARCH like nixpkgs
https://github.com/NixOS/nixpkgs/blob/2766f77c32e171a04d59b636a91083bae862274e/pkgs/development/compilers/llvm/11/llvm/default.nix
it build success on my computer too.

Thoughts?

-- 
over





Information forwarded to guix-patches <at> gnu.org:
bug#62438; Package guix-patches. (Sat, 08 Apr 2023 05:34:02 GMT) Full text and rfc822 format available.

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

From: Z572 <873216071 <at> qq.com>
To: 62438 <at> debbugs.gnu.org
Subject: [PATCH] gnu: llvm: Fix riscv64 cross-compilation.
Date: Sat,  8 Apr 2023 13:32:59 +0800
* gnu/packages/llvm.scm (system->llvm-target-arch): New procedure.
(llvm-15,llvm-14,llvm-12): Use It.
---
 gnu/packages/llvm.scm | 30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index e5bf9f5cae..46cbd4d15a 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -101,6 +101,30 @@ (define* (system->llvm-target #:optional
              ("i686"        => "X86")
              ("i586"        => "X86"))))
 
+(define* (system->llvm-target-arch #:optional
+                                   (system (or (and=> (%current-target-system)
+                                                      gnu-triplet->nix-system)
+                                               (%current-system))))
+  "Return the LLVM target arch name that corresponds to SYSTEM, a system type such
+as \"x86_64-linux\"."
+  ;; See the 'cmake/config-ix.cmake' file of LLVM for a list of supported targets arch.
+  ;; start with # Determine the native architecture.
+  (letrec-syntax ((matches (syntax-rules (=>)
+                             ((_ (system-prefix => target) rest ...)
+                              (if (string-prefix? system-prefix system)
+                                  target
+                                  (matches rest ...)))
+                             ((_)
+                              (error "LLVM target arch for system is unknown" system)))))
+    (matches ("aarch64"     => "AArch64")
+             ("armhf"       => "ARM")
+             ("mips64el"    => "Mips")
+             ("powerpc"     => "PowerPC")
+             ("riscv64"     => "RISCV64")
+             ("x86_64"      => "X86_64")
+             ("i686"        => "X86")
+             ("i586"        => "X86"))))
+
 (define (llvm-uri component version)
   ;; LLVM release candidate file names are formatted 'tool-A.B.C-rcN/tool-A.B.CrcN.src.tar.xz'
   ;; so we specify the version as A.B.C-rcN and delete the hyphen when referencing the file name.
@@ -598,7 +622,7 @@ (define-public llvm-15
                    #$(string-append "-DLLVM_DEFAULT_TARGET_TRIPLE="
                                     (%current-target-system))
                    #$(string-append "-DLLVM_TARGET_ARCH="
-                                    (system->llvm-target))
+                                    (system->llvm-target-arch))
                    #$(string-append "-DLLVM_TARGETS_TO_BUILD="
                                     (system->llvm-target)))
                 '())
@@ -658,7 +682,7 @@ (define-public llvm-14
                    #$(string-append "-DLLVM_DEFAULT_TARGET_TRIPLE="
                                     (%current-target-system))
                    #$(string-append "-DLLVM_TARGET_ARCH="
-                                    (system->llvm-target))
+                                    (system->llvm-target-arch))
                    #$(string-append "-DLLVM_TARGETS_TO_BUILD="
                                     (system->llvm-target)))
                 '())
@@ -910,7 +934,7 @@ (define-public llvm-12
                       #$(string-append "-DLLVM_DEFAULT_TARGET_TRIPLE="
                                        (%current-target-system))
                       #$(string-append "-DLLVM_TARGET_ARCH="
-                                       (system->llvm-target))
+                                       (system->llvm-target-arch))
                       #$(string-append "-DLLVM_TARGETS_TO_BUILD="
                                        (system->llvm-target)))
                    #~())

base-commit: 6311493d7a6271bfbc51f4693857f9a12fe9965d
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62438; Package guix-patches. (Fri, 09 Jun 2023 21:14:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Z572 <873216071 <at> qq.com>
Cc: 62438 <at> debbugs.gnu.org, 宋文武 <iyzsong <at> envs.net>
Subject: Re: bug#62438: [PATCH] gnu: llvm: fix riscv64 cross-compile.
Date: Fri, 09 Jun 2023 23:12:28 +0200
Hi,

Z572 <873216071 <at> qq.com> skribis:

> +(define* (system->llvm-target-arch #:optional
> +                                   (system (or (and=> (%current-target-system)
> +                                                      gnu-triplet->nix-system)
> +                                               (%current-system))))
> +  "Return the LLVM target arch name that corresponds to SYSTEM, a system type such
> +as \"x86_64-linux\"."
> +  ;; See the 'cmake/config-ix.cmake' file of LLVM for a list of supported targets arch.
> +  ;; start with # Determine the native architecture.
> +  (letrec-syntax ((matches (syntax-rules (=>)
> +                             ((_ (system-prefix => target) rest ...)
> +                              (if (string-prefix? system-prefix system)
> +                                  target
> +                                  (matches rest ...)))
> +                             ((_)
> +                              (error "LLVM target arch for system is unknown" system)))))
> +    (matches ("aarch64"     => "AArch64")
> +             ("armhf"       => "ARM")
> +             ("mips64el"    => "Mips")
> +             ("powerpc"     => "PowerPC")
> +             ("riscv64"     => "RISCV64")
> +             ("x86_64"      => "X86_64")
> +             ("i686"        => "X86")
> +             ("i586"        => "X86"))))

The only different compared to ‘system->llvm-target’ is “riscv64”
instead of “riscv”.  Why not add that line to ‘system->llvm-target’
instead of duplicating it?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#62438; Package guix-patches. (Sun, 11 Jun 2023 15:18:01 GMT) Full text and rfc822 format available.

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

From: Z572 <873216071 <at> qq.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 62438 <at> debbugs.gnu.org, guix-patches <at> gnu.org,
 宋文武 <iyzsong <at> envs.net>
Subject: Re: [bug#62438] [PATCH] gnu: llvm: fix riscv64 cross-compile.
Date: Sun, 11 Jun 2023 22:57:08 +0800
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi,
>
> Z572 <873216071 <at> qq.com> skribis:
>
>> +(define* (system->llvm-target-arch #:optional
>> +                                   (system (or (and=> (%current-target-system)
>> +                                                      gnu-triplet->nix-system)
>> +                                               (%current-system))))
>> +  "Return the LLVM target arch name that corresponds to SYSTEM, a system type such
>> +as \"x86_64-linux\"."
>> +  ;; See the 'cmake/config-ix.cmake' file of LLVM for a list of supported targets arch.
>> +  ;; start with # Determine the native architecture.
>> +  (letrec-syntax ((matches (syntax-rules (=>)
>> +                             ((_ (system-prefix => target) rest ...)
>> +                              (if (string-prefix? system-prefix system)
>> +                                  target
>> +                                  (matches rest ...)))
>> +                             ((_)
>> +                              (error "LLVM target arch for system is unknown" system)))))
>> +    (matches ("aarch64"     => "AArch64")
>> +             ("armhf"       => "ARM")
>> +             ("mips64el"    => "Mips")
>> +             ("powerpc"     => "PowerPC")
>> +             ("riscv64"     => "RISCV64")
>> +             ("x86_64"      => "X86_64")
>> +             ("i686"        => "X86")
>> +             ("i586"        => "X86"))))
>
> The only different compared to ‘system->llvm-target’ is “riscv64”
> instead of “riscv”.  Why not add that line to ‘system->llvm-target’
> instead of duplicating it?


```
-- Performing Test HAS_MAYBE_UNINITIALIZED
-- Performing Test HAS_MAYBE_UNINITIALIZED - Success
CMake Error at cmake/config-ix.cmake:502 (message):
  Unknown architecture riscv
Call Stack (most recent call first):
  CMakeLists.txt:776 (include)
```

because `LLVM_TARGETS_TO_BUILD' and `LLVM_TARGET_ARCH' is two
option. The parameters of expectation are different.
but for now, use same procedure `system->llvm-target'.


for llvm 15.0.7

LLVM_TARGETS_TO_BUILD: allow `AArch64 AMDGPU ARC ARM AVR BPF CSKY
DirectX Hexagon Lanai LoongArch M68k MSP430 Mips NVPTX PowerPC RISCV
SPIRV Sparc SystemZ VE WebAssembly X86 XCore`
see https://github.com/llvm/llvm-project/tree/release/15.x/llvm/lib/Target


LLVM_TARGET_ARCH: allow `i[2-6]86 x86 amd64 x86_64 sparc powerrpc ppc64le
aarch64 arm64 arm avr mips xcore msp430 hexagon s390x wasm32 wasm64
riscv32 riscv64 m68k`
see https://github.com/llvm/llvm-project/blob/release/15.x/llvm/cmake/config-ix.cmake#L459-#L503


if use same procedure, some target will fail.


>
> Thanks,
> Ludo’.


--
over





Information forwarded to guix-patches <at> gnu.org:
bug#62438; Package guix-patches. (Sun, 11 Jun 2023 15:54:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#62438; Package guix-patches. (Thu, 07 Sep 2023 10:43:01 GMT) Full text and rfc822 format available.

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

From: iyzsong <at> envs.net
To: 62438 <at> debbugs.gnu.org
Cc: Z572 <873216071 <at> qq.com>,
 宋文武 <iyzsong <at> member.fsf.org>
Subject: [PATCH v2] gnu: llvm: Fix riscv64 cross-compilation.
Date: Thu,  7 Sep 2023 18:42:11 +0800
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>
---
 gnu/packages/llvm.scm | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index daff67f7f2..cd551f4e02 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -85,19 +85,32 @@ (define* (system->llvm-target #:optional
   "Return the LLVM target name that corresponds to SYSTEM, a system type such
 as \"x86_64-linux\"."
   ;; See the 'lib/Target' directory of LLVM for a list of supported targets.
+  (match (system->llvm-target-arch system)
+    ("RISCV64" "RISCV")
+    ("X86_64" "X86")
+    (x x)))
+
+(define* (system->llvm-target-arch #:optional
+                                   (system (or (and=> (%current-target-system)
+                                                      gnu-triplet->nix-system)
+                                               (%current-system))))
+  "Return the LLVM target arch name that corresponds to SYSTEM, a system type such
+as \"x86_64-linux\"."
+  ;; See the 'cmake/config-ix.cmake' file of LLVM for a list of supported targets arch.
+  ;; start with # Determine the native architecture.
   (letrec-syntax ((matches (syntax-rules (=>)
                              ((_ (system-prefix => target) rest ...)
                               (if (string-prefix? system-prefix system)
                                   target
                                   (matches rest ...)))
                              ((_)
-                              (error "LLVM target for system is unknown" system)))))
+                              (error "LLVM target arch for system is unknown" system)))))
     (matches ("aarch64"     => "AArch64")
              ("armhf"       => "ARM")
              ("mips64el"    => "Mips")
              ("powerpc"     => "PowerPC")
-             ("riscv"       => "RISCV")
-             ("x86_64"      => "X86")
+             ("riscv64"     => "RISCV64")
+             ("x86_64"      => "X86_64")
              ("i686"        => "X86")
              ("i586"        => "X86"))))
 
@@ -598,7 +611,7 @@ (define-public llvm-15
                    #$(string-append "-DLLVM_DEFAULT_TARGET_TRIPLE="
                                     (%current-target-system))
                    #$(string-append "-DLLVM_TARGET_ARCH="
-                                    (system->llvm-target))
+                                    (system->llvm-target-arch))
                    #$(string-append "-DLLVM_TARGETS_TO_BUILD="
                                     (system->llvm-target)))
                 '())
@@ -658,7 +671,7 @@ (define-public llvm-14
                    #$(string-append "-DLLVM_DEFAULT_TARGET_TRIPLE="
                                     (%current-target-system))
                    #$(string-append "-DLLVM_TARGET_ARCH="
-                                    (system->llvm-target))
+                                    (system->llvm-target-arch))
                    #$(string-append "-DLLVM_TARGETS_TO_BUILD="
                                     (system->llvm-target)))
                 '())
@@ -901,7 +914,7 @@ (define-public llvm-12
                       #$(string-append "-DLLVM_DEFAULT_TARGET_TRIPLE="
                                        (%current-target-system))
                       #$(string-append "-DLLVM_TARGET_ARCH="
-                                       (system->llvm-target))
+                                       (system->llvm-target-arch))
                       #$(string-append "-DLLVM_TARGETS_TO_BUILD="
                                        (system->llvm-target)))
                    #~())

base-commit: 5ef28595e9dff8b88ec3fcb4d887fbc380c9a8b8
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#62438; Package guix-patches. (Thu, 19 Oct 2023 19:57:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: iyzsong <at> envs.net
Cc: 62438 <at> debbugs.gnu.org, Z572 <873216071 <at> qq.com>,
 宋文武 <iyzsong <at> member.fsf.org>
Subject: Re: [bug#62438] [PATCH v2] gnu: llvm: Fix riscv64 cross-compilation.
Date: Thu, 19 Oct 2023 21:55:36 +0200
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!).

Thanks,
Ludo’.




Reply sent to 宋文武 <iyzsong <at> envs.net>:
You have taken responsibility. (Fri, 20 Oct 2023 09:59:02 GMT) Full text and rfc822 format available.

Notification sent to Z572 <873216071 <at> qq.com>:
bug acknowledged by developer. (Fri, 20 Oct 2023 09:59:02 GMT) Full text and rfc822 format available.

Message #34 received at 62438-done <at> debbugs.gnu.org (full text, mbox):

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!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 17 Nov 2023 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 132 days ago.

Previous Next


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