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
This commit is contained in:
Enji Cooper 2017-11-05 19:25:06 +00:00
parent 70cccb5ce0
commit a060f1416a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=325442
2 changed files with 5 additions and 5 deletions

View File

@ -20,13 +20,13 @@ CFLAGS+= -DNDEBUG
CFLAGS+= ${PICFLAG}
CFLAGS+= -fno-builtin
CFLAGS+= -fno-exceptions
CFLAGS+= -fno-rtti
.if ${COMPILER_VERSION} >= 30700
CXXFLAGS+= -fno-rtti
.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 30700
CFLAGS+= -fno-sanitize=safe-stack
.endif
CFLAGS+= -fno-stack-protector
CFLAGS+= -funwind-tables
CFLAGS+= -fvisibility-inlines-hidden
CFLAGS+= -fvisibility=hidden
CXXFLAGS+= -fvisibility-inlines-hidden
CXXFLAGS+= -fvisibility=hidden
CFLAGS+= -I${CRTSRC}/lib
CXXFLAGS+= -std=c++11

View File

@ -5,7 +5,7 @@
LIB= clang_rt.profile-${CRTARCH}
# This is needed for --coverage
CFLAGS+= -fvisibility=default
CXXFLAGS+= -fvisibility=default
SRCS+= profile/GCDAProfiling.c
SRCS+= profile/InstrProfiling.c