aboutsummaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2019-05-02 22:35:55 -0700
committerRosen Penev <rosenp@gmail.com>2019-05-03 13:02:59 -0700
commit55320abae06195457bf457255faaf2f044b0e001 (patch)
treee5bb705009e48940a9bdf1be7d2ba063f23b66e6 /libs
parentae714f9afa3bf82a900f69871d9539c62e0970d6 (diff)
boost: Fix uClibc-ng compilation again
Several math functions are not defined in math.h and therefore cannot be used. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'libs')
-rw-r--r--libs/boost/Makefile2
-rw-r--r--libs/boost/patches/uclibc-ng-2.patch21
2 files changed, 22 insertions, 1 deletions
diff --git a/libs/boost/Makefile b/libs/boost/Makefile
index 3a245119a..6a87228b2 100644
--- a/libs/boost/Makefile
+++ b/libs/boost/Makefile
@@ -13,7 +13,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=boost
PKG_VERSION:=1.70.0
PKG_SOURCE_VERSION:=1_70_0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/$(PKG_NAME)/$(PKG_NAME)/$(PKG_VERSION) https://dl.bintray.com/boostorg/release/$(PKG_VERSION)/source/
diff --git a/libs/boost/patches/uclibc-ng-2.patch b/libs/boost/patches/uclibc-ng-2.patch
new file mode 100644
index 000000000..0d1668602
--- /dev/null
+++ b/libs/boost/patches/uclibc-ng-2.patch
@@ -0,0 +1,21 @@
+--- a/boost/math/tools/roots.hpp
++++ b/boost/math/tools/roots.hpp
+@@ -665,8 +665,8 @@ namespace detail
+ inline T discriminant(T const & a, T const & b, T const & c)
+ {
+ T w = 4*a*c;
+- T e = std::fma(-c, 4*a, w);
+- T f = std::fma(b, b, -w);
++ T e = fma(-c, 4*a, w);
++ T f = fma(b, b, -w);
+ return f + e;
+ }
+ }
+@@ -674,7 +674,6 @@ namespace detail
+ template<class T>
+ auto quadratic_roots(T const& a, T const& b, T const& c)
+ {
+- using std::copysign;
+ using std::sqrt;
+ if constexpr (std::is_integral<T>::value)
+ {