1# $FreeBSD$ 2 3COMPILERRTDIR= ${SRCTOP}/contrib/compiler-rt 4UNWINDINCDIR= ${SRCTOP}/contrib/llvm/projects/libunwind/include 5UNWINDSRCDIR= ${SRCTOP}/contrib/llvm/projects/libunwind/src 6 7STATIC_CFLAGS+=${PICFLAG} -fvisibility=hidden -DVISIBILITY_HIDDEN 8 9.PATH: ${COMPILERRTDIR}/lib/builtins 10.PATH: ${UNWINDSRCDIR} 11SRCS_EXC+= gcc_personality_v0.c 12SRCS_EXC+= int_util.c 13SRCS_EXC+= Unwind-EHABI.cpp 14SRCS_EXC+= Unwind-sjlj.c 15SRCS_EXC+= UnwindLevel1-gcc-ext.c 16SRCS_EXC+= UnwindLevel1.c 17SRCS_EXC+= UnwindRegistersRestore.S 18SRCS_EXC+= UnwindRegistersSave.S 19SRCS_EXC+= libunwind.cpp 20 21SRCS+= ${SRCS_EXC} 22.for file in ${SRCS_EXC:M*.c} 23CFLAGS.${file}+= -fexceptions 24.endfor 25 26CFLAGS+= -I${UNWINDINCDIR} -I${.CURDIR} -D_LIBUNWIND_IS_NATIVE_ONLY 27.if empty(CXXFLAGS:M-std=*) 28CXXFLAGS+= -std=c++11 29.endif 30CXXFLAGS+= -fno-rtti 31STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC 32.if ${MK_DIRDEPS_BUILD} == "yes" 33# Avoid dependency on lib/libc++ 34CFLAGS+= -I${SRCTOP}/contrib/libc++/include 35.endif 36