kumquat-buildroot/package/glibc/0004-Fix-the-C-version-of-issignaling-when-__NO_LONG_DOUB.patch

48 lines
1.5 KiB
Diff
Raw Normal View History

package/glibc: bump to 2.26 Drop upstream patch: 0001-sh-Fix-building-with-gcc5-6.patch https://sourceware.org/git/?p=glibc.git;a=commit;h=d40dbe722f004f999b589de776f7e57e564dda01 0002-CVE-2017-1000366-Ignore-LD_LIBRARY_PATH-for-AT_SECUR.patch https://sourceware.org/git/?p=glibc.git;a=commit;h=f6110a8fee2ca36f8e2d2abecf3cba9fa7b8ea7d 0003-ld.so-Reject-overly-long-LD_PRELOAD-path-elements.patch https://sourceware.org/git/?p=glibc.git;a=commit;h=6d0ba622891bed9d8394eef1935add53003b12e8 0004-ld.so-Reject-overly-long-LD_AUDIT-path-elements.patch https://sourceware.org/git/?p=glibc.git;a=commit;h=81b82fb966ffbd94353f793ad17116c6088dedd9 0005-fix-binutils-2-29-build.patch https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff_plain;h=388b4f1a02f3a801965028bbfcd48d905638b797 0006-i686-Add-missing-IS_IN-libc-guards-to-vectorized-strcspn.patch https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff_plain;h=69052a3a95da37169a08f9e59b2cc1808312753c 0006-sh4-trap.patch https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff_plain;h=db3d848e154b00071f4a5e729d5884efad410109 But 2.26 version introduced quite a few regressions on x86, x86_64 and powerpc64le when float128 support was added. All these issues are now fixed in the glibc 2.26 stable branch. Backport patches from glibc 2.26 stable branch related to bug 21930. Take all patches listed in this bug report in order to have all fix for this issue [1] [2]. Fixes gnuradio build: [...]/sysroot/usr/include/boost/functional/hash/detail/hash_float.hpp: In function ‘std::size_t boost::hash_detail::float_hash_value(T)’: [...]/sysroot/usr/include/boost/functional/hash/detail/hash_float.hpp:210:21: error: expected primary-expression before ‘float’ switch (fpclassify(v)) ^ [...]/sysroot/usr/include/boost/functional/hash/detail/hash_float.hpp:210:21: error: expected primary-expression before ‘long’ switch (fpclassify(v)) ^ [...]/sysroot/usr/include/boost/functional/hash/detail/hash_float.hpp:210:21: error: found ‘:’ in nested-name-specifier, expected ‘::’ switch (fpclassify(v)) ^ [...]/sysroot/usr/include/boost/functional/hash/detail/hash_float.hpp:210:21: error: ‘_Float128’ is not a class or namespace switch (fpclassify(v)) ^ [...]/sysroot/usr/include/boost/functional/hash/detail/hash_float.hpp:210:21: error: ‘_Generic’ was not declared in this scope switch (fpclassify(v)) ^ Also backport fix for glibc bug 22146. Without this patch some C++ applications (jsoncpp, mesa3d and kodi) fail to build due to an issue while building the toolchain. A test in the libstdc++ configure script fail when -Os and float128 are used. See the bug report for details [3]. [1] https://sourceware.org/ml/libc-alpha/2017-08/msg00586.html [2] https://sourceware.org/bugzilla/show_bug.cgi?id=21930 [3] https://sourceware.org/bugzilla/show_bug.cgi?id=22146 Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2017-09-23 23:24:06 +02:00
From 9dbd8386a1b706beb30291a7e76bbfe69c2620cf Mon Sep 17 00:00:00 2001
From: "Gabriel F. T. Gomes" <gftg@linux.vnet.ibm.com>
Date: Wed, 23 Aug 2017 10:16:54 -0300
Subject: [PATCH] Fix the C++ version of issignaling when __NO_LONG_DOUBLE_MATH
is defined
When __NO_LONG_DOUBLE_MATH is defined, __issignalingl is not available,
thus issignaling with long double argument should call __issignaling,
instead.
Tested for powerpc64le.
* math/math.h [defined __cplusplus] (issignaling): In the long
double case, call __issignalingl only if __NO_LONG_DOUBLE_MATH
is not defined. Call __issignaling, otherwise.
(cherry picked from commit 3d7b66f66cb223e899a7ebc0f4c20f13e711c9e0)
[Romain rebase on glibc 2.26]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
math/math.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/math/math.h b/math/math.h
index add86af..60dfa31 100644
--- a/math/math.h
+++ b/math/math.h
@@ -486,7 +486,15 @@ enum
extern "C++" {
inline int issignaling (float __val) { return __issignalingf (__val); }
inline int issignaling (double __val) { return __issignaling (__val); }
-inline int issignaling (long double __val) { return __issignalingl (__val); }
+inline int
+issignaling (long double __val)
+{
+# ifdef __NO_LONG_DOUBLE_MATH
+ return __issignaling (__val);
+# else
+ return __issignalingl (__val);
+# endif
+}
# if __HAVE_DISTINCT_FLOAT128
inline int issignaling (_Float128 __val) { return __issignalingf128 (__val); }
# endif
--
2.9.5