diff --git a/etc/mtree/BSD.debug.dist b/etc/mtree/BSD.debug.dist index 7797a4c4173d..62d33e6ed091 100644 --- a/etc/mtree/BSD.debug.dist +++ b/etc/mtree/BSD.debug.dist @@ -24,6 +24,14 @@ games .. lib + clang + 3.5.0 + lib + freebsd + .. + .. + .. + .. engines .. i18n diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 57509847bf22..022db7aa3f21 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -14,6 +14,14 @@ lib aout .. + clang + 3.5.0 + lib + freebsd + .. + .. + .. + .. compat aout .. diff --git a/lib/Makefile b/lib/Makefile index 4d30c5387605..c51ae96b1c3d 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -13,6 +13,7 @@ SUBDIR_ORDERED= ${_csu} \ libc \ libc_nonshared \ libcompiler_rt \ + ${_libclang_rt} \ ${_libcplusplus} \ ${_libcxxrt} \ libelf \ @@ -211,6 +212,15 @@ _libcom_err= libcom_err _libldns= libldns .endif +# The libraries under libclang_rt can only be built by clang, and only make +# sense to build when clang is enabled at all. Furthermore, they can only be +# built for certain architectures. +.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \ + (${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || \ + (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb")) +_libclang_rt= libclang_rt +.endif + .if ${MK_LIBCPLUSPLUS} != "no" _libcxxrt= libcxxrt _libcplusplus= libc++ diff --git a/lib/libclang_rt/Makefile b/lib/libclang_rt/Makefile index d238fa3e24b6..b082e3828b5a 100644 --- a/lib/libclang_rt/Makefile +++ b/lib/libclang_rt/Makefile @@ -1,10 +1,18 @@ # $FreeBSD$ -SUBDIR= asan\ - asan_cxx\ - profile\ - san\ - ubsan\ - ubsan_cxx +.include + +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +SUBDIR+= asan\ + asan_cxx\ + san\ + ubsan\ + ubsan_cxx +.endif + +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || \ + (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") +SUBDIR+= profile +.endif .include diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 43ad48e61f23..af7784da38bc 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -527,6 +527,23 @@ OLD_FILES+=usr/include/clang/3.5.0/xmmintrin.h OLD_FILES+=usr/include/clang/3.5.0/xopintrin.h OLD_DIRS+=usr/include/clang/3.5.0 OLD_DIRS+=usr/include/clang +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.san-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.san-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan_cxx-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a +OLD_DIRS+=usr/lib/clang/3.5.0/lib/freebsd +OLD_DIRS+=usr/lib/clang/3.5.0/lib +OLD_DIRS+=usr/lib/clang/3.5.0 +OLD_DIRS+=usr/lib/clang OLD_FILES+=usr/share/doc/llvm/clang/LICENSE.TXT OLD_DIRS+=usr/share/doc/llvm/clang OLD_FILES+=usr/share/doc/llvm/COPYRIGHT.regex