devel/boost-libs: unbreak some C++14 consumers with GCC after r479222
Boost 1.68 changed System ABI[1] for C++14 but due to a GCC bug it's disabled for C++ >= 17. As our Boost package is built in C++17 consumers cannot use C++14. So, disable the new ABI for the affected GCC versions regardless of C++ standard. [1] https://github.com/boostorg/system/commit/7b6dcf6ac668 PR: 231447 Reported by: Piotr Kubaj
This commit is contained in:
parent
1a2622a1c5
commit
4fa3854eec
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=484377
2 changed files with 36 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= boost-libs
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
|
||||
COMMENT= Free portable C++ libraries (without Boost.Python)
|
||||
|
||||
|
|
35
devel/boost-libs/files/patch-boost_system_error__code.hpp
Normal file
35
devel/boost-libs/files/patch-boost_system_error__code.hpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
Boost.System built in C++ >= 17 doesn't support C++14 consumers with GCC 7.3
|
||||
|
||||
$ cat >a.cc
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::system::error_code e;
|
||||
e.clear();
|
||||
return 0;
|
||||
}
|
||||
|
||||
$ g++7 -std=gnu++98 -lboost_system a.cc
|
||||
$ g++7 -std=gnu++03 -lboost_system a.cc
|
||||
$ g++7 -std=gnu++11 -lboost_system a.cc
|
||||
$ g++7 -std=gnu++17 -lboost_system a.cc
|
||||
$ g++7 -std=gnu++14 -lboost_system a.cc
|
||||
/tmp//cciZnzeq.o: In function `main':
|
||||
a.cc:(.text+0x24): undefined reference to `boost::system::detail::system_category_instance'
|
||||
/tmp//cciZnzeq.o: In function `boost::system::system_category()':
|
||||
a.cc:(.text._ZN5boost6system15system_categoryEv[_ZN5boost6system15system_categoryEv]+0x5): undefined reference to `boost::system::detail::system_category_instance'
|
||||
/tmp//cciZnzeq.o: In function `boost::system::generic_category()':
|
||||
a.cc:(.text._ZN5boost6system16generic_categoryEv[_ZN5boost6system16generic_categoryEv]+0x5): undefined reference to `boost::system::detail::generic_category_instance'
|
||||
|
||||
--- boost/system/error_code.hpp.orig 2018-08-01 20:50:53 UTC
|
||||
+++ boost/system/error_code.hpp
|
||||
@@ -43,7 +43,7 @@
|
||||
# define BOOST_SYSTEM_HAS_CONSTEXPR
|
||||
#endif
|
||||
|
||||
-#if defined(__GNUC__) && (__GNUC__ == 7 && __GNUC_MINOR__ < 4) && __cplusplus >= 201700L
|
||||
+#if defined(__GNUC__) && (__GNUC__ == 7 && __GNUC_MINOR__ < 4)
|
||||
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83835
|
||||
# undef BOOST_SYSTEM_HAS_CONSTEXPR
|
||||
#endif
|
Loading…
Reference in a new issue