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 9ALLOW_MIPS_SHARED_TEXTREL= 10 11.PATH: ${COMPILERRTDIR}/lib/builtins 12.PATH: ${UNWINDSRCDIR} 13SRCS_EXC+= gcc_personality_v0.c 14SRCS_EXC+= int_util.c 15SRCS_EXC+= Unwind-EHABI.cpp 16SRCS_EXC+= Unwind-sjlj.c 17SRCS_EXC+= UnwindLevel1-gcc-ext.c 18SRCS_EXC+= UnwindLevel1.c 19SRCS_EXC+= UnwindRegistersRestore.S 20SRCS_EXC+= UnwindRegistersSave.S 21SRCS_EXC+= libunwind.cpp 22 23SRCS+= ${SRCS_EXC} 24.for file in ${SRCS_EXC:M*.c} 25CFLAGS.${file}+= -fno-exceptions -funwind-tables 26.endfor 27.for file in ${SRCS_EXC:M*.cpp} 28CXXFLAGS.${file}+= -fno-exceptions -funwind-tables 29.endfor 30 31CFLAGS+= -I${UNWINDINCDIR} -I${.CURDIR} -D_LIBUNWIND_IS_NATIVE_ONLY 32CXXFLAGS+= -fno-rtti 33CXXSTD?= c++11 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