diff options
author | David Truby <David.Truby@arm.com> | 2019-11-13 16:56:04 +0000 |
---|---|---|
committer | Mathieu Othacehe <m.othacehe@gmail.com> | 2019-11-17 11:25:59 +0100 |
commit | 496bbeee7a0afbf1c7cbcc0de8c33c2111cb661f (patch) | |
tree | d5edc1181cb8c2abf54691ef2bd4fa9699c7802c /gnu/packages | |
parent | cf9dad6c87bab87bc25e80b321158b0328db0d8a (diff) | |
download | guix-496bbeee7a0afbf1c7cbcc0de8c33c2111cb661f.tar.gz |
gnu: clang-from-llvm: Fix libstdc++ header location search.
Make clang use libstdc++ from gcc package. In the future, the build of clang could be parametrized to build clang with libstdc++ support or with libcxx support. * gnu/packages/llvm.scm (clang-from-llvm)[arguments]: Make clang look for libstdc++ in the right location, which is gcc c++ includes directory. Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com>
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/llvm.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 33fb53d65e..d1b1981ad6 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de> ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz> ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com> +;;; Copyright © 2019 David Truby <David.Truby@arm.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -202,6 +203,7 @@ compiler. In LLVM this library is called \"compiler-rt\".") (lambda* (#:key inputs #:allow-other-keys) (let ((libc (assoc-ref inputs "libc")) (compiler-rt (assoc-ref inputs "clang-runtime")) + (gcc (assoc-ref inputs "gcc")) (version (string->number ,(version-major (package-version clang-runtime))))) @@ -218,6 +220,12 @@ compiler. In LLVM this library is called \"compiler-rt\".") (("(^[[:blank:]]+LibDir = ).*" _ declaration) (string-append declaration "\"" libc "/lib\";\n")) + ;; Make clang look for libstdc++ in the right + ;; location. + (("LibStdCXXIncludePathCandidates\\[\\] = \\{") + (string-append + "LibStdCXXIncludePathCandidates[] = { \"" gcc "/include/c++\",")) + ;; Make sure libc's libdir is on the search path, to ;; allow crt1.o & co. to be found. (("@GLIBC_LIBDIR@") |