GNU bug report logs - #32773
clang: missing default include paths for C++

Previous Next

Package: guix;

Reported by: Tim Gesthuizen <tim.gesthuizen <at> yahoo.de>

Date: Wed, 19 Sep 2018 18:24:02 UTC

Severity: normal

Done: Mathieu Othacehe <m.othacehe <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: David Truby <David.Truby <at> arm.com>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Cc: nd <nd <at> arm.com>, David Truby <David.Truby <at> arm.com>
Subject: [bug#32773] [PATCH] Fix clang libstdc++ header location search
Date: Wed, 13 Nov 2019 16:56:04 +0000
---
 gnu/packages/llvm.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 33fb53d65e..0a7efe980f 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -202,6 +202,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 +219,10 @@ 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@")
-- 
2.24.0





This bug report was last modified 5 years and 242 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.