freebsd-nq/lib/libclang_rt/Makefile.inc
Enji Cooper a060f1416a Support compiling lib/libclang_rt/profile a bit more with recent versions of gcc
Several of the flags were being treated as CFLAGS, when they were actually
technically CXXFLAGS. Move them there.

Only apply -fno-sanitize=safe-stack with clang.

PR:             223179
2017-11-05 19:25:06 +00:00

33 lines
638 B
Makefile

# $FreeBSD$
.include <src.opts.mk>
CRTARCH= ${MACHINE_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_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