Annotation of wikisrc/tutorials/clang.mdwn, revision 1.6

1.3       wiz         1: This page explains how to use clang with the NetBSD base system.
1.2       gdt         2: See also [how to use clang to build packages](../pkgsrc/clang/).
1.1       gdt         3: 
                      4: Since NetBSD 6, the base system has included clang, but it is not
1.5       maya        5: built or used by default. To use it, set in mk.conf
1.1       gdt         6: 
1.5       maya        7:     MKGCC=no
1.1       gdt         8:     MKLLVM=yes
                      9:     HAVE_LLVM=yes
1.5       maya       10:     CLANGBASE=/usr
1.1       gdt        11: 
1.5       maya       12: And run "build.sh release". This will apply for both pkgsrc and base.
1.1       gdt        13: 
1.5       maya       14: This will work on ARM, PowerPC, x86, and possibly SPARC64.
1.1       gdt        15: 
1.6     ! maya       16: # Explanation
        !            17: 
        !            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
1.4       gdt        22: 
                     23: # status
                     24: 
                     25: On NetBSD-current, clang builds successfully on several architectures.
                     26: These builds are with all three of the above flags enabled.
                     27: 
                     28: https://releng.netbsd.org/builds/HEAD-llvm/

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