aboutsummaryrefslogtreecommitdiff
path: root/lib/libgcc_eh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libgcc_eh')
-rw-r--r--lib/libgcc_eh/Makefile12
-rw-r--r--lib/libgcc_eh/Makefile.inc30
2 files changed, 42 insertions, 0 deletions
diff --git a/lib/libgcc_eh/Makefile b/lib/libgcc_eh/Makefile
new file mode 100644
index 000000000000..04f99d9e85cf
--- /dev/null
+++ b/lib/libgcc_eh/Makefile
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+.include <src.opts.mk>
+
+PACKAGE= clibs
+LIB= gcc_eh
+NO_PIC=
+WARNS?= 2
+
+.include "Makefile.inc"
+
+.include <bsd.lib.mk>
diff --git a/lib/libgcc_eh/Makefile.inc b/lib/libgcc_eh/Makefile.inc
new file mode 100644
index 000000000000..7321fbea78f9
--- /dev/null
+++ b/lib/libgcc_eh/Makefile.inc
@@ -0,0 +1,30 @@
+# $FreeBSD$
+
+COMPILERRTDIR= ${SRCTOP}/contrib/compiler-rt
+UNWINDINCDIR= ${SRCTOP}/contrib/llvm/projects/libunwind/include
+UNWINDSRCDIR= ${SRCTOP}/contrib/llvm/projects/libunwind/src
+
+CFLAGS+=${PICFLAG} -fvisibility=hidden -DVISIBILITY_HIDDEN
+
+.PATH: ${COMPILERRTDIR}/lib/builtins
+.PATH: ${UNWINDSRCDIR}
+SRCS+= gcc_personality_v0.c
+SRCS+= int_util.c
+SRCS+= Unwind-EHABI.cpp
+SRCS+= Unwind-sjlj.c
+SRCS+= UnwindLevel1-gcc-ext.c
+SRCS+= UnwindLevel1.c
+SRCS+= UnwindRegistersRestore.S
+SRCS+= UnwindRegistersSave.S
+SRCS+= libunwind.cpp
+
+CFLAGS+= -I${UNWINDINCDIR} -I${.CURDIR} -D_LIBUNWIND_IS_NATIVE_ONLY
+.if empty(CXXFLAGS:M-std=*)
+CXXFLAGS+= -std=c++11
+.endif
+CXXFLAGS+= -fno-rtti
+STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC
+.if ${MK_DIRDEPS_BUILD} == "yes"
+# Avoid dependency on lib/libc++
+CFLAGS+= -I${SRCTOP}/contrib/libc++/include
+.endif