1: This page explains how to use clang with the NetBSD base system.
2: See also [how to use clang to build packages](../pkgsrc/clang/).
4: Since NetBSD 6, the base system has included clang, but it is not
5: built or used by default. To use it, set in mk.conf
12: And run "build.sh release". This will apply for both pkgsrc and base.
14: This will work on ARM, PowerPC, x86, and possibly SPARC64.
16: # Explanation
18: MKGCC=no | needed as building GCC alongside is not maintained.
19: MKLLVM=yes | builds LLVM libraries.
20: HAVE_LLVM=yes | controls clang being built
21: CLANGBASE=/usr | instructs pkgsrc where to look for the compiler
23: # status
25: On NetBSD-current, clang builds successfully on several architectures.
26: These builds are with all three of the above flags enabled.
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb