aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/dlang.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/dlang.scm')
-rw-r--r--gnu/packages/dlang.scm19
1 files changed, 6 insertions, 13 deletions
diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm
index f6b5f12a23..73a8156a40 100644
--- a/gnu/packages/dlang.scm
+++ b/gnu/packages/dlang.scm
@@ -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"