[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#62438] [PATCH] gnu: llvm: fix riscv64 cross-compile.
From: |
Ludovic Courtès |
Subject: |
[bug#62438] [PATCH] gnu: llvm: fix riscv64 cross-compile. |
Date: |
Fri, 09 Jun 2023 23:12:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi,
Z572 <873216071@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’.
- [bug#62438] [PATCH] gnu: llvm: fix riscv64 cross-compile.,
Ludovic Courtès <=