summaryrefslogtreecommitdiffstats
path: root/lib/libcxx
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2016-09-04 12:48:33 +0000
committerpatrick <patrick@openbsd.org>2016-09-04 12:48:33 +0000
commit4c901a55901ebf7b55008cc7beb274e0380ee624 (patch)
tree4fe2a2b1f1d45a4ead125f9cee2cf5c91766e279 /lib/libcxx
parentadd missing doas entries; noticed by avsm (diff)
downloadwireguard-openbsd-4c901a55901ebf7b55008cc7beb274e0380ee624.tar.xz
wireguard-openbsd-4c901a55901ebf7b55008cc7beb274e0380ee624.zip
Add makefiles to compile libc++, libc++abi and libunwind.
Tweaks from pascal@ ok guenther@ kettenis@
Diffstat (limited to 'lib/libcxx')
-rw-r--r--lib/libcxx/Makefile250
-rw-r--r--lib/libcxx/shlib_version2
2 files changed, 252 insertions, 0 deletions
diff --git a/lib/libcxx/Makefile b/lib/libcxx/Makefile
new file mode 100644
index 00000000000..f27bb76607d
--- /dev/null
+++ b/lib/libcxx/Makefile
@@ -0,0 +1,250 @@
+# $OpenBSD: Makefile,v 1.1 2016/09/04 12:48:33 patrick Exp $
+
+HDRDIR= ${.CURDIR}/include
+SRCDIR= ${.CURDIR}/src
+AHDRDIR= ${.CURDIR}/../libcxxabi/include
+UHDRDIR= ${.CURDIR}/../libunwind/include
+CXXINCLUDEDIR= /usr/include/c++/v1
+
+.PATH: ${SRCDIR}
+
+CXX=eg++
+
+LIB= c++
+
+SRCS+= algorithm.cpp\
+ any.cpp\
+ bind.cpp\
+ chrono.cpp\
+ condition_variable.cpp\
+ debug.cpp\
+ exception.cpp\
+ future.cpp\
+ hash.cpp\
+ ios.cpp\
+ iostream.cpp\
+ locale.cpp\
+ memory.cpp\
+ mutex.cpp\
+ new.cpp\
+ random.cpp\
+ regex.cpp\
+ shared_mutex.cpp\
+ stdexcept.cpp\
+ string.cpp\
+ strstream.cpp\
+ system_error.cpp\
+ thread.cpp\
+ typeinfo.cpp\
+ utility.cpp\
+ valarray.cpp
+
+CPPFLAGS+= -DLIBCXXABI -I${HDRDIR} \
+ -DLIBCXX_BUILDING_LIBCXXABI -I${AHDRDIR} -I${UHDRDIR}
+CXXFLAGS+= -nostdlib
+.if empty(CXXFLAGS:M-std=*)
+CXXFLAGS+= -std=c++11
+.endif
+
+STD_HEADERS= __bit_reference\
+ __bsd_locale_defaults.h\
+ __bsd_locale_fallbacks.h\
+ __config\
+ __debug\
+ __functional_03\
+ __functional_base\
+ __functional_base_03\
+ __hash_table\
+ __locale\
+ __mutex_base\
+ __nullptr\
+ __refstring\
+ __split_buffer\
+ __sso_allocator\
+ __std_stream\
+ __threading_support\
+ __tree\
+ __tuple\
+ __undef___deallocate\
+ __undef_min_max\
+ algorithm\
+ array\
+ atomic\
+ bitset\
+ cassert\
+ ccomplex\
+ cctype\
+ cerrno\
+ cfenv\
+ cfloat\
+ chrono\
+ cinttypes\
+ ciso646\
+ climits\
+ clocale\
+ cmath\
+ codecvt\
+ complex\
+ complex.h\
+ condition_variable\
+ csetjmp\
+ csignal\
+ cstdarg\
+ cstdbool\
+ cstddef\
+ cstdint\
+ cstdio\
+ cstdlib\
+ cstring\
+ ctgmath\
+ ctime\
+ ctype.h\
+ cwchar\
+ cwctype\
+ deque\
+ errno.h\
+ exception\
+ float.h\
+ forward_list\
+ fstream\
+ functional\
+ future\
+ initializer_list\
+ inttypes.h\
+ iomanip\
+ ios\
+ iosfwd\
+ iostream\
+ istream\
+ iterator\
+ limits\
+ list\
+ locale\
+ map\
+ math.h\
+ memory\
+ mutex\
+ new\
+ numeric\
+ ostream\
+ queue\
+ random\
+ ratio\
+ regex\
+ scoped_allocator\
+ set\
+ setjmp.h\
+ shared_mutex\
+ sstream\
+ stack\
+ stdbool.h\
+ stddef.h\
+ stdexcept\
+ stdio.h\
+ stdlib.h\
+ streambuf\
+ string\
+ string.h\
+ strstream\
+ system_error\
+ tgmath.h\
+ thread\
+ tuple\
+ type_traits\
+ typeindex\
+ typeinfo\
+ unordered_map\
+ unordered_set\
+ utility\
+ valarray\
+ vector\
+ wchar.h\
+ wctype.h
+
+.for hdr in ${STD_HEADERS}
+STD+= ${hdr} ${HDRDIR}/${hdr}
+.endfor
+STDDIR= ${CXXINCLUDEDIR}
+
+EXT_HEADERS= __hash\
+ hash_map\
+ hash_set
+
+.for hdr in ${EXT_HEADERS}
+EXT+= ${hdr} ${HDRDIR}/ext/${hdr}
+.endfor
+EXTDIR= ${CXXINCLUDEDIR}/ext
+
+EXP_HEADERS= __config\
+ __memory\
+ algorithm\
+ any\
+ chrono\
+ deque\
+ dynarray\
+ filesystem\
+ forward_list\
+ functional\
+ iterator\
+ list\
+ map\
+ memory_resource\
+ optional\
+ propagate_const\
+ ratio\
+ regex\
+ set\
+ string\
+ string_view\
+ system_error\
+ tuple\
+ type_traits\
+ unordered_map\
+ unordered_set\
+ utility\
+ vector
+
+.for hdr in ${EXP_HEADERS}
+EXP+= ${hdr} ${HDRDIR}/experimental/${hdr}
+.endfor
+EXPDIR= ${CXXINCLUDEDIR}/experimental
+
+XLOCALE_HEADERS= __nop_locale_mgmt.h\
+ __posix_l_fallback.h\
+ __strtonum_fallback.h\
+ xlocale.h
+
+.for hdr in ${XLOCALE_HEADERS}
+XLOCALE+= ${hdr} ${HDRDIR}/support/xlocale/${hdr}
+.endfor
+XLOCALEDIR= ${CXXINCLUDEDIR}/support/xlocale
+
+includes:
+ @echo installing ${STD_HEADERS}
+ ${INSTALL} -d -m 755 ${DESTDIR}/${STDDIR};
+. for hdr src in ${STD}
+ cmp -s ${src} ${DESTDIR}/${STDDIR}/${hdr} || \
+ ${INSTALL} ${INSTALL_COPY} -m 444 ${src} ${DESTDIR}/${STDDIR}/${hdr};
+. endfor
+ ${INSTALL} -d -m 755 ${DESTDIR}/${EXTDIR};
+. for hdr src in ${EXT}
+ cmp -s ${src} ${DESTDIR}/${EXTDIR}/${hdr} || \
+ ${INSTALL} ${INSTALL_COPY} -m 444 ${src} ${DESTDIR}/${EXTDIR}/${hdr};
+. endfor
+ ${INSTALL} -d -m 755 ${DESTDIR}/${EXPDIR};
+. for hdr src in ${EXP}
+ cmp -s ${src} ${DESTDIR}/${EXPDIR}/${hdr} || \
+ ${INSTALL} ${INSTALL_COPY} -m 444 ${src} ${DESTDIR}/${EXPDIR}/${hdr};
+. endfor
+ ${INSTALL} -d -m 755 ${DESTDIR}/${CXXINCLUDEDIR}/support/newlib;
+ cmp -s ${HDRDIR}/support/newlib/xlocale.h \
+ ${DESTDIR}/${CXXINCLUDEDIR}/support/newlib/xlocale.h || \
+ ${INSTALL} ${INSTALL_COPY} -m 444 ${HDRDIR}/support/newlib/xlocale.h \
+ ${DESTDIR}/${CXXINCLUDEDIR}/support/newlib/xlocale.h;
+ ${INSTALL} -d -m 755 ${DESTDIR}/${CXXINCLUDEDIR}/support/xlocale;
+. for hdr src in ${XLOCALE}
+ cmp -s ${src} ${DESTDIR}/${XLOCALEDIR}/${hdr} || \
+ ${INSTALL} ${INSTALL_COPY} -m 444 ${src} ${DESTDIR}/${XLOCALEDIR}/${hdr};
+. endfor
+
+.include <bsd.lib.mk>
diff --git a/lib/libcxx/shlib_version b/lib/libcxx/shlib_version
new file mode 100644
index 00000000000..97c9f92d6b8
--- /dev/null
+++ b/lib/libcxx/shlib_version
@@ -0,0 +1,2 @@
+major=0
+minor=0