diff options
author | jperkin <jperkin@pkgsrc.org> | 2018-12-17 16:07:09 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2018-12-17 16:07:09 +0000 |
commit | 5bfc04a1e78379917ecdcaa469c94a01454ff82c (patch) | |
tree | 7b1012dd8f52ee575d0d778d97d7cf2dcee8922e /lang/libcxx | |
parent | 8ee563c9be8348d0717e44033d5081439c67207d (diff) | |
download | pkgsrc-5bfc04a1e78379917ecdcaa469c94a01454ff82c.tar.gz |
libcxx: Fix build on SunOS.
Diffstat (limited to 'lang/libcxx')
-rw-r--r-- | lang/libcxx/distinfo | 4 | ||||
-rw-r--r-- | lang/libcxx/patches/patch-src_experimental_memory__resource.cpp | 15 | ||||
-rw-r--r-- | lang/libcxx/patches/patch-src_filesystem_directory__iterator.cpp | 28 |
3 files changed, 46 insertions, 1 deletions
diff --git a/lang/libcxx/distinfo b/lang/libcxx/distinfo index 6b09ebc9b1f..0083da7e30e 100644 --- a/lang/libcxx/distinfo +++ b/lang/libcxx/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2018/12/09 20:04:39 adam Exp $ +$NetBSD: distinfo,v 1.3 2018/12/17 16:07:09 jperkin Exp $ SHA1 (libcxx-7.0.0.src.tar.xz) = 496b865f1011020eb5d6fbac6a0cc08e2c1f0a09 RMD160 (libcxx-7.0.0.src.tar.xz) = 7dfefd22edb305f68882a5f503f31c881fe5dc05 @@ -8,3 +8,5 @@ SHA1 (libcxxabi-7.0.0.src.tar.xz) = b6ab94ff434b01029d50a2cc683b115af4a8726e RMD160 (libcxxabi-7.0.0.src.tar.xz) = d4a932989597e58f7a3f24cd67f8886b93c184d7 SHA512 (libcxxabi-7.0.0.src.tar.xz) = 95aa8f60477739e6d6eb6ba1e32c98928e1b8104d18d659336cf7f1c5bfd1ed505015077dfbe39329c0c9d2b5b428d853e5652b0106c0cde317d2d013ebd1cf0 Size (libcxxabi-7.0.0.src.tar.xz) = 535792 bytes +SHA1 (patch-src_experimental_memory__resource.cpp) = 15e2431f92b41d814008e83d918e27248db065e1 +SHA1 (patch-src_filesystem_directory__iterator.cpp) = ed7fccc6727ba349b32cda451e3c5d0067c737d3 diff --git a/lang/libcxx/patches/patch-src_experimental_memory__resource.cpp b/lang/libcxx/patches/patch-src_experimental_memory__resource.cpp new file mode 100644 index 00000000000..ff87433c247 --- /dev/null +++ b/lang/libcxx/patches/patch-src_experimental_memory__resource.cpp @@ -0,0 +1,15 @@ +$NetBSD: patch-src_experimental_memory__resource.cpp,v 1.3 2018/12/17 16:07:09 jperkin Exp $ + +The init_priority attribute isn't supported on SunOS GCC. + +--- src/experimental/memory_resource.cpp.orig 2018-07-16 20:01:59.000000000 +0000 ++++ src/experimental/memory_resource.cpp +@@ -70,7 +70,7 @@ union ResourceInitHelper { + }; + + // Detect if the init_priority attribute is supported. +-#if (defined(_LIBCPP_COMPILER_GCC) && defined(__APPLE__)) \ ++#if (defined(_LIBCPP_COMPILER_GCC) && (defined(__APPLE__) || defined(__sun))) \ + || defined(_LIBCPP_COMPILER_MSVC) + // GCC on Apple doesn't support the init priority attribute, + // and MSVC doesn't support any GCC attributes. diff --git a/lang/libcxx/patches/patch-src_filesystem_directory__iterator.cpp b/lang/libcxx/patches/patch-src_filesystem_directory__iterator.cpp new file mode 100644 index 00000000000..00134678345 --- /dev/null +++ b/lang/libcxx/patches/patch-src_filesystem_directory__iterator.cpp @@ -0,0 +1,28 @@ +$NetBSD: patch-src_filesystem_directory__iterator.cpp,v 1.1 2018/12/17 16:07:09 jperkin Exp $ + +Support POSIX file modes. + +--- src/filesystem/directory_iterator.cpp.orig 2018-07-27 03:07:09.000000000 +0000 ++++ src/filesystem/directory_iterator.cpp +@@ -27,7 +27,21 @@ namespace { + #if !defined(_LIBCPP_WIN32API) + template <class DirEntT, class = decltype(DirEntT::d_type)> + static file_type get_file_type(DirEntT* ent, int) { ++#ifdef __sun ++#define DT_BLK S_IFBLK ++#define DT_CHR S_IFCHR ++#define DT_DIR S_IFDIR ++#define DT_FIFO S_IFIFO ++#define DT_LNK S_IFLNK ++#define DT_REG S_IFREG ++#define DT_SOCK S_IFSOCK ++#define DT_UNKNOWN 0 ++ struct stat s; ++ stat(ent->d_name, &s); ++ switch (s.st_mode & 0xF000) { ++#else + switch (ent->d_type) { ++#endif + case DT_BLK: + return file_type::block; + case DT_CHR: |