[LLVMbugs] [Bug 23691] New: clang ignores --sys-root when looking for libc++ headers

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 28 15:40:24 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23691

            Bug ID: 23691
           Summary: clang ignores --sys-root when looking for libc++
                    headers
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bero at linaro.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

When trying to cross-compile a C++ application using libc++, clang includes
libc++ headers from the system instead of the target sysroot.

For example, trying to cross-compile something that does "#include <string>"
with

clang -target x86_64-openmandriva-linux-musl -std=c++11 -stdlib=libc++ test.cpp
--sysroot=/usr/x86_64-openmandriva-linux-musl/sys-root -lc++ -lc++abi

will include
/usr/bin/../include/c++/v1/string

even if /usr/x86_64-openmandriva-linux-musl/usr/include/c++/v1/string exists.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150528/30022e14/attachment.html>


More information about the llvm-bugs mailing list