pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/libcxx
Module Name: pkgsrc
Committed By: tnn
Date: Sat Aug 13 09:38:09 UTC 2022
Modified Files:
pkgsrc/lang/libcxx: Makefile buildlink3.mk distinfo
pkgsrc/lang/libcxx/patches: patch-src_support_solaris_xlocale.cpp
Added Files:
pkgsrc/lang/libcxx/patches: patch-src_charconv.cpp
patch-src_filesystem_filesystem__common.h
patch-src_include_to__chars__floating__point.h
Removed Files:
pkgsrc/lang/libcxx/patches:
patch-src_filesystem_directory__iterator.cpp
Log Message:
libcxx: misc cleanup
- try to restore SunOS patches which were left obviously broken (untested)
- reduce compiler requirement
- delint
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/lang/libcxx/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/lang/libcxx/buildlink3.mk
cvs rdiff -u -r1.18 -r1.19 pkgsrc/lang/libcxx/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/libcxx/patches/patch-src_charconv.cpp \
pkgsrc/lang/libcxx/patches/patch-src_filesystem_filesystem__common.h \
pkgsrc/lang/libcxx/patches/patch-src_include_to__chars__floating__point.h
cvs rdiff -u -r1.2 -r0 \
pkgsrc/lang/libcxx/patches/patch-src_filesystem_directory__iterator.cpp
cvs rdiff -u -r1.2 -r1.3 \
pkgsrc/lang/libcxx/patches/patch-src_support_solaris_xlocale.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/libcxx/Makefile
diff -u pkgsrc/lang/libcxx/Makefile:1.12 pkgsrc/lang/libcxx/Makefile:1.13
--- pkgsrc/lang/libcxx/Makefile:1.12 Fri Aug 12 08:43:58 2022
+++ pkgsrc/lang/libcxx/Makefile Sat Aug 13 09:38:09 2022
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.12 2022/08/12 08:43:58 pin Exp $
+# $NetBSD: Makefile,v 1.13 2022/08/13 09:38:09 tnn Exp $
.include "../../lang/llvm/version.mk"
+PKGREVISION= 1
DISTNAME= libcxx-${LLVM_VERSION}.src
PKGNAME= ${DISTNAME:S/.src//}
@@ -15,20 +16,22 @@ LICENSE= apache-2.0
# libcxx's includes to build, so we have this unholy extra distfiles thing
# in both of them to get them to build against each other without causing
# circular dependencies. This must be kept in sync with libcxxabi/Makefile.
-LIBCXXABI= libcxxabi-${LLVM_VERSION}.src
-LLVMDIST= llvm-${LLVM_VERSION}.src
-_EXTRA_DIST= ${LIBCXXABI}${EXTRACT_SUFX} ${LLVMDIST}${EXTRACT_SUFX}
-SITES.${LIBCXXABI}${EXTRACT_SUFX}= ${MASTER_SITES:=${GITHUB_PROJECT}/releases/download/${GITHUB_RELEASE}/}
-SITES.${LLLVMDIST}${EXTRACT_SUFX}= ${MASTER_SITES:=${GITHUB_PROJECT}/releases/download/${GITHUB_RELEASE}/}
+LIBCXXABI= libcxxabi-${LLVM_VERSION}.src
+LLVMDIST= llvm-${LLVM_VERSION}.src
+EXTRA_DIST= ${LIBCXXABI}${EXTRACT_SUFX} ${LLVMDIST}${EXTRACT_SUFX}
+
+SITES.${LIBCXXABI}${EXTRACT_SUFX}= \
+ ${MASTER_SITES:=${GITHUB_PROJECT}/releases/download/${GITHUB_RELEASE}/}
+SITES.${LLLVMDIST}${EXTRACT_SUFX}= \
+ ${MASTER_SITES:=${GITHUB_PROJECT}/releases/download/${GITHUB_RELEASE}/}
-DISTFILES= ${DEFAULT_DISTFILES} ${_EXTRA_DIST}
+DISTFILES= ${DEFAULT_DISTFILES} ${EXTRA_DIST}
-CONFIGURE_DIRS= ${WRKDIR}/build
+CONFIGURE_DIRS= build
CMAKE_ARG_PATH= ${WRKSRC}
-USE_LANGUAGES= c c++
+USE_LANGUAGES= c c++17
USE_CMAKE= yes
-GCC_REQD+= 12
SSP_SUPPORTED= no
CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release
@@ -43,8 +46,11 @@ CMAKE_ARGS+= -DLIBCXX_ENABLE_ABI_LINKER_
# avoid conflict with stddef.h
CXXFLAGS.NetBSD+= -D__DEFINED_max_align_t=1
+# Avoid GCC < 11 error https://github.com/llvm/llvm-project/issues/54018
+CXXFLAGS+= -std=c++17 -D_LIBCPP_STD_VER=17
+
post-extract:
- ${MKDIR} ${WRKDIR}/build
+ ${MKDIR} ${WRKSRC}/build
${LN} -f -s ${WRKDIR}/${LIBCXXABI} ${WRKDIR}/libcxxabi
${LN} -f -s ${WRKDIR}/${LLVMDIST} ${WRKDIR}/llvm
Index: pkgsrc/lang/libcxx/buildlink3.mk
diff -u pkgsrc/lang/libcxx/buildlink3.mk:1.6 pkgsrc/lang/libcxx/buildlink3.mk:1.7
--- pkgsrc/lang/libcxx/buildlink3.mk:1.6 Fri Aug 12 08:43:58 2022
+++ pkgsrc/lang/libcxx/buildlink3.mk Sat Aug 13 09:38:09 2022
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.6 2022/08/12 08:43:58 pin Exp $
+# $NetBSD: buildlink3.mk,v 1.7 2022/08/13 09:38:09 tnn Exp $
BUILDLINK_TREE+= libcxx
@@ -8,7 +8,6 @@ LIBCXX_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.libcxx+= libcxx>=14.0.0
BUILDLINK_PKGSRCDIR.libcxx?= ../../lang/libcxx
-.include "../../lang/llvm/buildlink3.mk"
.endif # LIBCXX_BUILDLINK3_MK
BUILDLINK_TREE+= -libcxx
Index: pkgsrc/lang/libcxx/distinfo
diff -u pkgsrc/lang/libcxx/distinfo:1.18 pkgsrc/lang/libcxx/distinfo:1.19
--- pkgsrc/lang/libcxx/distinfo:1.18 Fri Aug 12 08:43:58 2022
+++ pkgsrc/lang/libcxx/distinfo Sat Aug 13 09:38:09 2022
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.18 2022/08/12 08:43:58 pin Exp $
+$NetBSD: distinfo,v 1.19 2022/08/13 09:38:09 tnn Exp $
BLAKE2s (libcxx-14.0.6.src.tar.xz) = e77dfac79fb977adf84345b7e4c2762b3fa89f3d1f611baa8f8fa6831d1bc68a
SHA512 (libcxx-14.0.6.src.tar.xz) = c39bb01317e8ae7e5b23a677754a866953b6c45188c194d3d76fbd276de9565df8bcbcab8cf6606584af7dd30a61f39376c0e2de6b8c32c69f7fc592587e710d
@@ -10,5 +10,7 @@ BLAKE2s (llvm-14.0.6.src.tar.xz) = 2d449
SHA512 (llvm-14.0.6.src.tar.xz) = 6461bdde27aac17fa44c3e99a85ec47ffb181d0d4e5c3ef1c4286a59583e3b0c51af3c8081a300f45b99524340773a3011380059e3b3a571c3b0a8733e96fc1d
Size (llvm-14.0.6.src.tar.xz) = 49660136 bytes
SHA1 (patch-include_____config) = 01793dc2ec7db8f51d042fd0114649223036b089
+SHA1 (patch-src_charconv.cpp) = b8569ae77df4a5a7b627b3a9cb6691be73699dca
SHA1 (patch-src_filesystem_filesystem__common.h) = 7b088ae8e577b482e05906434b510daed40469ae
-SHA1 (patch-src_support_solaris_xlocale.cpp) = 027777a2945ce4aea89da59cb48426f2857d57d7
+SHA1 (patch-src_include_to__chars__floating__point.h) = f7f880905609b87830ea657c7510fb3987448a09
+SHA1 (patch-src_support_solaris_xlocale.cpp) = 51fc7940a60a4e288a1ccb65f1ea0502f6006490
Index: pkgsrc/lang/libcxx/patches/patch-src_support_solaris_xlocale.cpp
diff -u pkgsrc/lang/libcxx/patches/patch-src_support_solaris_xlocale.cpp:1.2 pkgsrc/lang/libcxx/patches/patch-src_support_solaris_xlocale.cpp:1.3
--- pkgsrc/lang/libcxx/patches/patch-src_support_solaris_xlocale.cpp:1.2 Fri Aug 12 08:43:58 2022
+++ pkgsrc/lang/libcxx/patches/patch-src_support_solaris_xlocale.cpp Sat Aug 13 09:38:09 2022
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_support_solaris_xlocale.cpp,v 1.2 2022/08/12 08:43:58 pin Exp $
+$NetBSD: patch-src_support_solaris_xlocale.cpp,v 1.3 2022/08/13 09:38:09 tnn Exp $
don't try to use sys/localedef.h on SunOS if nonexistent
OpenIndiana doesn't seem to ship the header.
@@ -12,7 +12,7 @@ https://illumos.topicbox.com/groups/deve
//===----------------------------------------------------------------------===//
-#ifdef __sun__
-+#ifdef(__sun__) && __has_include(<sys/localedef.h>)
++#if defined(__sun__) && __has_include(<sys/localedef.h>)
#include "__support/solaris/xlocale.h"
#include <stdarg.h>
Added files:
Index: pkgsrc/lang/libcxx/patches/patch-src_charconv.cpp
diff -u /dev/null pkgsrc/lang/libcxx/patches/patch-src_charconv.cpp:1.1
--- /dev/null Sat Aug 13 09:38:09 2022
+++ pkgsrc/lang/libcxx/patches/patch-src_charconv.cpp Sat Aug 13 09:38:09 2022
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_charconv.cpp,v 1.1 2022/08/13 09:38:09 tnn Exp $
+
+#if out some code that doesn't compile with GCC < 11 for now
+
+--- src/charconv.cpp.orig 2022-06-22 16:46:24.000000000 +0000
++++ src/charconv.cpp
+@@ -152,6 +152,7 @@ __u64toa(uint64_t value, char* buffer) n
+
+ // This implementation is dedicated to the memory of Mary and Thavatchai.
+
++#if _LIBCPP_STD_VER > 17
+ to_chars_result to_chars(char* __first, char* __last, float __value) {
+ return _Floating_to_chars<_Floating_to_chars_overload::_Plain>(__first, __last, __value, chars_format{}, 0);
+ }
+@@ -192,5 +193,6 @@ to_chars_result to_chars(char* __first,
+ return _Floating_to_chars<_Floating_to_chars_overload::_Format_precision>(
+ __first, __last, static_cast<double>(__value), __fmt, __precision);
+ }
++#endif
+
+ _LIBCPP_END_NAMESPACE_STD
Index: pkgsrc/lang/libcxx/patches/patch-src_filesystem_filesystem__common.h
diff -u /dev/null pkgsrc/lang/libcxx/patches/patch-src_filesystem_filesystem__common.h:1.1
--- /dev/null Sat Aug 13 09:38:09 2022
+++ pkgsrc/lang/libcxx/patches/patch-src_filesystem_filesystem__common.h Sat Aug 13 09:38:09 2022
@@ -0,0 +1,28 @@
+$NetBSD: patch-src_filesystem_filesystem__common.h,v 1.1 2022/08/13 09:38:09 tnn Exp $
+
+Support POSIX file modes.
+
+--- src/filesystem/filesystem_common.h.orig 2022-06-22 16:46:24.000000000 +0000
++++ src/filesystem/filesystem_common.h
+@@ -538,7 +538,21 @@ bool set_file_times(const path& p, std::
+ #if defined(DT_BLK)
+ 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:
Index: pkgsrc/lang/libcxx/patches/patch-src_include_to__chars__floating__point.h
diff -u /dev/null pkgsrc/lang/libcxx/patches/patch-src_include_to__chars__floating__point.h:1.1
--- /dev/null Sat Aug 13 09:38:09 2022
+++ pkgsrc/lang/libcxx/patches/patch-src_include_to__chars__floating__point.h Sat Aug 13 09:38:09 2022
@@ -0,0 +1,60 @@
+$NetBSD: patch-src_include_to__chars__floating__point.h,v 1.1 2022/08/13 09:38:09 tnn Exp $
+
+#if out some code that doesn't compile with GCC < 11 for now
+
+--- src/include/to_chars_floating_point.h.orig 2022-06-22 16:46:24.000000000 +0000
++++ src/include/to_chars_floating_point.h
+@@ -90,6 +90,7 @@ struct _Floating_type_traits<double> {
+
+ // ^^^^^^^^^^ DERIVED FROM corecrt_internal_fltintrn.h ^^^^^^^^^^
+
++#if _LIBCPP_STD_VER > 17
+ // FUNCTION to_chars (FLOATING-POINT TO STRING)
+ template <class _Floating>
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+@@ -329,7 +330,9 @@ to_chars_result _Floating_to_chars_hex_p
+ // We've already printed '-' if necessary, so uint32_t _Absolute_exponent avoids testing that again.
+ return _VSTD::to_chars(_First, _Last, _Absolute_exponent);
+ }
++#endif
+
++#if _LIBCPP_STD_VER > 17
+ template <class _Floating>
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+ to_chars_result _Floating_to_chars_hex_shortest(
+@@ -456,6 +459,7 @@ to_chars_result _Floating_to_chars_hex_s
+ // We've already printed '-' if necessary, so static_cast<uint32_t> avoids testing that again.
+ return _VSTD::to_chars(_First, _Last, static_cast<uint32_t>(_Unbiased_exponent));
+ }
++#endif
+
+ // For general precision, we can use lookup tables to avoid performing trial formatting.
+
+@@ -828,6 +832,7 @@ struct _General_precision_tables<double>
+ 0x7FEFFFFFFFFFFFFFu};
+ };
+
++#if _LIBCPP_STD_VER > 17
+ template <class _Floating>
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+ to_chars_result _Floating_to_chars_general_precision(
+@@ -980,9 +985,11 @@ to_chars_result _Floating_to_chars_gener
+
+ return {_First, errc{}};
+ }
++#endif
+
+ enum class _Floating_to_chars_overload { _Plain, _Format_only, _Format_precision };
+
++#if _LIBCPP_STD_VER > 17
+ template <_Floating_to_chars_overload _Overload, class _Floating>
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+ to_chars_result _Floating_to_chars(
+@@ -1068,6 +1075,7 @@ to_chars_result _Floating_to_chars(
+ }
+ }
+ }
++#endif
+
+ // clang-format on
+
Home |
Main Index |
Thread Index |
Old Index