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}+= -fno-exceptions -funwind-tables 24.endfor 25.for file in ${SRCS_EXC:M*.cpp} 26CXXFLAGS.${file}+= -fno-exceptions -funwind-tables 27.endfor 28 29CFLAGS+= -I${UNWINDINCDIR} -I${.CURDIR} -D_LIBUNWIND_IS_NATIVE_ONLY 30.if empty(CXXFLAGS:M-std=*) 31CXXFLAGS+= -std=c++11 32.endif 33CXXFLAGS+= -fno-rtti 34STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC 35# Probably need to just move this earlier or use CXXFLAGS 36.if ${MK_DIRDEPS_BUILD} == "yes" 37# Avoid dependency on lib/libc++ 38CFLAGS+= -isystem ${SRCTOP}/contrib/libc++/include -nostdinc++ 39.endif 40