me
/
guix
Archived
1
0
Fork 0

gnu: ldc: Enable building on more architectures.

* gnu/packages/dlang.scm (ldc)[arguments]: In the custom phase
'fix-compiler-rt-library-discovery rewrite gnu-triplet->clang-arch to
pass-through unmatched architectures.
Efraim Flashner 2023-06-21 19:05:01 +03:00
parent 06ebc45e15
commit fc7db2df40
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 6 additions and 13 deletions

View File

@ -236,19 +236,12 @@ bootstrapping more recent compilers written in D.")
(system ,(or (%current-target-system)
(%current-system))))
(define (gnu-triplet->clang-arch system)
(letrec-syntax
((matches (syntax-rules (=>)
((_ (system-prefix => target) rest ...)
(if (string-prefix? system-prefix system)
target
(matches rest ...)))
((_)
(error "Clang target for system is unknown"
system)))))
(matches ("x86_64" => "x86_64")
("i686" => "i386")
("armhf" => "armhf")
("aarch64" => "aarch64"))))
(let ((system-prefix
(car (string-tokenize
system (char-set-complement (char-set #\-))))))
(cond
((equal? system-prefix "i686") "i386")
(#t system-prefix))))
;; Coax LLVM into agreeing with Clang about system target
;; naming.
(substitute* "driver/linker-gcc.cpp"