Skip to content

Commit 19827a7

Browse files
committed
python-greenlet: update to 3.3.0
Add patch fixing MIPS compilation. Removed MIPS16 hacks as a result. They didn't work anyway. Signed-off-by: Rosen Penev <rosenp@gmail.com>
1 parent 65f8f23 commit 19827a7

File tree

2 files changed

+41
-11
lines changed

2 files changed

+41
-11
lines changed

lang/python/python-greenlet/Makefile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,20 @@
88
include $(TOPDIR)/rules.mk
99

1010
PKG_NAME:=python-greenlet
11-
PKG_VERSION:=3.2.4
11+
PKG_VERSION:=3.3.0
1212
PKG_RELEASE:=1
1313

1414
PYPI_NAME:=greenlet
15-
PKG_HASH:=0dca0d95ff849f9a364385f36ab49f50065d76964944638be9691e1832e9f86d
15+
PKG_HASH:=a82bb225a4e9e4d653dd2fb7b8b2d36e4fb25bc0165422a11e48b88e9e6f78fb
1616

1717
PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
1818
PKG_LICENSE:=MIT
1919
PKG_LICENSE_FILES:=LICENSE
20-
# FIXME: remove when GCC10 is the oldest supported compiler, or the issue goes away
21-
PKG_BUILD_FLAGS:=no-mips16
20+
21+
PKG_BUILD_DEPENDS:= \
22+
python3/host \
23+
python-setuptools/host \
24+
python-wheel/host
2225

2326
HOST_BUILD_DEPENDS:= \
2427
python3/host \
@@ -50,13 +53,6 @@ define Package/python3-greenlet/description
5053
a version of CPython that supports micro-threads called tasklets.
5154
endef
5255

53-
# FIXME: remove when GCC10 is the oldest supported compiler, or the issue goes away
54-
# This is required in addition to PKG_BUILD_FLAGS:=no-mips16 because otherwise MIPS16
55-
# flags are inherited from the Python base package (via sysconfig module)
56-
ifdef CONFIG_USE_MIPS16
57-
TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16
58-
endif
59-
6056
$(eval $(call Py3Package,python3-greenlet))
6157
$(eval $(call BuildPackage,python3-greenlet))
6258
$(eval $(call BuildPackage,python3-greenlet-src))
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From 7bb5561b5dc93e0ba65c5e9279015d48593ae9fe Mon Sep 17 00:00:00 2001
2+
From: Rosen Penev <rosenp@gmail.com>
3+
Date: Wed, 7 Jan 2026 19:23:22 -0800
4+
Subject: [PATCH] fix compilation under MIPS and newer binutils
5+
6+
addu needs 3 parameters, not two.
7+
8+
Signed-off-by: Rosen Penev <rosenp@gmail.com>
9+
---
10+
src/greenlet/platform/switch_mips_unix.h | 5 +++--
11+
1 file changed, 3 insertions(+), 2 deletions(-)
12+
13+
--- a/src/greenlet/platform/switch_mips_unix.h
14+
+++ b/src/greenlet/platform/switch_mips_unix.h
15+
@@ -16,6 +16,7 @@
16+
17+
#define REGS_TO_SAVE "$16", "$17", "$18", "$19", "$20", "$21", "$22", \
18+
"$23", "$30"
19+
+__attribute__((nomips16))
20+
static int
21+
slp_switch(void)
22+
{
23+
@@ -33,9 +34,9 @@ slp_switch(void)
24+
SLP_SAVE_STATE(stackref, stsizediff);
25+
__asm__ __volatile__ (
26+
#ifdef __mips64
27+
- "daddu $29, %0\n"
28+
+ "daddu $29, $29, %0\n"
29+
#else
30+
- "addu $29, %0\n"
31+
+ "addu $29, $29, %0\n"
32+
#endif
33+
: /* no outputs */
34+
: "r" (stsizediff)

0 commit comments

Comments
 (0)