pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to force clang to use libc++?



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.


Home | Main Index | Thread Index | Old Index