freebsd-nq/lib/libclang_rt/Makefile.inc
Enji Cooper 600da319ad Simplify r325427
CROSSENV (in Makefile.inc1) sets CPUTYPE/MACHINE(_ARCH)? to the
TARGET*-relevant values when building the `libraries` target.

PR:	222925
2017-11-05 07:48:40 +00:00

40 lines
801 B
Makefile

# $FreeBSD$
.include <src.opts.mk>
# NOTE: based on TARGET_ABI/TARGET_CPUTYPE, set in Makefile.inc1 .
.if ${MACHINE} == "arm"
.if ${MACHINE_ARCH:Marmv[67]*} != "" && ${CPUTYPE:M*soft*} == ""
CRTARCH= armhf
.endif
.endif
CRTARCH?= ${TARGET_CPUARCH:C/amd64/x86_64/}
CRTSRC= ${SRCTOP}/contrib/compiler-rt
.PATH: ${CRTSRC}/lib
CLANGDIR= /usr/lib/clang/5.0.0
LIBDIR= ${CLANGDIR}/lib/freebsd
NO_PIC=
MK_PROFILE= no
WARNS?= 0
SSP_CFLAGS=
CFLAGS+= -DNDEBUG
CFLAGS+= ${PICFLAG}
CFLAGS+= -fno-builtin
CFLAGS+= -fno-exceptions
CXXFLAGS+= -fno-rtti
.if ${COMPILER_VERSION} >= 30700
CFLAGS.clang+= -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