1# $FreeBSD$ 2 3COMPILERRTDIR= ${SRCTOP}/contrib/llvm-project/compiler-rt 4UNWINDINCDIR= ${SRCTOP}/contrib/llvm-project/libunwind/include 5UNWINDSRCDIR= ${SRCTOP}/contrib/llvm-project/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+= Unwind-EHABI.cpp 13SRCS_EXC+= Unwind-sjlj.c 14SRCS_EXC+= UnwindLevel1-gcc-ext.c 15SRCS_EXC+= UnwindLevel1.c 16SRCS_EXC+= UnwindRegistersRestore.S 17SRCS_EXC+= UnwindRegistersSave.S 18SRCS_EXC+= libunwind.cpp 19 20SRCS+= ${SRCS_EXC} 21.for file in ${SRCS_EXC:M*.c} 22CFLAGS.${file}+= -fno-exceptions -funwind-tables 23.endfor 24.for file in ${SRCS_EXC:M*.cpp} 25CXXFLAGS.${file}+= -fno-exceptions -funwind-tables 26.endfor 27 28CFLAGS+= -I${UNWINDINCDIR} 29CFLAGS+= -I${.CURDIR} 30CFLAGS+= -D_LIBUNWIND_IS_NATIVE_ONLY 31CFLAGS+= -D_LIBUNWIND_USE_FRAME_HEADER_CACHE 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/llvm-project/libcxx/include -nostdinc++ 39.endif 40