gnu: clang: Only install cfi_blacklist.txt for versions >= 3.8.
Fixes <https://bugs.gnu.org/42599>.
Reported by Malte Frank Gerdes <malte.f.gerdes@gmail.com>.
This is a follow-up to commit 300b795520
.
* gnu/packages/llvm.scm (clang-from-llvm): Guard the 'symlink-cfi_blacklist'
phase with a version check, as it first appears in Clang 3.8.
master
parent
ebf3960673
commit
0d3063f4bc
|
@ -388,7 +388,8 @@ given PATCHES. When TOOLS-EXTRA is given, it must point to the
|
||||||
(("@GLIBC_LIBDIR@")
|
(("@GLIBC_LIBDIR@")
|
||||||
(string-append libc "/lib"))))))
|
(string-append libc "/lib"))))))
|
||||||
#t)))
|
#t)))
|
||||||
(add-after 'install 'symlink-cfi_blacklist
|
,@(if (version>? version "3.8")
|
||||||
|
`((add-after 'install 'symlink-cfi_blacklist
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(lib-share (string-append out "/lib/clang/"
|
(lib-share (string-append out "/lib/clang/"
|
||||||
|
@ -396,7 +397,8 @@ given PATCHES. When TOOLS-EXTRA is given, it must point to the
|
||||||
(compiler-rt (assoc-ref inputs "clang-runtime"))
|
(compiler-rt (assoc-ref inputs "clang-runtime"))
|
||||||
;; The location varies between Clang versions.
|
;; The location varies between Clang versions.
|
||||||
(cfi-blacklist
|
(cfi-blacklist
|
||||||
(cond ((file-exists?
|
(cond
|
||||||
|
((file-exists?
|
||||||
(string-append compiler-rt "/cfi_blacklist.txt"))
|
(string-append compiler-rt "/cfi_blacklist.txt"))
|
||||||
(string-append compiler-rt "/cfi_blacklist.txt"))
|
(string-append compiler-rt "/cfi_blacklist.txt"))
|
||||||
(else (string-append compiler-rt
|
(else (string-append compiler-rt
|
||||||
|
@ -406,7 +408,8 @@ given PATCHES. When TOOLS-EXTRA is given, it must point to the
|
||||||
;; to find it.
|
;; to find it.
|
||||||
(symlink cfi-blacklist
|
(symlink cfi-blacklist
|
||||||
(string-append lib-share "/cfi_blacklist.txt"))
|
(string-append lib-share "/cfi_blacklist.txt"))
|
||||||
#t)))
|
#t))))
|
||||||
|
'())
|
||||||
(add-after 'install 'install-clean-up-/share/clang
|
(add-after 'install 'install-clean-up-/share/clang
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
|
Reference in New Issue