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:
ngie 2017-11-05 19:25:06 +00:00
parent 45f4d98ef9
commit 44999d42d3
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