boost: fixup mips64 fiber patch
authorRosen Penev <rosenp@gmail.com>
Wed, 24 Mar 2021 22:53:20 +0000 (15:53 -0700)
committerRosen Penev <rosenp@gmail.com>
Fri, 26 Mar 2021 19:35:17 +0000 (12:35 -0700)
It turns out that this is also broken on mips64el. Further testing
reveals that

-mips32r2 -mtune=mips32r2 -mabi=32

compiles the PAUSE instruction just fine whereas

-mips64r2 -mtune=mips64r2 -mabi=64

does not. The PAUSE instruction was introduced in version 2.6 of the
MIPS ISA and GCC for some reason does not allow usage of it with MIPS64.
Modify the macro to fix the situation instead of just matching on
octeon, which is not quite correct.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/boost/Makefile
libs/boost/patches/020-mips64-fiber.patch

index a39680e5bfece9f49c57d8d5b60a46ac60994abe..04052dcbbfcb498b9b91817cb85e64638987caf5 100644 (file)
@@ -13,7 +13,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=boost
 PKG_VERSION:=1.75.0
 PKG_SOURCE_VERSION:=1_75_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/
index 33be4c27e146ffac0b59ee00b2220647f1b25253..10d46d88b25a04b7be0bd0b749f247f0d608c2bc 100644 (file)
@@ -5,7 +5,7 @@
  #  define cpu_relax() asm volatile ("nop" ::: "memory");
  # endif
 -#elif BOOST_ARCH_MIPS && (__mips_isa_rev > 1)
-+#elif BOOST_ARCH_MIPS && (__mips_isa_rev > 1) && !defined(_MIPS_ARCH_OCTEONP)
++#elif BOOST_ARCH_MIPS && (((__mips_isa_rev > 1) && defined(__mips32)) || ((__mips_isa_rev > 2)  && defined(__mips64)))
  # 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