this works on amd64.  maya@ did most of the work here too.
more clean up and review needed before commit.

i386 crashes.  pax has issues with libGL.so itself, and then
glxgears crashesh.

i want to convert MKCLANG=no into MKLLVMCMDS=no, and have the
latter set to yes by default if MKLLVM=yes, to match the way
MKGCCCMDS works.


Index: distrib/sets/lists/comp/md.amd64
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/comp/md.amd64,v
retrieving revision 1.269
diff -p -u -r1.269 md.amd64
--- distrib/sets/lists/comp/md.amd64	14 Feb 2019 20:42:40 -0000	1.269
+++ distrib/sets/lists/comp/md.amd64	15 Mar 2019 08:38:55 -0000
@@ -332,85 +332,85 @@
 ./usr/include/clang-5.0/xsaveoptintrin.h	comp-obsolete		obsolete
 ./usr/include/clang-5.0/xsavesintrin.h		comp-obsolete		obsolete
 ./usr/include/clang-5.0/xtestintrin.h		comp-obsolete		obsolete
-./usr/include/clang-7.0/__wmmintrin_aes.h	comp-c-include		llvm
-./usr/include/clang-7.0/__wmmintrin_pclmul.h	comp-c-include		llvm
-./usr/include/clang-7.0/adxintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/ammintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/avx2intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/avx512bitalgintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512bwintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512cdintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512dqintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512erintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512fintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/avx512ifmaintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512ifmavlintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512pfintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vbmi2intrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vbmiintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vbmivlintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlbitalgintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlbwintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlcdintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vldqintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlvbmi2intrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlvnniintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vnniintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vpopcntdqintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vpopcntdqvlintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avxintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/bmi2intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/bmiintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/cetintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/cldemoteintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/clflushoptintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/clwbintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/clzerointrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/cpuid.h			comp-c-include		llvm
-./usr/include/clang-7.0/emmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/f16cintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/fma4intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/fmaintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/fxsrintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/gfniintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/ia32intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/immintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/invpcidintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/lwpintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/lzcntintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/mm3dnow.h		comp-c-include		llvm
-./usr/include/clang-7.0/mm_malloc.h		comp-c-include		llvm
-./usr/include/clang-7.0/mmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/movdirintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/mwaitxintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/nmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/pconfigintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/pkuintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/pmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/popcntintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/prfchwintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/ptwriteintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/rdseedintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/rtmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/sgxintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/shaintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/smmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/tbmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/tmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/vaesintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/vpclmulqdqintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/waitpkgintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/wbnoinvdintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/wmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/x86intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xopintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xsavecintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xsaveintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xsaveoptintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/xsavesintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xtestintrin.h		comp-c-include		llvm
+./usr/include/clang-7.0/__wmmintrin_aes.h	comp-c-include		clang
+./usr/include/clang-7.0/__wmmintrin_pclmul.h	comp-c-include		clang
+./usr/include/clang-7.0/adxintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/ammintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/avx2intrin.h		comp-c-include		clang
+./usr/include/clang-7.0/avx512bitalgintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512bwintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512cdintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512dqintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512erintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512fintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/avx512ifmaintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512ifmavlintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512pfintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vbmi2intrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vbmiintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vbmivlintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vlbitalgintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vlbwintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vlcdintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vldqintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vlintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vlvbmi2intrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vlvnniintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vnniintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vpopcntdqintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vpopcntdqvlintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avxintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/bmi2intrin.h		comp-c-include		clang
+./usr/include/clang-7.0/bmiintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/cetintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/cldemoteintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/clflushoptintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/clwbintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/clzerointrin.h		comp-c-include		clang
+./usr/include/clang-7.0/cpuid.h			comp-c-include		clang
+./usr/include/clang-7.0/emmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/f16cintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/fma4intrin.h		comp-c-include		clang
+./usr/include/clang-7.0/fmaintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/fxsrintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/gfniintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/ia32intrin.h		comp-c-include		clang
+./usr/include/clang-7.0/immintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/invpcidintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/lwpintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/lzcntintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/mm3dnow.h		comp-c-include		clang
+./usr/include/clang-7.0/mm_malloc.h		comp-c-include		clang
+./usr/include/clang-7.0/mmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/movdirintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/mwaitxintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/nmmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/pconfigintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/pkuintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/pmmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/popcntintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/prfchwintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/ptwriteintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/rdseedintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/rtmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/sgxintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/shaintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/smmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/tbmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/tmmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/vaesintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/vpclmulqdqintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/waitpkgintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/wbnoinvdintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/wmmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/x86intrin.h		comp-c-include		clang
+./usr/include/clang-7.0/xmmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/xopintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/xsavecintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/xsaveintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/xsaveoptintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/xsavesintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/xtestintrin.h		comp-c-include		clang
 ./usr/include/dev/nvmm				comp-c-include
 ./usr/include/dev/nvmm/nvmm.h			comp-c-include
 ./usr/include/dev/nvmm/nvmm_ioctl.h		comp-c-include
Index: distrib/sets/lists/comp/md.i386
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/comp/md.i386,v
retrieving revision 1.185
diff -p -u -r1.185 md.i386
--- distrib/sets/lists/comp/md.i386	2 Feb 2019 22:39:32 -0000	1.185
+++ distrib/sets/lists/comp/md.i386	15 Mar 2019 08:38:55 -0000
@@ -261,85 +261,85 @@
 ./usr/include/clang-5.0/xsaveoptintrin.h	comp-obsolete		obsolete
 ./usr/include/clang-5.0/xsavesintrin.h		comp-obsolete		obsolete
 ./usr/include/clang-5.0/xtestintrin.h		comp-obsolete		obsolete
-./usr/include/clang-7.0/adxintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/ammintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/avx2intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/avx512bitalgintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512bwintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512cdintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512dqintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512erintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512fintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/avx512ifmaintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512ifmavlintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512pfintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vbmi2intrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vbmiintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vbmivlintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlbitalgintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlbwintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlcdintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vldqintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlvbmi2intrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vlvnniintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vnniintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vpopcntdqintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avx512vpopcntdqvlintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/avxintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/bmi2intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/bmiintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/cetintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/cldemoteintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/clflushoptintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/clwbintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/clzerointrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/cpuid.h			comp-c-include		llvm
-./usr/include/clang-7.0/emmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/f16cintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/fma4intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/fmaintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/fxsrintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/gfniintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/ia32intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/immintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/invpcidintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/lwpintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/lzcntintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/mm3dnow.h		comp-c-include		llvm
-./usr/include/clang-7.0/mmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/mm_malloc.h		comp-c-include		llvm
-./usr/include/clang-7.0/movdirintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/mwaitxintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/nmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/pconfigintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/pkuintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/pmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/popcntintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/prfchwintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/ptwriteintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/rdseedintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/rtmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/sgxintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/shaintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/smmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/tbmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/tmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/vaesintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/vpclmulqdqintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/waitpkgintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/wbnoinvdintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/__wmmintrin_aes.h	comp-c-include		llvm
-./usr/include/clang-7.0/wmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/__wmmintrin_pclmul.h	comp-c-include		llvm
-./usr/include/clang-7.0/x86intrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xmmintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xopintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xsavecintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xsaveintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xsaveoptintrin.h	comp-c-include		llvm
-./usr/include/clang-7.0/xsavesintrin.h		comp-c-include		llvm
-./usr/include/clang-7.0/xtestintrin.h		comp-c-include		llvm
+./usr/include/clang-7.0/adxintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/ammintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/avx2intrin.h		comp-c-include		clang
+./usr/include/clang-7.0/avx512bitalgintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512bwintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512cdintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512dqintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512erintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512fintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/avx512ifmaintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512ifmavlintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512pfintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vbmi2intrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vbmiintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vbmivlintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vlbitalgintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vlbwintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vlcdintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vldqintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vlintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vlvbmi2intrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vlvnniintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vnniintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vpopcntdqintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avx512vpopcntdqvlintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/avxintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/bmi2intrin.h		comp-c-include		clang
+./usr/include/clang-7.0/bmiintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/cetintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/cldemoteintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/clflushoptintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/clwbintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/clzerointrin.h		comp-c-include		clang
+./usr/include/clang-7.0/cpuid.h			comp-c-include		clang
+./usr/include/clang-7.0/emmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/f16cintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/fma4intrin.h		comp-c-include		clang
+./usr/include/clang-7.0/fmaintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/fxsrintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/gfniintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/ia32intrin.h		comp-c-include		clang
+./usr/include/clang-7.0/immintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/invpcidintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/lwpintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/lzcntintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/mm3dnow.h		comp-c-include		clang
+./usr/include/clang-7.0/mmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/mm_malloc.h		comp-c-include		clang
+./usr/include/clang-7.0/movdirintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/mwaitxintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/nmmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/pconfigintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/pkuintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/pmmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/popcntintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/prfchwintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/ptwriteintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/rdseedintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/rtmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/sgxintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/shaintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/smmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/tbmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/tmmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/vaesintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/vpclmulqdqintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/waitpkgintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/wbnoinvdintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/__wmmintrin_aes.h	comp-c-include		clang
+./usr/include/clang-7.0/wmmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/__wmmintrin_pclmul.h	comp-c-include		clang
+./usr/include/clang-7.0/x86intrin.h		comp-c-include		clang
+./usr/include/clang-7.0/xmmintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/xopintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/xsavecintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/xsaveintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/xsaveoptintrin.h	comp-c-include		clang
+./usr/include/clang-7.0/xsavesintrin.h		comp-c-include		clang
+./usr/include/clang-7.0/xtestintrin.h		comp-c-include		clang
 ./usr/include/emmintrin.h			comp-obsolete		obsolete
 ./usr/include/gcc-4.1/emmintrin.h		comp-obsolete		obsolete
 ./usr/include/gcc-4.1/mm_malloc.h		comp-obsolete		obsolete
Index: distrib/sets/lists/comp/mi
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/comp/mi,v
retrieving revision 1.2263
diff -p -u -r1.2263 mi
--- distrib/sets/lists/comp/mi	12 Mar 2019 23:51:40 -0000	1.2263
+++ distrib/sets/lists/comp/mi	15 Mar 2019 08:38:55 -0000
@@ -13,10 +13,10 @@
 ./usr/bin/c89					comp-c-bin
 ./usr/bin/c99					comp-c-bin
 ./usr/bin/cc					comp-c-bin		gcccmds
-./usr/bin/clang					comp-c-bin		llvm
-./usr/bin/clang++				comp-c-bin		llvm
-./usr/bin/clang-cpp				comp-c-bin		llvm
-./usr/bin/clang-tblgen				comp-c-bin		llvm
+./usr/bin/clang					comp-c-bin		clang
+./usr/bin/clang++				comp-c-bin		clang
+./usr/bin/clang-cpp				comp-c-bin		clang
+./usr/bin/clang-tblgen				comp-c-bin		clang
 ./usr/bin/config				comp-util-bin
 ./usr/bin/crunchgen				comp-c-bin
 ./usr/bin/crunchide				comp-c-bin
@@ -364,7 +364,7 @@
 ./usr/include/clang-4.0/stdatomic.h		comp-obsolete		obsolete
 ./usr/include/clang-4.0/stdnoreturn.h		comp-obsolete		obsolete
 ./usr/include/clang-5.0/stdatomic.h		comp-obsolete		obsolete
-./usr/include/clang-7.0/stdatomic.h		comp-c-include		llvm
+./usr/include/clang-7.0/stdatomic.h		comp-c-include		clang
 ./usr/include/complex.h				comp-c-include
 ./usr/include/cpio.h				comp-c-include
 ./usr/include/crypto/cryptodev.h		comp-c-include
Index: distrib/sets/lists/debug/mi
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/debug/mi,v
retrieving revision 1.279
diff -p -u -r1.279 mi
--- distrib/sets/lists/debug/mi	12 Mar 2019 15:10:44 -0000	1.279
+++ distrib/sets/lists/debug/mi	15 Mar 2019 08:38:55 -0000
@@ -487,8 +487,8 @@
 ./usr/libdata/debug/usr/bin/chpass.debug	comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/ci.debug		comp-rcs-debug		debug
 ./usr/libdata/debug/usr/bin/cksum.debug		comp-util-debug		debug
-./usr/libdata/debug/usr/bin/clang-tblgen.debug	comp-c-debug		llvm,debug
-./usr/libdata/debug/usr/bin/clang.debug		comp-c-debug		llvm,debug
+./usr/libdata/debug/usr/bin/clang-tblgen.debug	comp-c-debug		clang,debug
+./usr/libdata/debug/usr/bin/clang.debug		comp-c-debug		clang,debug
 ./usr/libdata/debug/usr/bin/cmp.debug		comp-util-debug		debug
 ./usr/libdata/debug/usr/bin/co.debug		comp-rcs-debug		debug
 ./usr/libdata/debug/usr/bin/col.debug		comp-util-debug		debug
Index: external/bsd/llvm/Makefile.inc
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/Makefile.inc,v
retrieving revision 1.86
diff -p -u -r1.86 Makefile.inc
--- external/bsd/llvm/Makefile.inc	17 Jul 2018 18:55:24 -0000	1.86
+++ external/bsd/llvm/Makefile.inc	15 Mar 2019 08:38:56 -0000
@@ -69,7 +69,7 @@ CPPFLAGS+=	-I${LLVM_INCLUDE_OBJDIR} -I${
 LLVM_PLATFORM=${MACHINE_GNU_ARCH}--netbsd
 
 LLVM_CONFIGURE_ARGS=	\
-	--enable-targets=x86,powerpc,sparc,aarch64,arm,mips \
+	--enable-targets=x86,powerpc,sparc,aarch64,arm,mips,amdgpu \
 	--with-c-include-dirs=/usr/include/clang-${CLANG_VERSION:R}:/usr/include \
 	--disable-timestamps --prefix=/usr --sysconfdir=/etc/llvm \
 	--with-clang-default-openmp-runtime=libomp \
Index: external/bsd/llvm/bin/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/bin/Makefile,v
retrieving revision 1.17
diff -p -u -r1.17 Makefile
--- external/bsd/llvm/bin/Makefile	1 Aug 2017 20:07:37 -0000	1.17
+++ external/bsd/llvm/bin/Makefile	15 Mar 2019 08:38:56 -0000
@@ -2,9 +2,13 @@
 
 .include <bsd.own.mk>
 
-SUBDIR=	clang \
-	clang-tblgen \
-	tblgen
+SUBDIR=	tblgen
+
+.if ${MKCLANG} != "no"
+SUBDIR+=	\
+	clang	\
+	clang-tblgen
+.endif
 
 .if ${MKLLD} != "no"
 SUBDIR+=	\
Index: external/bsd/llvm/bin/bugpoint/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/bin/bugpoint/Makefile,v
retrieving revision 1.12
diff -p -u -r1.12 Makefile
--- external/bsd/llvm/bin/bugpoint/Makefile	17 Jul 2018 18:55:25 -0000	1.12
+++ external/bsd/llvm/bin/bugpoint/Makefile	15 Mar 2019 08:38:56 -0000
@@ -25,6 +25,12 @@ LLVM_LIBS+= \
 	AsmParser \
 	BitReader \
 	BitWriter \
+	AMDGPUAsmParser \
+	AMDGPUCodeGen \
+	AMDGPUMCTargetDesc \
+	AMDGPUTargetInfo \
+	AMDGPUAsmPrinter \
+	AMDGPUUtils \
 	AArch64CodeGen \
 	AArch64TargetInfo \
 	AArch64AsmParser \
Index: external/bsd/llvm/bin/clang/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/bin/clang/Makefile,v
retrieving revision 1.37
diff -p -u -r1.37 Makefile
--- external/bsd/llvm/bin/clang/Makefile	17 Jul 2018 18:55:25 -0000	1.37
+++ external/bsd/llvm/bin/clang/Makefile	15 Mar 2019 08:38:56 -0000
@@ -53,6 +53,12 @@ LLVM_LIBS+= \
 	AsmParser \
 	BitReader \
 	BitWriter \
+	AMDGPUAsmParser \
+	AMDGPUCodeGen \
+	AMDGPUMCTargetDesc \
+	AMDGPUTargetInfo \
+	AMDGPUAsmPrinter \
+	AMDGPUUtils \
 	AArch64CodeGen \
 	AArch64TargetInfo \
 	AArch64AsmParser \
Index: external/bsd/llvm/bin/llc/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/bin/llc/Makefile,v
retrieving revision 1.25
diff -p -u -r1.25 Makefile
--- external/bsd/llvm/bin/llc/Makefile	17 Jul 2018 18:55:25 -0000	1.25
+++ external/bsd/llvm/bin/llc/Makefile	15 Mar 2019 08:38:56 -0000
@@ -18,6 +18,12 @@ LLVM_LIBS+= \
 	IRReader \
 	AsmParser \
 	BitReader \
+	AMDGPUAsmParser \
+	AMDGPUCodeGen \
+	AMDGPUMCTargetDesc \
+	AMDGPUTargetInfo \
+	AMDGPUAsmPrinter \
+	AMDGPUUtils \
 	AArch64CodeGen \
 	AArch64TargetInfo \
 	AArch64AsmParser \
@@ -59,6 +65,7 @@ LLVM_LIBS+= \
 	ProfileData \
 	Instrumentation \
 	ScalarOpts \
+	ipo \
 	TransformsUtils \
 	Analysis \
 	Target \
Index: external/bsd/llvm/bin/lldb/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/bin/lldb/Makefile,v
retrieving revision 1.7
diff -p -u -r1.7 Makefile
--- external/bsd/llvm/bin/lldb/Makefile	17 Jul 2018 18:55:25 -0000	1.7
+++ external/bsd/llvm/bin/lldb/Makefile	15 Mar 2019 08:38:56 -0000
@@ -92,6 +92,13 @@ LLVM_LIBS+= \
 	IRReader \
 	AsmParser \
 	MCDisassembler \
+	AMDGPUAsmParser \
+	AMDGPUCodeGen \
+	AMDGPUDisassembler \
+	AMDGPUMCTargetDesc \
+	AMDGPUTargetInfo \
+	AMDGPUAsmPrinter \
+	AMDGPUUtils \
 	AArch64CodeGen \
 	AArch64TargetInfo \
 	AArch64AsmParser \
Index: external/bsd/llvm/bin/llvm-ar/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/bin/llvm-ar/Makefile,v
retrieving revision 1.11
diff -p -u -r1.11 Makefile
--- external/bsd/llvm/bin/llvm-ar/Makefile	17 Jul 2018 18:55:25 -0000	1.11
+++ external/bsd/llvm/bin/llvm-ar/Makefile	15 Mar 2019 08:38:56 -0000
@@ -12,6 +12,13 @@ SRCS=	llvm-ar.cpp
 LLVM_LIBS+= \
 	ToolDriversDlltool \
 	ToolDrivers \
+	AMDGPUAsmParser \
+	AMDGPUCodeGen \
+	AMDGPUDisassembler \
+	AMDGPUMCTargetDesc \
+	AMDGPUTargetInfo \
+	AMDGPUAsmPrinter \
+	AMDGPUUtils \
 	AArch64AsmParser \
 	AArch64MCTargetDesc \
 	AArch64AsmPrinter \
Index: external/bsd/llvm/bin/llvm-cxxdump/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/bin/llvm-cxxdump/Makefile,v
retrieving revision 1.3
diff -p -u -r1.3 Makefile
--- external/bsd/llvm/bin/llvm-cxxdump/Makefile	1 Aug 2017 20:07:38 -0000	1.3
+++ external/bsd/llvm/bin/llvm-cxxdump/Makefile	15 Mar 2019 08:38:56 -0000
@@ -11,6 +11,7 @@ SRCS=	llvm-cxxdump.cpp \
 	Error.cpp
 
 LLVM_LIBS+= \
+	AMDGPUTargetInfo \
 	ARMTargetInfo \
 	AArch64TargetInfo \
 	MipsTargetInfo \
Index: external/bsd/llvm/bin/llvm-dwarfdump/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/bin/llvm-dwarfdump/Makefile,v
retrieving revision 1.6
diff -p -u -r1.6 Makefile
--- external/bsd/llvm/bin/llvm-dwarfdump/Makefile	17 Jul 2018 18:55:25 -0000	1.6
+++ external/bsd/llvm/bin/llvm-dwarfdump/Makefile	15 Mar 2019 08:38:56 -0000
@@ -11,6 +11,10 @@ SRCS=	Statistics.cpp \
 	llvm-dwarfdump.cpp
 
 LLVM_LIBS+= \
+	AMDGPUTargetInfo \
+	AMDGPUMCTargetDesc \
+	AMDGPUAsmPrinter \
+	AMDGPUUtils \
 	AArch64TargetInfo \
 	AArch64MCTargetDesc \
 	AArch64AsmPrinter \
Index: external/bsd/llvm/bin/llvm-dwp/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/bin/llvm-dwp/Makefile,v
retrieving revision 1.4
diff -p -u -r1.4 Makefile
--- external/bsd/llvm/bin/llvm-dwp/Makefile	17 Jul 2018 18:55:25 -0000	1.4
+++ external/bsd/llvm/bin/llvm-dwp/Makefile	15 Mar 2019 08:38:56 -0000
@@ -12,6 +12,11 @@ SRCS=	DWPError.cpp \
 
 LLVM_LIBS+= \
 	DebugInfoDWARF \
+	AMDGPUCodeGen \
+	AMDGPUTargetInfo \
+	AMDGPUMCTargetDesc \
+	AMDGPUAsmPrinter \
+	AMDGPUUtils \
 	AArch64CodeGen \
 	AArch64TargetInfo \
 	AArch64MCTargetDesc \
@@ -49,11 +54,13 @@ LLVM_LIBS+= \
 	SelectionDAG \
 	CodeGen \
 	ProfileData \
+	Vectorize \
 	Target \
 	InstCombine \
 	Instrumentation \
 	ScalarOpts \
 	MC \
+	ipo \
 	TransformsUtils \
 	Analysis \
 	IR \
Index: external/bsd/llvm/bin/llvm-mc/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/bin/llvm-mc/Makefile,v
retrieving revision 1.23
diff -p -u -r1.23 Makefile
--- external/bsd/llvm/bin/llvm-mc/Makefile	17 Jul 2018 18:55:26 -0000	1.23
+++ external/bsd/llvm/bin/llvm-mc/Makefile	15 Mar 2019 08:38:56 -0000
@@ -12,6 +12,13 @@ SRCS=	llvm-mc.cpp \
 
 LLVM_LIBS+= \
 	MCDisassembler \
+	AMDGPUAsmParser \
+	AMDGPUCodeGen \
+	AMDGPUDisassembler \
+	AMDGPUMCTargetDesc \
+	AMDGPUTargetInfo \
+	AMDGPUAsmPrinter \
+	AMDGPUUtils \
 	AArch64CodeGen \
 	AArch64TargetInfo \
 	AArch64AsmParser \
Index: external/bsd/llvm/bin/llvm-mcld/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/bin/llvm-mcld/Makefile,v
retrieving revision 1.2
diff -p -u -r1.2 Makefile
--- external/bsd/llvm/bin/llvm-mcld/Makefile	11 Jan 2017 12:02:27 -0000	1.2
+++ external/bsd/llvm/bin/llvm-mcld/Makefile	15 Mar 2019 08:38:56 -0000
@@ -29,6 +29,12 @@ MCLINKER_LIBS+= \
 LLVM_LIBS+= \
 	AsmParser \
 	BitReader \
+	AMDGPUAsmParser \
+	AMDGPUCodeGen \
+	AMDGPUMCTargetDesc \
+	AMDGPUTargetInfo \
+	AMDGPUAsmPrinter \
+	AMDGPUUtils \
 	AArch64CodeGen \
 	AArch64TargetInfo \
 	AArch64AsmParser \
Index: external/bsd/llvm/bin/llvm-nm/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/bin/llvm-nm/Makefile,v
retrieving revision 1.8
diff -p -u -r1.8 Makefile
--- external/bsd/llvm/bin/llvm-nm/Makefile	17 Jul 2018 18:55:26 -0000	1.8
+++ external/bsd/llvm/bin/llvm-nm/Makefile	15 Mar 2019 08:38:56 -0000
@@ -10,6 +10,12 @@ NOMAN=		yes
 SRCS=	llvm-nm.cpp
 
 LLVM_LIBS+= \
+	AMDGPUAsmParser \
+	AMDGPUCodeGen \
+	AMDGPUMCTargetDesc \
+	AMDGPUTargetInfo \
+	AMDGPUAsmPrinter \
+	AMDGPUUtils \
 	AArch64AsmParser \
 	AArch64MCTargetDesc \
 	AArch64AsmPrinter \
Index: external/bsd/llvm/bin/llvm-objdump/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/bin/llvm-objdump/Makefile,v
retrieving revision 1.15
diff -p -u -r1.15 Makefile
--- external/bsd/llvm/bin/llvm-objdump/Makefile	17 Jul 2018 18:55:26 -0000	1.15
+++ external/bsd/llvm/bin/llvm-objdump/Makefile	15 Mar 2019 08:38:56 -0000
@@ -14,6 +14,12 @@ SRCS=	llvm-objdump.cpp \
 	WasmDump.cpp
 
 LLVM_LIBS+= \
+	AMDGPUAsmParser \
+	AMDGPUDisassembler \
+	AMDGPUMCTargetDesc \
+	AMDGPUTargetInfo \
+	AMDGPUAsmPrinter \
+	AMDGPUUtils \
 	AArch64Disassembler \
 	AArch64AsmParser \
 	AArch64MCTargetDesc \
Index: external/bsd/llvm/bin/opt/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/bin/opt/Makefile,v
retrieving revision 1.19
diff -p -u -r1.19 Makefile
--- external/bsd/llvm/bin/opt/Makefile	17 Jul 2018 18:55:26 -0000	1.19
+++ external/bsd/llvm/bin/opt/Makefile	15 Mar 2019 08:38:56 -0000
@@ -27,6 +27,12 @@ LLVM_LIBS+= \
 	AsmParser \
 	BitReader \
 	BitWriter \
+	AMDGPUAsmParser \
+	AMDGPUCodeGen \
+	AMDGPUMCTargetDesc \
+	AMDGPUTargetInfo \
+	AMDGPUAsmPrinter \
+	AMDGPUUtils \
 	AArch64CodeGen \
 	AArch64TargetInfo \
 	AArch64AsmParser \
Index: external/bsd/llvm/bin/sancov/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/bin/sancov/Makefile,v
retrieving revision 1.4
diff -p -u -r1.4 Makefile
--- external/bsd/llvm/bin/sancov/Makefile	17 Jul 2018 18:55:26 -0000	1.4
+++ external/bsd/llvm/bin/sancov/Makefile	15 Mar 2019 08:38:56 -0000
@@ -10,6 +10,11 @@ NOMAN=		yes
 SRCS=	sancov.cc
 
 LLVM_LIBS+= \
+	AMDGPUDisassembler \
+	AMDGPUMCTargetDesc \
+	AMDGPUAsmPrinter \
+	AMDGPUTargetInfo \
+	AMDGPUUtils \
 	AArch64Disassembler \
 	AArch64MCTargetDesc \
 	AArch64AsmPrinter \
Index: external/bsd/llvm/config/llvm/Config/AsmParsers.def
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/config/llvm/Config/AsmParsers.def,v
retrieving revision 1.8
diff -p -u -r1.8 AsmParsers.def
--- external/bsd/llvm/config/llvm/Config/AsmParsers.def	11 Jan 2017 12:02:28 -0000	1.8
+++ external/bsd/llvm/config/llvm/Config/AsmParsers.def	15 Mar 2019 08:38:56 -0000
@@ -30,6 +30,7 @@ LLVM_ASM_PARSER(AArch64)
 LLVM_ASM_PARSER(Sparc)
 LLVM_ASM_PARSER(PowerPC)
 LLVM_ASM_PARSER(X86)
+LLVM_ASM_PARSER(AMDGPU)
 
 
 #undef LLVM_ASM_PARSER
Index: external/bsd/llvm/config/llvm/Config/AsmPrinters.def
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/config/llvm/Config/AsmPrinters.def,v
retrieving revision 1.8
diff -p -u -r1.8 AsmPrinters.def
--- external/bsd/llvm/config/llvm/Config/AsmPrinters.def	11 Jan 2017 12:02:28 -0000	1.8
+++ external/bsd/llvm/config/llvm/Config/AsmPrinters.def	15 Mar 2019 08:38:56 -0000
@@ -30,6 +30,7 @@ LLVM_ASM_PRINTER(AArch64)
 LLVM_ASM_PRINTER(Sparc)
 LLVM_ASM_PRINTER(PowerPC)
 LLVM_ASM_PRINTER(X86)
+LLVM_ASM_PRINTER(AMDGPU)
 
 
 #undef LLVM_ASM_PRINTER
Index: external/bsd/llvm/config/llvm/Config/Targets.def
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/config/llvm/Config/Targets.def,v
retrieving revision 1.7
diff -p -u -r1.7 Targets.def
--- external/bsd/llvm/config/llvm/Config/Targets.def	11 Jan 2017 12:02:28 -0000	1.7
+++ external/bsd/llvm/config/llvm/Config/Targets.def	15 Mar 2019 08:38:56 -0000
@@ -29,6 +29,7 @@ LLVM_TARGET(AArch64)
 LLVM_TARGET(Sparc)
 LLVM_TARGET(PowerPC)
 LLVM_TARGET(X86)
+LLVM_TARGET(AMDGPU)
 
 
 #undef LLVM_TARGET
Index: external/bsd/llvm/dist/llvm-configure/configure
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/dist/llvm-configure/configure,v
retrieving revision 1.2
diff -p -u -r1.2 configure
--- external/bsd/llvm/dist/llvm-configure/configure	1 Aug 2017 20:07:39 -0000	1.2
+++ external/bsd/llvm/dist/llvm-configure/configure	15 Mar 2019 08:38:59 -0000
@@ -5498,7 +5498,8 @@ LLVM_ENUM_ASM_PARSERS=""
 LLVM_ENUM_DISASSEMBLERS=""
 for target_to_build in $TARGETS_TO_BUILD; do
   LLVM_ENUM_TARGETS="$LLVM_ENUM_TARGETS${as_nl}LLVM_TARGET($target_to_build)"
-  if test -f ${llvm_srcdir}/lib/Target/${target_to_build}/*AsmPrinter.cpp ; then
+  target_has_asm_printer=${llvm_srcdir}/lib/Target/${target_to_build}/*AsmPrinter.cpp
+  if test -n "$target_has_asm_printer"; then
     LLVM_ENUM_ASM_PRINTERS="$LLVM_ENUM_ASM_PRINTERS${as_nl}LLVM_ASM_PRINTER($target_to_build)";
   fi
   if test -f ${llvm_srcdir}/lib/Target/${target_to_build}/AsmParser/CMakeLists.txt ; then
Index: external/bsd/llvm/include/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/include/Makefile,v
retrieving revision 1.46
diff -p -u -r1.46 Makefile
--- external/bsd/llvm/include/Makefile	3 Mar 2019 17:46:01 -0000	1.46
+++ external/bsd/llvm/include/Makefile	15 Mar 2019 08:38:59 -0000
@@ -4,7 +4,7 @@
 
 .PATH:	${CLANG_SRCDIR}/lib/Headers
 
-
+.if ${MKCLANG} != "no"
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
 INCS=	adxintrin.h \
 	ammintrin.h \
@@ -101,22 +101,11 @@ INCS=	msa.h
 .endif
 INCS+=	stdatomic.h
 INCSDIR=	/usr/include/clang-${CLANG_VERSION:R}
-
-.PATH:	${LLVM_SRCDIR}/include/llvm/IR \
-	${CLANG_SRCDIR}/include/clang/AST \
+.PATH:	${CLANG_SRCDIR}/include/clang/AST \
 	${CLANG_SRCDIR}/include/clang/Basic \
 	${CLANG_SRCDIR}/include/clang/Driver \
 	${CLANG_SRCDIR}/include/clang/StaticAnalyzer/Checkers
 
-TABLEGEN_SRC=	Attributes.td Intrinsics.td Options.td
-
-TABLEGEN_OUTPUT.Attributes.td= \
-	llvm/IR/Attributes.inc|-gen-attrs
-
-TABLEGEN_OUTPUT.Intrinsics.td= \
-	llvm/IR/IntrinsicEnums.inc|-gen-intrinsic-enums \
-	llvm/IR/IntrinsicImpl.inc|-gen-intrinsic-impl
-
 CLANG_TABLEGEN_SRC=	\
 	arm_fp16.td \
 	arm_neon.td \
@@ -206,10 +195,24 @@ CLANG_TABLEGEN_INCLUDES.Checkers.td=	\
 CLANG_TABLEGEN_OUTPUT.Checkers.td= \
 	clang/StaticAnalyzer/Checkers/Checkers.inc|-gen-clang-sa-checkers
 
+TABLEGEN_SRC+=	Options.td
+
 TABLEGEN_INCLUDES.Options.td=	-I${CLANG_SRCDIR}/include/clang/Driver
 TABLEGEN_OUTPUT.Options.td= \
 	clang/Driver/Options.inc|-gen-opt-parser-defs
 
+.endif
+
+.PATH:	${LLVM_SRCDIR}/include/llvm/IR
+TABLEGEN_SRC+=	Attributes.td Intrinsics.td #Options.td
+
+TABLEGEN_OUTPUT.Attributes.td= \
+	llvm/IR/Attributes.inc|-gen-attrs
+
+TABLEGEN_OUTPUT.Intrinsics.td= \
+	llvm/IR/IntrinsicEnums.inc|-gen-intrinsic-enums \
+	llvm/IR/IntrinsicImpl.inc|-gen-intrinsic-impl
+
 .include "${.PARSEDIR}/../tablegen.mk"
 
 DPSRCS+=	clang/Basic/Version.inc llvm/Support/VCSRevision.h
Index: external/bsd/llvm/lib/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/lib/Makefile,v
retrieving revision 1.47
diff -p -u -r1.47 Makefile
--- external/bsd/llvm/lib/Makefile	17 Jul 2018 18:55:27 -0000	1.47
+++ external/bsd/llvm/lib/Makefile	15 Mar 2019 08:38:59 -0000
@@ -2,7 +2,7 @@
 
 .include <bsd.own.mk>
 
-SUBDIR=	\
+SUBDIR+=	\
 	libLLVMAnalysis \
 	libLLVMAsmParser \
 	libLLVMAsmPrinter \
@@ -13,6 +13,7 @@ SUBDIR=	\
 	libLLVMDebugInfoCodeView \
 	libLLVMDebugInfoMSF \
 	libLLVMDemangle \
+	libLLVMExecutionEngine \
 	libLLVMGlobalISel \
 	libLLVMIR \
 	libLLVMIRReader \
@@ -23,6 +24,7 @@ SUBDIR=	\
 	libLLVMLinker \
 	libLLVMMC \
 	libLLVMMCDisassembler \
+	libLLVMMCJIT \
 	libLLVMMCParser \
 	libLLVMObjCARC \
 	libLLVMObject \
@@ -30,6 +32,7 @@ SUBDIR=	\
 	libLLVMPasses \
 	libLLVMProfileData \
 	libLLVMProfileDataCoverage \
+	libLLVMRuntimeDyld \
 	libLLVMScalarOpts \
 	libLLVMSelectionDAG \
 	libLLVMSupport \
@@ -40,6 +43,7 @@ SUBDIR=	\
 	libLLVMTransformsUtils \
 	libLLVMVectorize \
 	libLLVMAArch64CodeGen \
+	libLLVMAMDGPUCodeGen \
 	libLLVMARMCodeGen \
 	libLLVMMipsCodeGen \
 	libLLVMPowerPCCodeGen \
@@ -57,6 +61,14 @@ SUBDIR+= \
 	libLLVMAArch64Utils
 
 SUBDIR+= \
+	libLLVMAMDGPUAsmParser \
+	libLLVMAMDGPUAsmPrinter \
+	libLLVMAMDGPUDisassembler \
+	libLLVMAMDGPUMCTargetDesc \
+	libLLVMAMDGPUTargetInfo \
+	libLLVMAMDGPUUtils
+
+SUBDIR+= \
 	libLLVMARMAsmParser \
 	libLLVMARMAsmPrinter \
 	libLLVMARMDisassembler \
@@ -95,11 +107,8 @@ SUBDIR+= \
 
 .if ${NO_LLVM_DEVELOPER:Uno} == "no" && (${LLVM_DEVELOPER:U} == "yes" || ${MKLLDB} == "yes")
 SUBDIR+= \
-	libLLVMExecutionEngine \
-	libLLVMMCJIT \
 	libLLVMMIRParser \
-	libLLVMOrc \
-	libLLVMRuntimeDyld
+	libLLVMOrc
 .endif
 
 .if (${NO_LLVM_DEVELOPER:Uno} == "no" && ${LLVM_DEVELOPER:U} == "yes") || ${MKLLD} == "yes"
@@ -121,6 +130,7 @@ SUBDIR+= \
 	libLLVMXRay
 .endif
 
+.if ${MKCLANG} != "no"
 SUBDIR+= \
 	libclangAnalysis \
 	libclangARCMigrate \
@@ -144,6 +154,7 @@ SUBDIR+= \
 	libclangStaticAnalyzerCore \
 	.WAIT \
 	libclangStaticAnalyzerFrontend
+.endif
 
 .if ${NO_LLVM_DEVELOPER:Uno} == "no" && ${LLVM_DEVELOPER:U} == "yes"
 SUBDIR+= \
@@ -187,6 +198,7 @@ SUBDIR+= \
 	libMCLinkerSupport \
 	libMCLinkerTarget
 
+#.if ${MKCLANG} != "no"
 SUBDIR+= \
 	libMCLinkerARMCodeGen libMCLinkerARMTargetInfo
 SUBDIR+= \
Index: external/bsd/llvm/lib/Makefile.inc
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/lib/Makefile.inc,v
retrieving revision 1.3
diff -p -u -r1.3 Makefile.inc
--- external/bsd/llvm/lib/Makefile.inc	14 Oct 2013 01:37:39 -0000	1.3
+++ external/bsd/llvm/lib/Makefile.inc	15 Mar 2019 08:38:59 -0000
@@ -1,6 +1,13 @@
 #	$NetBSD: Makefile.inc,v 1.3 2013/10/14 01:37:39 joerg Exp $
 
 LIBISPRIVATE=	yes
+MKPICLIB=	yes
+# XXX libLLVMSupport.a(PrettyStackTrace.o): relocation 
+#     R_X86_64_TPOFF32 against `_ZL20PrettyStackTraceHead'
+#     can not be used when making a shared object; recompile with -fPIC
+# but works with -fPIC.
+NOPIE=		yes
+CFLAGS+=	${CSHLIBFLAGS}
 
 .if !empty(LIB:Mlldb*)
 CPPFLAGS+=	-I${LLDB_SRCDIR}/source
Index: lib/Makefile
===================================================================
RCS file: /cvsroot/src/lib/Makefile,v
retrieving revision 1.269
diff -p -u -r1.269 Makefile
--- lib/Makefile	12 Mar 2019 15:14:02 -0000	1.269
+++ lib/Makefile	15 Mar 2019 08:38:59 -0000
@@ -222,6 +222,10 @@ SUBDIR+=	../external/bsd/openldap/lib	# 
 SUBDIR+=        ../external/cddl/osnet/lib/libzfs
 .endif
 
+.if (${MKLLVM} != "no")
+SUBDIR+=	../external/bsd/llvm		# depends on libexecinfo
+.endif
+
 SUBDIR+= 	../libexec/httpd/libbozohttpd 	# depends on libssl & libcrypto
 
 #==================== 3rd library dependency barrier ====================
Index: share/mk/bsd.own.mk
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.own.mk,v
retrieving revision 1.1112
diff -p -u -r1.1112 bsd.own.mk
--- share/mk/bsd.own.mk	11 Mar 2019 09:20:14 -0000	1.1112
+++ share/mk/bsd.own.mk	15 Mar 2019 08:38:59 -0000
@@ -1169,7 +1169,7 @@ MKTEGRAFIRMWARE.evbarm=		yes
 _MKVARS.no= \
 	MKARZERO \
 	MKBSDGREP MKBSDTAR \
-	MKCATPAGES MKCOMPATTESTS MKCOMPATX11 MKCTF \
+	MKCATPAGES MKCLANG MKCOMPATTESTS MKCOMPATX11 MKCTF \
 	MKDEBUG MKDEBUGLIB MKDTRACE \
 	MKEXTSRC \
 	MKFIRMWARE \
Index: tools/Makefile
===================================================================
RCS file: /cvsroot/src/tools/Makefile,v
retrieving revision 1.198
diff -p -u -r1.198 Makefile
--- tools/Makefile	2 Jan 2019 13:29:22 -0000	1.198
+++ tools/Makefile	15 Mar 2019 08:38:59 -0000
@@ -130,8 +130,10 @@ SUBDIR+= \
 .if ${MKLLVM} != "no" && !defined(EXTERNAL_TOOLCHAIN)
 SUBDIR+= \
 	.WAIT llvm-include .WAIT \
-	llvm-lib .WAIT \
-	llvm-clang
+	llvm-lib
+.if ${MKCLANG} != "no"
+SUBDIR+=	.WAIT llvm-clang
+.endif
 . if ${MKLLD} != "no"
 SUBDIR+=	llvm-lld
 . endif
