mirror of
https://github.com/openwrt/packages.git
synced 2026-01-10 11:44:48 +00:00
boost: Fix fiber compilation for mips
The issue was that the pause instruction was emitted through an asm
directive which was not correct for some mips platforms.
Simplified boost-fiber-exclude as a result.
Removed uClibc-ng math patch. It was not correct as it broke float and
long double support (std variants use function overloads). A different
solution was applied upstream. As it's quite annoying to backport, just
wait until a new release comes with that change. ARC as a platform is
barely supported anyways.
Swapped asio patch for the upstream submission, which is unfortunately, in
limbo.
Refreshed remaining patch.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry-picked from f795779c0a)
This commit is contained in:
28
libs/boost/patches/003-mips-pause.patch
Normal file
28
libs/boost/patches/003-mips-pause.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
From 5f7cda29add367c5381775a314ec9f90e311457a Mon Sep 17 00:00:00 2001
|
||||
From: Rosen Penev <rosenp@gmail.com>
|
||||
Date: Fri, 15 Nov 2019 12:43:50 -0800
|
||||
Subject: [PATCH] cpu_relax: Fix MIPS check
|
||||
|
||||
BOOST_ARCH_MIPS as a macro is totally broken. It always gets defined to either 32
|
||||
or 64 with a bunch of zeroes depending on the architecture.
|
||||
|
||||
Use GCC's internal define to check the architecture properly.
|
||||
|
||||
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
||||
---
|
||||
boost/fiber/detail/cpu_relax.hpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/boost/fiber/detail/cpu_relax.hpp b/boost/fiber/detail/cpu_relax.hpp
|
||||
index 72564394..f40545c2 100644
|
||||
--- a/boost/fiber/detail/cpu_relax.hpp
|
||||
+++ b/boost/fiber/detail/cpu_relax.hpp
|
||||
@@ -47,7 +47,7 @@ namespace detail {
|
||||
# else
|
||||
# define cpu_relax() asm volatile ("nop" ::: "memory");
|
||||
# endif
|
||||
-#elif BOOST_ARCH_MIPS
|
||||
+#elif BOOST_ARCH_MIPS && (__mips_isa_rev > 1)
|
||||
# define cpu_relax() asm volatile ("pause" ::: "memory");
|
||||
#elif BOOST_ARCH_PPC
|
||||
// http://code.metager.de/source/xref/gnu/glibc/sysdeps/powerpc/sys/platform/ppc.h
|
||||
Reference in New Issue
Block a user