Commit c131e588 authored by ed's avatar ed
Browse files

Add libc++, libc++abi and libunwind for CloudABI.

In order to get C++ support for CloudABI working, we need to import
three libraries from LLVM, namely libc++, libc++abi and libunwind. Even
though they are installed separately, there seems to be a circular
dependency between them:

- libc++ depends on an internal header from libc++abi.
- libc++abi depends on public headers from libc++, but also an internal
  header from libunwind.
- similarly, libunwind depends on public headers from libc++, but also
  an internal header from libc++abi.

This change adds three new ports for these libraries. As with
compiler-rt, it seems to be almost impossible to use the cmake
infrastructure shipped with these libraries, for the reason that they
depend on a functional C++ compiler being present. This is obviously not
the case, as we're trying to get these installed.

The libc++ port ships with a small number of patches. Almost all of the
patches needed to get libc++ to work on CloudABI have already been
upstreamed. These are the last remaining ones that haven't been
upstreamed yet. Expect the patches to become smaller over time.

Differential Revision:	https://reviews.freebsd.org/D2898
Approved by:	bapt
parent 1fd65ab0
......@@ -249,6 +249,9 @@
SUBDIR += cloudabi-binutils
SUBDIR += cloudabi-cloudlibc
SUBDIR += cloudabi-compiler-rt
SUBDIR += cloudabi-libc++
SUBDIR += cloudabi-libc++abi
SUBDIR += cloudabi-libunwind
SUBDIR += cmake
SUBDIR += cmake-fedora
SUBDIR += cmake-gui
......
# Created by: Ed Schouten <ed@FreeBSD.org>
# $FreeBSD$
PORTNAME= libc++
PORTVERSION= 0.240527
CATEGORIES= devel
MASTER_SITES= https://nuxi.nl/distfiles/libc++/:libcxx \
https://nuxi.nl/distfiles/libc++abi/:libcxxabi
PKGNAMEPREFIX= cloudabi-
DISTFILES= libc++-${PORTVERSION}${EXTRACT_SUFX}:libcxx \
libc++abi-${PORTVERSION}${EXTRACT_SUFX}:libcxxabi
MAINTAINER= ed@FreeBSD.org
COMMENT= C++ standard template library for CloudABI
LICENSE= MIT
BUILD_DEPENDS= x86_64-unknown-cloudabi-ar:${PORTSDIR}/devel/cloudabi-binutils \
x86_64-unknown-cloudabi-c++:${PORTSDIR}/lang/cloudabi-clang \
${LOCALBASE}/x86_64-unknown-cloudabi/lib/libc.a:${PORTSDIR}/devel/cloudabi-cloudlibc
USES= tar:xz
SRCFILES= algorithm bind chrono condition_variable debug exception \
future hash ios iostream locale memory mutex new optional \
random regex shared_mutex stdexcept string strstream \
system_error thread typeinfo utility valarray
do-build:
.for f in ${SRCFILES}
${LOCALBASE}/bin/x86_64-unknown-cloudabi-c++ \
-g -O2 -nostdinc++ -std=c++11 -I${WRKSRC}/include \
-I${WRKDIR}/libc++abi-${PORTVERSION}/include \
-D_LIBCPP_BUILD_STATIC -DLIBCXX_BUILDING_LIBCXXABI \
-c -o ${WRKSRC}/$f.o ${WRKSRC}/src/$f.cpp
.endfor
cd ${WRKSRC}; ${LOCALBASE}/bin/x86_64-unknown-cloudabi-ar -rcs \
libc++.a ${SRCFILES:S/$/.o/}
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/x86_64-unknown-cloudabi/lib/ \
${STAGEDIR}${PREFIX}/x86_64-unknown-cloudabi/include/c++/
${INSTALL_DATA} ${WRKSRC}/libc++.a \
${STAGEDIR}${PREFIX}/x86_64-unknown-cloudabi/lib/
@${CP} -r ${WRKSRC}/include \
${STAGEDIR}${PREFIX}/x86_64-unknown-cloudabi/include/c++/v1
.include <bsd.port.mk>
SHA256 (libc++-0.240527.tar.xz) = 6775bb5ef2cacc71cd40d70ce54d77237333cb9ea83f1d06e0fd10fe58561f44
SIZE (libc++-0.240527.tar.xz) = 967240
SHA256 (libc++abi-0.240527.tar.xz) = 16b206bb5ad40fbd40f69f79c31924aa9efe7e01255f69962361f873f13b4c29
SIZE (libc++abi-0.240527.tar.xz) = 507212
--- include/cstdio.orig 2015-06-17 04:49:22 UTC
+++ include/cstdio
@@ -151,7 +151,6 @@ using ::setvbuf;
using ::fprintf;
using ::fscanf;
using ::snprintf;
-using ::sprintf;
using ::sscanf;
#ifndef _LIBCPP_MSVCRT
using ::vfprintf;
@@ -159,14 +158,12 @@ using ::vfscanf;
using ::vsscanf;
#endif // _LIBCPP_MSVCRT
using ::vsnprintf;
-using ::vsprintf;
using ::fgetc;
using ::fgets;
using ::fputc;
using ::fputs;
using ::getc;
using ::putc;
-using ::ungetc;
using ::fread;
using ::fwrite;
using ::fgetpos;
--- include/cstdlib.orig 2015-06-24 08:46:34 UTC
+++ include/cstdlib
@@ -118,7 +118,6 @@ using ::strtoul;
using ::strtoull;
#endif // _LIBCPP_HAS_NO_LONG_LONG
using ::rand;
-using ::srand;
using ::calloc;
using ::free;
using ::malloc;
--- include/cstring.orig 2015-06-24 08:46:34 UTC
+++ include/cstring
@@ -69,10 +69,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
using ::size_t;
using ::memcpy;
using ::memmove;
-using ::strcpy;
using ::strncpy;
-using ::strcat;
-using ::strncat;
using ::memcmp;
using ::strcmp;
using ::strncmp;
--- include/cwchar.orig 2015-06-17 04:49:22 UTC
+++ include/cwchar
@@ -135,10 +135,8 @@ using ::fgetwc;
using ::fgetws;
using ::fputwc;
using ::fputws;
-using ::fwide;
using ::getwc;
using ::putwc;
-using ::ungetwc;
using ::wcstod;
#ifndef _LIBCPP_MSVCRT
using ::wcstof;
@@ -152,10 +150,7 @@ using ::wcstoul;
#ifndef _LIBCPP_HAS_NO_LONG_LONG
using ::wcstoull;
#endif // _LIBCPP_HAS_NO_LONG_LONG
-using ::wcscpy;
using ::wcsncpy;
-using ::wcscat;
-using ::wcsncat;
using ::wcscmp;
using ::wcscoll;
using ::wcsncmp;
@@ -199,7 +194,6 @@ using ::wmemset;
using ::wcsftime;
using ::btowc;
using ::wctob;
-using ::mbsinit;
using ::mbrlen;
using ::mbrtowc;
using ::wcrtomb;
--- include/locale.orig 2015-06-17 04:49:22 UTC
+++ include/locale
@@ -1297,13 +1297,13 @@ __num_put<_CharT>::__widen_and_group_flo
*__oe++ = __ct.widen(*__nf++);
*__oe++ = __ct.widen(*__nf++);
for (__ns = __nf; __ns < __ne; ++__ns)
- if (!isxdigit_l(*__ns, _LIBCPP_GET_C_LOCALE))
+ if (!isxdigit(*__ns))
break;
}
else
{
for (__ns = __nf; __ns < __ne; ++__ns)
- if (!isdigit_l(*__ns, _LIBCPP_GET_C_LOCALE))
+ if (!isdigit(*__ns))
break;
}
if (__grouping.empty())
--- src/locale.cpp.orig 2015-06-24 08:46:54 UTC
+++ src/locale.cpp
@@ -575,8 +575,6 @@ locale::global(const locale& loc)
locale& g = __global();
locale r = g;
g = loc;
- if (g.name() != "*")
- setlocale(LC_ALL, g.name().c_str());
return r;
}
@@ -813,7 +811,7 @@ ctype<wchar_t>::do_toupper(char_type c)
#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
return isascii(c) ? ctype<char>::__classic_upper_table()[c] : c;
#else
- return (isascii(c) && iswlower_l(c, __cloc())) ? c-L'a'+L'A' : c;
+ return (isascii(c) && iswlower(c)) ? c-L'a'+L'A' : c;
#endif
}
@@ -827,7 +825,7 @@ ctype<wchar_t>::do_toupper(char_type* lo
*low = isascii(*low) ? ctype<char>::__classic_upper_table()[*low]
: *low;
#else
- *low = (isascii(*low) && islower_l(*low, __cloc())) ? (*low-L'a'+L'A') : *low;
+ *low = (isascii(*low) && islower(*low)) ? (*low-L'a'+L'A') : *low;
#endif
return low;
}
@@ -840,7 +838,7 @@ ctype<wchar_t>::do_tolower(char_type c)
#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
return isascii(c) ? ctype<char>::__classic_lower_table()[c] : c;
#else
- return (isascii(c) && isupper_l(c, __cloc())) ? c-L'A'+'a' : c;
+ return (isascii(c) && isupper(c)) ? c-L'A'+'a' : c;
#endif
}
@@ -854,7 +852,7 @@ ctype<wchar_t>::do_tolower(char_type* lo
*low = isascii(*low) ? ctype<char>::__classic_lower_table()[*low]
: *low;
#else
- *low = (isascii(*low) && isupper_l(*low, __cloc())) ? *low-L'A'+L'a' : *low;
+ *low = (isascii(*low) && isupper(*low)) ? *low-L'A'+L'a' : *low;
#endif
return low;
}
@@ -923,7 +921,7 @@ ctype<char>::do_toupper(char_type c) con
return isascii(c) ?
static_cast<char>(__classic_upper_table()[static_cast<unsigned char>(c)]) : c;
#else
- return (isascii(c) && islower_l(c, __cloc())) ? c-'a'+'A' : c;
+ return (isascii(c) && islower(c)) ? c-'a'+'A' : c;
#endif
}
@@ -940,7 +938,7 @@ ctype<char>::do_toupper(char_type* low,
*low = isascii(*low) ?
static_cast<char>(__classic_upper_table()[static_cast<size_t>(*low)]) : *low;
#else
- *low = (isascii(*low) && islower_l(*low, __cloc())) ? *low-'a'+'A' : *low;
+ *low = (isascii(*low) && islower(*low)) ? *low-'a'+'A' : *low;
#endif
return low;
}
@@ -957,7 +955,7 @@ ctype<char>::do_tolower(char_type c) con
return isascii(c) ?
static_cast<char>(__classic_lower_table()[static_cast<size_t>(c)]) : c;
#else
- return (isascii(c) && isupper_l(c, __cloc())) ? c-'A'+'a' : c;
+ return (isascii(c) && isupper(c)) ? c-'A'+'a' : c;
#endif
}
@@ -972,7 +970,7 @@ ctype<char>::do_tolower(char_type* low,
#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__)
*low = isascii(*low) ? static_cast<char>(__classic_lower_table()[static_cast<size_t>(*low)]) : *low;
#else
- *low = (isascii(*low) && isupper_l(*low, __cloc())) ? *low-'A'+'a' : *low;
+ *low = (isascii(*low) && isupper(*low)) ? *low-'A'+'a' : *low;
#endif
return low;
}
@@ -1201,28 +1199,28 @@ ctype_byname<char>::~ctype_byname()
char
ctype_byname<char>::do_toupper(char_type c) const
{
- return static_cast<char>(toupper_l(static_cast<unsigned char>(c), __l));
+ return static_cast<char>(toupper(static_cast<unsigned char>(c)));
}
const char*
ctype_byname<char>::do_toupper(char_type* low, const char_type* high) const
{
for (; low != high; ++low)
- *low = static_cast<char>(toupper_l(static_cast<unsigned char>(*low), __l));
+ *low = static_cast<char>(toupper(static_cast<unsigned char>(*low)));
return low;
}
char
ctype_byname<char>::do_tolower(char_type c) const
{
- return static_cast<char>(tolower_l(static_cast<unsigned char>(c), __l));
+ return static_cast<char>(tolower(static_cast<unsigned char>(c)));
}
const char*
ctype_byname<char>::do_tolower(char_type* low, const char_type* high) const
{
for (; low != high; ++low)
- *low = static_cast<char>(tolower_l(static_cast<unsigned char>(*low), __l));
+ *low = static_cast<char>(tolower(static_cast<unsigned char>(*low)));
return low;
}
@@ -1707,11 +1705,6 @@ codecvt<wchar_t, char, mbstate_t>::do_un
int
codecvt<wchar_t, char, mbstate_t>::do_encoding() const _NOEXCEPT
{
-#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
- if (mbtowc_l(nullptr, nullptr, MB_LEN_MAX, __l) == 0)
-#else
- if (__mbtowc_l(nullptr, nullptr, MB_LEN_MAX, __l) == 0)
-#endif
{
// stateless encoding
#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
libc++ is an implementation of the C++ standard library maintained by
the LLVM project. This package installs a copy of this library as part
of the CloudABI toolchain.
WWW: http://libcxx.llvm.org/
x86_64-unknown-cloudabi/include/c++/v1/__bit_reference
x86_64-unknown-cloudabi/include/c++/v1/__config
x86_64-unknown-cloudabi/include/c++/v1/__debug
x86_64-unknown-cloudabi/include/c++/v1/__functional_03
x86_64-unknown-cloudabi/include/c++/v1/__functional_base
x86_64-unknown-cloudabi/include/c++/v1/__functional_base_03
x86_64-unknown-cloudabi/include/c++/v1/__hash_table
x86_64-unknown-cloudabi/include/c++/v1/__locale
x86_64-unknown-cloudabi/include/c++/v1/__mutex_base
x86_64-unknown-cloudabi/include/c++/v1/__refstring
x86_64-unknown-cloudabi/include/c++/v1/__split_buffer
x86_64-unknown-cloudabi/include/c++/v1/__sso_allocator
x86_64-unknown-cloudabi/include/c++/v1/__std_stream
x86_64-unknown-cloudabi/include/c++/v1/__tree
x86_64-unknown-cloudabi/include/c++/v1/__tuple
x86_64-unknown-cloudabi/include/c++/v1/__undef___deallocate
x86_64-unknown-cloudabi/include/c++/v1/__undef_min_max
x86_64-unknown-cloudabi/include/c++/v1/algorithm
x86_64-unknown-cloudabi/include/c++/v1/array
x86_64-unknown-cloudabi/include/c++/v1/atomic
x86_64-unknown-cloudabi/include/c++/v1/bitset
x86_64-unknown-cloudabi/include/c++/v1/cassert
x86_64-unknown-cloudabi/include/c++/v1/ccomplex
x86_64-unknown-cloudabi/include/c++/v1/cctype
x86_64-unknown-cloudabi/include/c++/v1/cerrno
x86_64-unknown-cloudabi/include/c++/v1/cfenv
x86_64-unknown-cloudabi/include/c++/v1/cfloat
x86_64-unknown-cloudabi/include/c++/v1/chrono
x86_64-unknown-cloudabi/include/c++/v1/cinttypes
x86_64-unknown-cloudabi/include/c++/v1/ciso646
x86_64-unknown-cloudabi/include/c++/v1/climits
x86_64-unknown-cloudabi/include/c++/v1/clocale
x86_64-unknown-cloudabi/include/c++/v1/cmath
x86_64-unknown-cloudabi/include/c++/v1/codecvt
x86_64-unknown-cloudabi/include/c++/v1/complex
x86_64-unknown-cloudabi/include/c++/v1/complex.h
x86_64-unknown-cloudabi/include/c++/v1/condition_variable
x86_64-unknown-cloudabi/include/c++/v1/csetjmp
x86_64-unknown-cloudabi/include/c++/v1/csignal
x86_64-unknown-cloudabi/include/c++/v1/cstdarg
x86_64-unknown-cloudabi/include/c++/v1/cstdbool
x86_64-unknown-cloudabi/include/c++/v1/cstddef
x86_64-unknown-cloudabi/include/c++/v1/cstdint
x86_64-unknown-cloudabi/include/c++/v1/cstdio
x86_64-unknown-cloudabi/include/c++/v1/cstdlib
x86_64-unknown-cloudabi/include/c++/v1/cstring
x86_64-unknown-cloudabi/include/c++/v1/ctgmath
x86_64-unknown-cloudabi/include/c++/v1/ctime
x86_64-unknown-cloudabi/include/c++/v1/cwchar
x86_64-unknown-cloudabi/include/c++/v1/cwctype
x86_64-unknown-cloudabi/include/c++/v1/deque
x86_64-unknown-cloudabi/include/c++/v1/exception
x86_64-unknown-cloudabi/include/c++/v1/experimental/__config
x86_64-unknown-cloudabi/include/c++/v1/experimental/algorithm
x86_64-unknown-cloudabi/include/c++/v1/experimental/chrono
x86_64-unknown-cloudabi/include/c++/v1/experimental/dynarray
x86_64-unknown-cloudabi/include/c++/v1/experimental/optional
x86_64-unknown-cloudabi/include/c++/v1/experimental/ratio
x86_64-unknown-cloudabi/include/c++/v1/experimental/string_view
x86_64-unknown-cloudabi/include/c++/v1/experimental/system_error
x86_64-unknown-cloudabi/include/c++/v1/experimental/tuple
x86_64-unknown-cloudabi/include/c++/v1/experimental/type_traits
x86_64-unknown-cloudabi/include/c++/v1/experimental/utility
x86_64-unknown-cloudabi/include/c++/v1/ext/__hash
x86_64-unknown-cloudabi/include/c++/v1/ext/hash_map
x86_64-unknown-cloudabi/include/c++/v1/ext/hash_set
x86_64-unknown-cloudabi/include/c++/v1/forward_list
x86_64-unknown-cloudabi/include/c++/v1/fstream
x86_64-unknown-cloudabi/include/c++/v1/functional
x86_64-unknown-cloudabi/include/c++/v1/future
x86_64-unknown-cloudabi/include/c++/v1/initializer_list
x86_64-unknown-cloudabi/include/c++/v1/iomanip
x86_64-unknown-cloudabi/include/c++/v1/ios
x86_64-unknown-cloudabi/include/c++/v1/iosfwd
x86_64-unknown-cloudabi/include/c++/v1/iostream
x86_64-unknown-cloudabi/include/c++/v1/istream
x86_64-unknown-cloudabi/include/c++/v1/iterator
x86_64-unknown-cloudabi/include/c++/v1/limits
x86_64-unknown-cloudabi/include/c++/v1/list
x86_64-unknown-cloudabi/include/c++/v1/locale
x86_64-unknown-cloudabi/include/c++/v1/map
x86_64-unknown-cloudabi/include/c++/v1/memory
x86_64-unknown-cloudabi/include/c++/v1/module.modulemap
x86_64-unknown-cloudabi/include/c++/v1/mutex
x86_64-unknown-cloudabi/include/c++/v1/new
x86_64-unknown-cloudabi/include/c++/v1/numeric
x86_64-unknown-cloudabi/include/c++/v1/ostream
x86_64-unknown-cloudabi/include/c++/v1/queue
x86_64-unknown-cloudabi/include/c++/v1/random
x86_64-unknown-cloudabi/include/c++/v1/ratio
x86_64-unknown-cloudabi/include/c++/v1/regex
x86_64-unknown-cloudabi/include/c++/v1/scoped_allocator
x86_64-unknown-cloudabi/include/c++/v1/set
x86_64-unknown-cloudabi/include/c++/v1/shared_mutex
x86_64-unknown-cloudabi/include/c++/v1/sstream
x86_64-unknown-cloudabi/include/c++/v1/stack
x86_64-unknown-cloudabi/include/c++/v1/stdexcept
x86_64-unknown-cloudabi/include/c++/v1/streambuf
x86_64-unknown-cloudabi/include/c++/v1/string
x86_64-unknown-cloudabi/include/c++/v1/strstream
x86_64-unknown-cloudabi/include/c++/v1/system_error
x86_64-unknown-cloudabi/include/c++/v1/tgmath.h
x86_64-unknown-cloudabi/include/c++/v1/thread
x86_64-unknown-cloudabi/include/c++/v1/tuple
x86_64-unknown-cloudabi/include/c++/v1/type_traits
x86_64-unknown-cloudabi/include/c++/v1/typeindex
x86_64-unknown-cloudabi/include/c++/v1/typeinfo
x86_64-unknown-cloudabi/include/c++/v1/unordered_map
x86_64-unknown-cloudabi/include/c++/v1/unordered_set
x86_64-unknown-cloudabi/include/c++/v1/utility
x86_64-unknown-cloudabi/include/c++/v1/valarray
x86_64-unknown-cloudabi/include/c++/v1/vector
x86_64-unknown-cloudabi/lib/libc++.a
# Created by: Ed Schouten <ed@FreeBSD.org>
# $FreeBSD$
PORTNAME= libc++abi
PORTVERSION= 0.240527
CATEGORIES= devel
MASTER_SITES= https://nuxi.nl/distfiles/libc++abi/:libcxxabi \
https://nuxi.nl/distfiles/libunwind/:libunwind
PKGNAMEPREFIX= cloudabi-
DISTFILES= libc++abi-${PORTVERSION}${EXTRACT_SUFX}:libcxxabi \
libunwind-${PORTVERSION}${EXTRACT_SUFX}:libunwind
MAINTAINER= ed@FreeBSD.org
COMMENT= C++ standard library support for CloudABI
LICENSE= MIT
BUILD_DEPENDS= x86_64-unknown-cloudabi-ar:${PORTSDIR}/devel/cloudabi-binutils \
x86_64-unknown-cloudabi-c++:${PORTSDIR}/lang/cloudabi-clang \
${LOCALBASE}/x86_64-unknown-cloudabi/lib/libc.a:${PORTSDIR}/devel/cloudabi-cloudlibc \
${LOCALBASE}/x86_64-unknown-cloudabi/lib/libc++.a:${PORTSDIR}/devel/cloudabi-libc++
USES= tar:xz
PLIST_FILES= x86_64-unknown-cloudabi/lib/libc++abi.a
SRCFILES= abort_message cxa_aux_runtime cxa_default_handlers \
cxa_demangle cxa_exception cxa_exception_storage cxa_guard \
cxa_handlers cxa_new_delete cxa_personality cxa_thread_atexit \
cxa_unexpected cxa_vector cxa_virtual exception \
private_typeinfo stdexcept typeinfo
do-build:
.for f in ${SRCFILES}
${LOCALBASE}/bin/x86_64-unknown-cloudabi-c++ \
-O2 -std=c++11 -I${WRKSRC}/include \
-I${WRKDIR}/libunwind-${PORTVERSION}/include \
-c -o ${WRKSRC}/$f.o ${WRKSRC}/src/$f.cpp
.endfor
cd ${WRKSRC}; ${LOCALBASE}/bin/x86_64-unknown-cloudabi-ar -rcs \
libc++abi.a ${SRCFILES:S/$/.o/}
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/x86_64-unknown-cloudabi/lib/
${INSTALL_DATA} ${WRKSRC}/libc++abi.a \
${STAGEDIR}${PREFIX}/x86_64-unknown-cloudabi/lib/
.include <bsd.port.mk>
SHA256 (libc++abi-0.240527.tar.xz) = 16b206bb5ad40fbd40f69f79c31924aa9efe7e01255f69962361f873f13b4c29
SIZE (libc++abi-0.240527.tar.xz) = 507212
SHA256 (libunwind-0.240527.tar.xz) = a921907dbdadbf86fbc9f0317f6a88707907e36be0ecce283cd46e45dfb16e0f
SIZE (libunwind-0.240527.tar.xz) = 59036
libc++abi is the C++ support library. It implements low-level language
features such as type information, name demangling and thread-safe
initialization of global storage. This port provides a copy of libc++abi
built for CloudABI.
WWW: http://libcxxabi.llvm.org/
# Created by: Ed Schouten <ed@FreeBSD.org>
# $FreeBSD$
PORTNAME= libunwind
PORTVERSION= 0.240527
CATEGORIES= devel
MASTER_SITES= https://nuxi.nl/distfiles/libc++abi/:libcxxabi \
https://nuxi.nl/distfiles/libunwind/:libunwind
PKGNAMEPREFIX= cloudabi-
DISTFILES= libc++abi-${PORTVERSION}${EXTRACT_SUFX}:libcxxabi \
libunwind-${PORTVERSION}${EXTRACT_SUFX}:libunwind
MAINTAINER= ed@FreeBSD.org
COMMENT= C++ standard library support for CloudABI
LICENSE= MIT
BUILD_DEPENDS= x86_64-unknown-cloudabi-ar:${PORTSDIR}/devel/cloudabi-binutils \
x86_64-unknown-cloudabi-c++:${PORTSDIR}/lang/cloudabi-clang \
${LOCALBASE}/x86_64-unknown-cloudabi/lib/libc.a:${PORTSDIR}/devel/cloudabi-cloudlibc \
${LOCALBASE}/x86_64-unknown-cloudabi/lib/libc++.a:${PORTSDIR}/devel/cloudabi-libc++
USES= tar:xz
PLIST_FILES= x86_64-unknown-cloudabi/lib/libunwind.a
SRCFILES= Unwind-EHABI.cpp Unwind-sjlj.c UnwindLevel1-gcc-ext.c \
UnwindLevel1.c UnwindRegistersRestore.S UnwindRegistersSave.S \
libunwind.cpp
do-build:
.for f in ${SRCFILES}
${LOCALBASE}/bin/x86_64-unknown-cloudabi-c++ \
-O2 -std=c++11 -I${WRKSRC}/include \
-I${WRKDIR}/libc++abi-${PORTVERSION}/include \
-c -o ${WRKSRC}/$f.o ${WRKSRC}/src/$f
.endfor
cd ${WRKSRC}; ${LOCALBASE}/bin/x86_64-unknown-cloudabi-ar -rcs \
libunwind.a ${SRCFILES:S/$/.o/}
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/x86_64-unknown-cloudabi/lib/
${INSTALL_DATA} ${WRKSRC}/libunwind.a \
${STAGEDIR}${PREFIX}/x86_64-unknown-cloudabi/lib/
.include <bsd.port.mk>
SHA256 (libc++abi-0.240527.tar.xz) = 16b206bb5ad40fbd40f69f79c31924aa9efe7e01255f69962361f873f13b4c29
SIZE (libc++abi-0.240527.tar.xz) = 507212
SHA256 (libunwind-0.240527.tar.xz) = a921907dbdadbf86fbc9f0317f6a88707907e36be0ecce283cd46e45dfb16e0f
SIZE (libunwind-0.240527.tar.xz) = 59036
libunwind is a stack unwinder library maintained by the LLVM project. It
is used when handling exceptions in C++. This port provides a copy of
libunwind built for CloudABI.
WWW: http://libcxxabi.llvm.org/
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment