aboutsummaryrefslogtreecommitdiff
path: root/lib
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
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')
-rw-r--r--lib/libgcc_eh/Makefile12
-rw-r--r--lib/libgcc_eh/Makefile.inc30
-rw-r--r--lib/libgcc_s/Makefile14
-rw-r--r--lib/libgcc_s/Version.map123
4 files changed, 179 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
diff --git a/lib/libgcc_s/Makefile b/lib/libgcc_s/Makefile
new file mode 100644
index 000000000000..22f9277edbb3
--- /dev/null
+++ b/lib/libgcc_s/Makefile
@@ -0,0 +1,14 @@
+# $FreeBSD$
+
+PKG= clibs
+SHLIB_NAME= libgcc_s.so.1
+
+WARNS?= 2
+
+LDFLAGS+= -nodefaultlibs
+VERSION_MAP= ${.CURDIR}/Version.map
+
+.include "../libcompiler_rt/Makefile.inc"
+.include "../libgcc_eh/Makefile.inc"
+
+.include <bsd.lib.mk>
diff --git a/lib/libgcc_s/Version.map b/lib/libgcc_s/Version.map
new file mode 100644
index 000000000000..b592c8746cdc
--- /dev/null
+++ b/lib/libgcc_s/Version.map
@@ -0,0 +1,123 @@
+/*
+ * $FreeBSD$
+ */
+
+GCC_3.0 {
+ __absvdi2;
+ __absvsi2;
+ __addvdi3;
+ __addvsi3;
+ __ashlti3;
+ __ashrti3;
+ __clear_cache;
+ __cmpti2;
+ __deregister_frame;
+ __deregister_frame_info;
+ __deregister_frame_info_bases;
+ __divti3;
+ __ffsdi2;
+ __ffsti2;
+ __fixdfti;
+ __fixsfti;
+ __fixunsdfdi;
+ __fixunsdfti;
+ __fixunssfdi;
+ __fixunssfti;
+ __fixunsxfdi;
+ __fixunsxfti;
+ __fixxfti;
+ __floattidf;
+ __floattisf;
+ __floattixf;
+ __lshrti3;
+ __modti3;
+ __mulvdi3;
+ __mulvsi3;
+ __multi3;
+ __negti2;
+ __negvdi2;
+ __negvsi2;
+ __register_frame;
+ __register_frame_info;
+ __register_frame_info_bases;
+ __register_frame_info_table;
+ __register_frame_info_table_bases;
+ __register_frame_table;
+ __subvdi3;
+ __subvsi3;
+ __ucmpti2;
+ __udivmodti4;
+ __udivti3;
+ __umodti3;
+ _Unwind_DeleteException;
+ _Unwind_Find_FDE;
+ _Unwind_ForcedUnwind;
+ _Unwind_GetDataRelBase;
+ _Unwind_GetGR;
+ _Unwind_GetIP;
+ _Unwind_GetLanguageSpecificData;
+ _Unwind_GetRegionStart;
+ _Unwind_GetTextRelBase;
+ _Unwind_RaiseException;
+ _Unwind_Resume;
+ _Unwind_SetGR;
+ _Unwind_SetIP;
+};
+
+GCC_3.3 {
+ _Unwind_Backtrace;
+ _Unwind_FindEnclosingFunction;
+ _Unwind_GetCFA;
+ _Unwind_Resume_or_Rethrow;
+} GCC_3.0;
+
+GCC_3.3.1 {
+ __gcc_personality_v0;
+} GCC_3.3;
+
+GCC_3.4 {
+ __clzdi2;
+ __clzti2;
+ __ctzdi2;
+ __ctzti2;
+ __paritydi2;
+ __parityti2;
+ __popcountdi2;
+ __popcountti2;
+} GCC_3.3.1;
+
+GCC_3.4.2 {
+ __enable_execute_stack;
+} GCC_3.4;
+
+GCC_3.4.4 {
+ __absvti2;
+ __addvti3;
+ __mulvti3;
+ __negvti2;
+ __subvti3;
+} GCC_3.4.2;
+
+GCC_4.0.0 {
+ __divdc3;
+ __divsc3;
+ __divxc3;
+ __muldc3;
+ __mulsc3;
+ __mulxc3;
+ __powidf2;
+ __powisf2;
+ __powixf2;
+} GCC_3.4.4;
+
+GCC_4.2.0 {
+ __floatuntidf;
+ __floatuntisf;
+ __floatuntixf;
+ _Unwind_GetIPInfo;
+} GCC_4.0.0;
+
+GCC_4.3.0 {
+ __bswapdi2;
+ __bswapsi2;
+} GCC_4.2.0;