guix-commits
[Top][All Lists]
Advanced

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

06/13: gnu: clang: Fix C++ search path handling on non-x86_64.


From: guix-commits
Subject: 06/13: gnu: clang: Fix C++ search path handling on non-x86_64.
Date: Wed, 26 Feb 2020 15:57:38 -0500 (EST)

mbakke pushed a commit to branch master
in repository guix.

commit f5cc5de8b6c542295b08c108d9a6f1ca52cdc37a
Author: Marius Bakke <address@hidden>
AuthorDate: Wed Feb 26 20:59:09 2020 +0100

    gnu: clang: Fix C++ search path handling on non-x86_64.
    
    * gnu/packages/llvm.scm (clang-from-llvm)[arguments]: Add phase
    'add-missing-triplets'.
---
 gnu/packages/llvm.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 38f2118..4a1a123 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -208,6 +208,24 @@ compiler.  In LLVM this library is called 
\"compiler-rt\".")
        #:build-type "Release"
 
        #:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'add-missing-triplets
+                    (lambda _
+                      ;; Clang iterates through known triplets to search for
+                      ;; GCC's headers, but does not recognize some of the
+                      ;; triplets that are used in Guix.
+                      (substitute* ,@(if (version>=? version "6.0")
+                                         '("lib/Driver/ToolChains/Gnu.cpp")
+                                         '("lib/Driver/ToolChains.cpp"))
+                        (("\"aarch64-linux-gnu\"," all)
+                         (string-append "\"aarch64-unknown-linux-gnu\", "
+                                        all))
+                        (("\"arm-linux-gnueabihf\"," all)
+                         (string-append all
+                                        " \"arm-unknown-linux-gnueabihf\","))
+                        (("\"i686-pc-linux-gnu\"," all)
+                         (string-append "\"i686-unknown-linux-gnu\", "
+                                        all)))
+                      #t))
                   (add-after
                    'unpack 'set-glibc-file-names
                    (lambda* (#:key inputs #:allow-other-keys)



reply via email to

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