[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: How to force clang to use libc++?
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, July 1st, 2021 at 7:35 AM, Mansour Moufid <mansourmoufid%gmail.com@localhost> wrote:
> On Tue, Jun 29, 2021 at 11:46 AM hung.nguyengia
> hung.nguyengia%protonmail.com@localhost wrote:
> > I'm trying to use pkgsrc with clang as the compiler. Clang by default still uses libstdc++ as the standard library. I found I could force it to use libc++ with this line in mk.conf:
> > CXXFLAGS+= -stdlib=libc++
> Clang should default to libc++ if it is itself built with libc++.
> In lang/clang/Makefile.common remove the conditional after:
> # Enable full LLVM suite on SunOS
> You might have to rebuild clang again with itself.
Why I have to remove the conditional after that? It's about the OPSYS SunOS, I'm on Linux after all. Unless, there is something wrong that caused the unexpected behavior.
I don't know where you have this information but I think it's plain wrong. I have rolled out my own version of clang using lang/clang and of course it was built by the system's clang with the system's libc++ as standard library. It still default to use the system's libstdc++, not the system's libc++. lang/libcxx also not get installed together with lang/clang so of course it doesn't make use of it. When being told to use libc++ as standard library it used the system's libc++ even though lang/libcxx was manually installed.
Main Index |
Thread Index |