File:  [NetBSD Developer Wiki] / wikisrc / tutorials / pkgsrc_clang.mdwn
Revision 1.2: download - view: text, annotated - select for diffs
Tue Sep 17 20:59:20 2013 UTC (7 months ago) by wiz
Branches: MAIN
CVS tags: HEAD
Suggest setting HAVE_LLVM too, so that share/mk behaves better for clang.

When building NetBSD, you can set

    MKLLVM=yes

to also build clang and install it, and additionally

    HAVE_LLVM=yes

if you want to use it to compile NetBSD itself during build.sh.

When you have a NetBSD compiled this way, you can set

    PKGSRC_COMPILER=       clang
    CLANGBASE=             /usr
    HAVE_LLVM=             yes

in your /etc/mk.conf to use it. You must do that before building
packages, especially libtool. It's usually fine to link binaries
generated from gcc to those generated with clang or vice versa.

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb