aboutsummaryrefslogtreecommitdiff
path: root/lib/libgcc_eh
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2016-10-13 18:57:18 +0000
committerEd Maste <emaste@FreeBSD.org>2016-10-13 18:57:18 +0000
commit49c5eacbbfd900aeb9f3e571e769d2b1ee48f212 (patch)
treee48d1ce2cce2c63e046d8ac6c60b5fb684c3303b /lib/libgcc_eh
parent4ef9bd22ed091dd6513f89cdca2dfd03b6e3ffd2 (diff)
downloadsrc-49c5eacbbfd900aeb9f3e571e769d2b1ee48f212.tar.gz
src-49c5eacbbfd900aeb9f3e571e769d2b1ee48f212.zip
Introduce lib/libgcc_eh and lib/libgcc_s for LLVM's implementation
They are not yet connected to the build, but I am adding them to allow for easier testing, ports exp-runs, etc. Reviewed by: ed Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8188
Notes
Notes: svn path=/head/; revision=307230
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