1# $FreeBSD$ 2 3COMPILERRTDIR= ${SRCTOP}/contrib/compiler-rt 4UNWINDINCDIR= ${SRCTOP}/contrib/libunwind/include 5UNWINDSRCDIR= ${SRCTOP}/contrib/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 30CXXFLAGS+= -fno-rtti 31CXXSTD?= c++11 32STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC 33# Probably need to just move this earlier or use CXXFLAGS 34.if ${MK_DIRDEPS_BUILD} == "yes" 35# Avoid dependency on lib/libc++ 36CFLAGS+= -isystem ${SRCTOP}/contrib/libc++/include -nostdinc++ 37.endif 38