Using clang from the base system

See clang and the base system.

Using clang from pkgsrc

You can build clang from pkgsrc (lang/clang). However, it needs libstdc++ from the base system, and needs gcc 4.8 or higher. It also depends on cmake, which requires c++11, which needs gcc 4.8 or higher. So this will not work on NetBSD <= 6.

Once built, you should (\todo test this) be able to set:

PKGSRC_COMPILER=       clang
CLANGBASE=             /usr/pkg

and perhaps

HAVE_LLVM=             yes

The caveats above about using a consistent compiler apply.

Add a comment