2016-10-13 18:57:18 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
COMPILERRTDIR= ${SRCTOP}/contrib/compiler-rt
|
|
|
|
UNWINDINCDIR= ${SRCTOP}/contrib/llvm/projects/libunwind/include
|
|
|
|
UNWINDSRCDIR= ${SRCTOP}/contrib/llvm/projects/libunwind/src
|
|
|
|
|
2016-10-27 14:21:54 +00:00
|
|
|
STATIC_CFLAGS+=${PICFLAG} -fvisibility=hidden -DVISIBILITY_HIDDEN
|
2016-10-13 18:57:18 +00:00
|
|
|
|
|
|
|
.PATH: ${COMPILERRTDIR}/lib/builtins
|
|
|
|
.PATH: ${UNWINDSRCDIR}
|
2016-10-30 02:57:47 +00:00
|
|
|
SRCS_EXC+= gcc_personality_v0.c
|
|
|
|
SRCS_EXC+= int_util.c
|
|
|
|
SRCS_EXC+= Unwind-EHABI.cpp
|
|
|
|
SRCS_EXC+= Unwind-sjlj.c
|
|
|
|
SRCS_EXC+= UnwindLevel1-gcc-ext.c
|
|
|
|
SRCS_EXC+= UnwindLevel1.c
|
|
|
|
SRCS_EXC+= UnwindRegistersRestore.S
|
|
|
|
SRCS_EXC+= UnwindRegistersSave.S
|
|
|
|
SRCS_EXC+= libunwind.cpp
|
|
|
|
|
|
|
|
SRCS+= ${SRCS_EXC}
|
|
|
|
.for file in ${SRCS_EXC:M*.c}
|
|
|
|
CFLAGS.${file}+= -fexceptions
|
|
|
|
.endfor
|
2016-10-13 18:57:18 +00:00
|
|
|
|
|
|
|
CFLAGS+= -I${UNWINDINCDIR} -I${.CURDIR} -D_LIBUNWIND_IS_NATIVE_ONLY
|
|
|
|
.if empty(CXXFLAGS:M-std=*)
|
|
|
|
CXXFLAGS+= -std=c++11
|
|
|
|
.endif
|
|
|
|
CXXFLAGS+= -fno-rtti
|
|
|
|
STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC
|
2017-10-31 00:03:36 +00:00
|
|
|
# Probably need to just move this earlier or use CXXFLAGS
|
2016-10-13 18:57:18 +00:00
|
|
|
.if ${MK_DIRDEPS_BUILD} == "yes"
|
|
|
|
# Avoid dependency on lib/libc++
|
2017-10-31 00:03:36 +00:00
|
|
|
CFLAGS+= -isystem ${SRCTOP}/contrib/libc++/include -nostdinc++
|
2016-10-13 18:57:18 +00:00
|
|
|
.endif
|