aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/llvm.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-02-26 20:59:09 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-02-26 21:52:47 +0100
commitf5cc5de8b6c542295b08c108d9a6f1ca52cdc37a (patch)
tree06a36dcde3479454ce35a212805f2a0309ac6519 /gnu/packages/llvm.scm
parent5cfc6a88e9fbb9f34855ebd43264266b0201ce50 (diff)
downloadguix-f5cc5de8b6c542295b08c108d9a6f1ca52cdc37a.tar
guix-f5cc5de8b6c542295b08c108d9a6f1ca52cdc37a.tar.gz
gnu: clang: Fix C++ search path handling on non-x86_64.
* gnu/packages/llvm.scm (clang-from-llvm)[arguments]: Add phase 'add-missing-triplets'.
Diffstat (limited to 'gnu/packages/llvm.scm')
-rw-r--r--gnu/packages/llvm.scm18
1 files changed, 18 insertions, 0 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 38f2118173..4a1a1239d7 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)