tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lang/libunwind requires too recent GCC
On Fri, 12 Aug 2022 22:13:59 +0000
pin <voidpin%protonmail.com@localhost> wrote:
> > -GCC_REQD+= 4.8
> > +GCC_REQD+= 12
> >
> > I object to requiring such recent GCC.
>
> Yes, there's a reason for this. Actually, gcc11 is enough but, we don't have it. See, https://github.com/llvm/llvm-project/issues/54018
>
> No, libunwind itself doesn't need it but, libcxxabi won't build if libunwind has been built with gcc < 11.
I'm not happy with this, but at least I understand why the change was
made now. How about the attached patch instead?
Btw distinfo for libcxx patches is wrong and needs to be regenerated,
please verify pkglint output.
-Tobias
? lang/libcxx/log
Index: lang/libcxx/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/libcxx/Makefile,v
retrieving revision 1.12
diff -p -u -r1.12 Makefile
--- lang/libcxx/Makefile 12 Aug 2022 08:43:58 -0000 1.12
+++ lang/libcxx/Makefile 13 Aug 2022 00:22:46 -0000
@@ -26,9 +26,8 @@ DISTFILES= ${DEFAULT_DISTFILES} ${_EXTRA
CONFIGURE_DIRS= ${WRKDIR}/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,6 +42,9 @@ 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
${LN} -f -s ${WRKDIR}/${LIBCXXABI} ${WRKDIR}/libcxxabi
Index: lang/libcxx/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/lang/libcxx/distinfo,v
retrieving revision 1.18
diff -p -u -r1.18 distinfo
--- lang/libcxx/distinfo 12 Aug 2022 08:43:58 -0000 1.18
+++ lang/libcxx/distinfo 13 Aug 2022 00:22:46 -0000
@@ -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_filesystem_filesystem__common.h) = 7b088ae8e577b482e05906434b510daed40469ae
+SHA1 (patch-src_charconv.cpp) = 66348a9af7e7d34e533d3e974458fa56dc81b974
+SHA1 (patch-src_filesystem_directory__iterator.cpp) = 90ebbb80e4ec161405397d6d7c5d1d19a7284325
+SHA1 (patch-src_include_to__chars__floating__point.h) = 672573d28ffb60ece1d17fdb91c6f9867a8350eb
SHA1 (patch-src_support_solaris_xlocale.cpp) = 027777a2945ce4aea89da59cb48426f2857d57d7
Index: lang/libcxx/patches/patch-src_charconv.cpp
===================================================================
RCS file: lang/libcxx/patches/patch-src_charconv.cpp
diff -N lang/libcxx/patches/patch-src_charconv.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lang/libcxx/patches/patch-src_charconv.cpp 13 Aug 2022 00:22:46 -0000
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- 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: lang/libcxx/patches/patch-src_include_to__chars__floating__point.h
===================================================================
RCS file: lang/libcxx/patches/patch-src_include_to__chars__floating__point.h
diff -N lang/libcxx/patches/patch-src_include_to__chars__floating__point.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lang/libcxx/patches/patch-src_include_to__chars__floating__point.h 13 Aug 2022 00:22:46 -0000
@@ -0,0 +1,58 @@
+$NetBSD$
+
+--- 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
+
Index: lang/libcxxabi/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/libcxxabi/Makefile,v
retrieving revision 1.13
diff -p -u -r1.13 Makefile
--- lang/libcxxabi/Makefile 12 Aug 2022 08:41:58 -0000 1.13
+++ lang/libcxxabi/Makefile 13 Aug 2022 00:22:46 -0000
@@ -26,9 +26,8 @@ DISTFILES= ${DEFAULT_DISTFILES} ${_EXTRA
CONFIGURE_DIRS= ${WRKDIR}/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
@@ -40,6 +39,9 @@ CMAKE_ARGS+= -DLIBCXXABI_USE_LLVM_UNWIND
# 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
${LN} -f -s ${WRKDIR}/${LIBCXX} ${WRKDIR}/libcxx
Index: lang/libunwind/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/libunwind/Makefile,v
retrieving revision 1.26
diff -p -u -r1.26 Makefile
--- lang/libunwind/Makefile 12 Aug 2022 08:39:56 -0000 1.26
+++ lang/libunwind/Makefile 13 Aug 2022 00:22:46 -0000
@@ -26,7 +26,6 @@ CMAKE_ARG_PATH= ${WRKSRC}
USE_CMAKE= yes
USE_LANGUAGES= c c++11
USE_TOOLS+= pax
-GCC_REQD+= 12
SSP_SUPPORTED= no
CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release
Home |
Main Index |
Thread Index |
Old Index