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