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

* gnu/packages/llvm.scm (clang-from-llvm)[arguments]: Add phase
'add-missing-triplets'.
This commit is contained in:
Marius Bakke 2020-02-26 20:59:09 +01:00
parent 5cfc6a88e9
commit f5cc5de8b6
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -208,6 +208,24 @@ (define* (clang-from-llvm llvm clang-runtime hash
#: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)