guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: clang-from-llvm: Fix set-glibc-file-names phase.


From: guix-commits
Subject: 01/01: gnu: clang-from-llvm: Fix set-glibc-file-names phase.
Date: Tue, 12 Nov 2019 13:44:11 -0500 (EST)

carl pushed a commit to branch master
in repository guix.

commit 07c07de3ab669ae7307424c646c4061d25ee6b86
Author: Mathieu Othacehe <address@hidden>
Date:   Thu Oct 31 15:05:54 2019 +0100

    gnu: clang-from-llvm: Fix set-glibc-file-names phase.
    
    * gnu/packages/llvm.scm (clang-from-llvm)[arguments]: Turn case on major
    version into a cond, so that newer versions of clang have the same 
behaviour as
    version 6 and 7.
    
    Signed-off-by: Carl Dong <address@hidden>
---
 gnu/packages/llvm.scm | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 33a72cf..33fb53d 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -201,10 +201,12 @@ compiler.  In LLVM this library is called 
\"compiler-rt\".")
                    'unpack 'set-glibc-file-names
                    (lambda* (#:key inputs #:allow-other-keys)
                      (let ((libc (assoc-ref inputs "libc"))
-                           (compiler-rt (assoc-ref inputs "clang-runtime")))
-                       (case (string->number ,(version-major
-                                               (package-version 
clang-runtime)))
-                         ((or 6 7)
+                           (compiler-rt (assoc-ref inputs "clang-runtime"))
+                           (version
+                            (string->number
+                             ,(version-major (package-version 
clang-runtime)))))
+                       (cond
+                         ((> version 3)
                           ;; Link to libclang_rt files from clang-runtime.
                           (substitute* "lib/Driver/ToolChain.cpp"
                             (("getDriver\\(\\)\\.ResourceDir")
@@ -220,7 +222,7 @@ compiler.  In LLVM this library is called \"compiler-rt\".")
                             ;; allow crt1.o & co. to be found.
                             (("@GLIBC_LIBDIR@")
                              (string-append libc "/lib"))))
-                         ((3)
+                         (else
                           (substitute* "lib/Driver/Tools.cpp"
                             ;; Patch the 'getLinuxDynamicLinker' function so 
that
                             ;; it uses the right dynamic linker file name.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]