[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: gnu: clang-from-llvm: Fix libstdc++ header location search.
From: |
guix-commits |
Subject: |
01/02: gnu: clang-from-llvm: Fix libstdc++ header location search. |
Date: |
Sun, 17 Nov 2019 06:14:59 -0500 (EST) |
mothacehe pushed a commit to branch master
in repository guix.
commit 496bbeee7a0afbf1c7cbcc0de8c33c2111cb661f
Author: David Truby <address@hidden>
Date: Wed Nov 13 16:56:04 2019 +0000
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 <address@hidden>
---
gnu/packages/llvm.scm | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 33fb53d..d1b1981 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2018 Tim Gesthuizen <address@hidden>
;;; Copyright © 2018 Pierre Neidhardt <address@hidden>
;;; Copyright © 2019 Rutger Helling <address@hidden>
+;;; Copyright © 2019 David Truby <address@hidden>
;;;
;;; 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@")