The 32-bit compat lib install is executed with MK_TOOLCHAIN=no as of r264930 https://reviews.freebsd.org/rS264930 which prevents the sanitizer runtimes from being installed.
It seems just removing MK_TOOLCHAIN=no from Makefile.libcompat causes these additional files to be installed: ===> libc (install) ... install -o root -g wheel -m 444 libc_pic.a /usr/lib32/ ... ===> libclang_rt (install) ===> libclang_rt/include (install) install -C -o root -g wheel -m 444 /usr/home/emaste/src/freebsd-wip/contrib/compiler-rt/include/sanitizer/allocator_interface.h /usr/home/emaste/src/freebsd-wip/contrib/compiler-rt/include/sanitizer/asan_interface.h /usr/home/emaste/src/freebsd-wip/contrib/compiler-rt/include/sanitizer/common_interface_defs.h /usr/home/emaste/src/freebsd-wip/contrib/compiler-rt/include/sanitizer/coverage_interface.h /usr/home/emaste/src/freebsd-wip/contrib/compiler-rt/include/sanitizer/dfsan_interface.h /usr/home/emaste/src/freebsd-wip/contrib/compiler-rt/include/sanitizer/esan_interface.h /usr/home/emaste/src/freebsd-wip/contrib/compiler-rt/include/sanitizer/linux_syscall_hooks.h /usr/home/emaste/src/freebsd-wip/contrib/compiler-rt/include/sanitizer/lsan_interface.h /usr/home/emaste/src/freebsd-wip/contrib/compiler-rt/include/sanitizer/msan_interface.h /usr/home/emaste/src/freebsd-wip/contrib/compiler-rt/include/sanitizer/tsan_interface.h /usr/home/emaste/src/freebsd-wip/contrib/compiler-rt/include/sanitizer/tsan_interface_atomic.h /usr/lib/clang/5.0.0/include/sanitizer/ ===> libclang_rt/asan (install) install -C -o root -g wheel -m 444 libclang_rt.asan-i386.a /usr/lib/clang/5.0.0/lib/freebsd/ ===> libclang_rt/asan-preinit (install) install -C -o root -g wheel -m 444 libclang_rt.asan-preinit-i386.a /usr/lib/clang/5.0.0/lib/freebsd/ ===> libclang_rt/asan_dynamic (install) install -s -o root -g wheel -m 444 libclang_rt.asan-i386.so /usr/lib32/ install -o root -g wheel -m 444 libclang_rt.asan-i386.so.debug /usr/lib/debug/usr/lib32/ ===> libclang_rt/asan_cxx (install) install -C -o root -g wheel -m 444 libclang_rt.asan_cxx-i386.a /usr/lib/clang/5.0.0/lib/freebsd/ ===> libclang_rt/safestack (install) install -C -o root -g wheel -m 444 libclang_rt.safestack-i386.a /usr/lib/clang/5.0.0/lib/freebsd/ ===> libclang_rt/stats (install) install -C -o root -g wheel -m 444 libclang_rt.stats-i386.a /usr/lib/clang/5.0.0/lib/freebsd/ ===> libclang_rt/stats_client (install) install -C -o root -g wheel -m 444 libclang_rt.stats_client-i386.a /usr/lib/clang/5.0.0/lib/freebsd/ ===> libclang_rt/ubsan_standalone (install) install -C -o root -g wheel -m 444 libclang_rt.ubsan_standalone-i386.a /usr/lib/clang/5.0.0/lib/freebsd/ ===> libclang_rt/ubsan_standalone_cxx (install) install -C -o root -g wheel -m 444 libclang_rt.ubsan_standalone_cxx-i386.a /usr/lib/clang/5.0.0/lib/freebsd/ ===> libclang_rt/profile (install) install -C -o root -g wheel -m 444 libclang_rt.profile-i386.a /usr/lib/clang/5.0.0/lib/freebsd/ ===> libelftc (install) ===> libpe (install)
(In reply to Ed Maste from comment #1) > It seems just removing MK_TOOLCHAIN=no from Makefile.libcompat causes these > additional files to be installed: > > ===> libc (install) > ... > install -o root -g wheel -m 444 libc_pic.a /usr/lib32/ > ... > ===> libclang_rt (install) Okay, but won't that also cause 32-bit versions of libllvm, libclang and clang itself to be built? We definitely don't want that. :)
> Okay, but won't that also cause 32-bit versions of libllvm, libclang and clang > itself to be built? We definitely don't want that. :) Good point - I compared the result of 'make installworld' between stock FreeBSD and with MK_TOOLCHAIN=no removed, but I did not notice if it caused libllvm, libclang to be built. Clang itself wouldn't be built, because the compat32 stage does nothing with bin/usr.bin etc. The sanitizer runtimes are a bit of an interesting case. It seems they do belong with MK_TOOLCHAIN, they really are a runtime component tied to the Clang version in use. Maybe we should not try to be too generic / "clean" here and just pass in a COMPAT32 flag to the submakes, and have the individual Makefiles do the right thing (skipping headers and all not-runtime-support libs)?
MARKED AS SPAM
or set e.g. MK_TOOLCHAIN_RUNTIMES based on WITH_/WITHOUT_TOOLCHAIN that isn't overridden in LIB32IMAKE?