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
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’.
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.