52f9bacb0e
The lib32 build was already building the i386 version of the clang sanitizers (libclang_rt) but they were not being installed. This enables the installation. MK_TOOLCHAIN=no was originally added to the install make environment to disable includes so that NO_INCS could be removed. The MK_TOOLCHAIN in bsd.incs.mk was subsequently renamed to MK_INCLUDES, but bsd.lib.mk doesn't even include bsd.incs.mk when LIBRARIES_ONLY is defined which the install make environment for compat libs now defines. However, setting MK_TOOLCHAIN=no forced MK_CLANG=no which disabled libclang_rt during the install32 phase. Remove MK_TOOLCHAIN=no since LIBRARIES_ONLY is now sufficient. Since the libcompat environment overrides both LIBDIR and SHLIBDIR, libclang_rt/Makefile.inc has to set both variables to force the libraries to be installed to the location expected by the compiler. Reviewed by: bdrewery, dim MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16574
45 lines
1.0 KiB
Makefile
45 lines
1.0 KiB
Makefile
# $FreeBSD$
|
|
|
|
.include <bsd.compiler.mk>
|
|
|
|
# armv[67] is a bit special since we allow a soft-floating version via
|
|
# CPUTYPE matching *soft*. This variant may not actually work though.
|
|
.if ${MACHINE_ARCH:Marmv[67]*} != "" && \
|
|
(!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "")
|
|
CRTARCH?= armhf
|
|
.else
|
|
CRTARCH?= ${MACHINE_CPUARCH:C/amd64/x86_64/}
|
|
.endif
|
|
CRTSRC= ${SRCTOP}/contrib/compiler-rt
|
|
|
|
.PATH: ${CRTSRC}/lib
|
|
|
|
CLANGDIR= /usr/lib/clang/6.0.1
|
|
LIBDIR= ${CLANGDIR}/lib/freebsd
|
|
SHLIBDIR= ${LIBDIR}
|
|
|
|
NO_PIC=
|
|
MK_PROFILE= no
|
|
|
|
WARNS?= 0
|
|
|
|
SSP_CFLAGS=
|
|
CFLAGS+= -DNDEBUG
|
|
CFLAGS+= -DHAVE_RPC_XDR_H=0
|
|
CFLAGS+= -DHAVE_TIRPC_RPC_XDR_H=0
|
|
CFLAGS+= -DSANITIZER_SUPPORTS_WEAK_HOOKS=0
|
|
CFLAGS+= -DUBSAN_CAN_USE_CXXABI
|
|
CFLAGS+= ${PICFLAG}
|
|
CFLAGS+= -fno-builtin
|
|
CFLAGS+= -fno-exceptions
|
|
CXXFLAGS+= -fno-rtti
|
|
.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 30700
|
|
CFLAGS+= -fno-sanitize=safe-stack
|
|
.endif
|
|
CFLAGS+= -fno-stack-protector
|
|
CFLAGS+= -funwind-tables
|
|
CXXFLAGS+= -fvisibility-inlines-hidden
|
|
CXXFLAGS+= -fvisibility=hidden
|
|
CFLAGS+= -I${CRTSRC}/lib
|
|
CXXFLAGS+= -std=c++11
|