Skip to content

Commit 5a0d15a

Browse files
authored
Merge pull request #36 from 1ridic/fix-micropython
fix(repo/packages/m/micropython/xmake.lua): fix building error
2 parents 161cc65 + 791ef38 commit 5a0d15a

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff --git a/py/stackctrl.c b/py/stackctrl.c
2+
index c2f3adb5eedc..c2566ebad92b 100644
3+
--- a/py/stackctrl.c
4+
+++ b/py/stackctrl.c
5+
@@ -28,8 +28,15 @@
6+
#include "py/stackctrl.h"
7+
8+
void mp_stack_ctrl_init(void) {
9+
+ #if __GNUC__ >= 13
10+
+ #pragma GCC diagnostic push
11+
+ #pragma GCC diagnostic ignored "-Wdangling-pointer"
12+
+ #endif
13+
volatile int stack_dummy;
14+
MP_STATE_THREAD(stack_top) = (char *)&stack_dummy;
15+
+ #if __GNUC__ >= 13
16+
+ #pragma GCC diagnostic pop
17+
+ #endif
18+
}
19+
20+
void mp_stack_set_top(void *top) {

repo/packages/m/micropython/xmake.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ do
3232
add_patches("1.20.0", path.join(os.scriptdir(), "patches", "1.20.0", "01_adapt_smart.diff"),
3333
"d0eb05d02339977f9c5771dcc81d2a616962ec57cb4d272fe8da3b8b22cc830c")
3434

35+
add_patches("1.20.0", path.join(os.scriptdir(), "patches", "1.20.0", "02_fix_gcc13.diff"),
36+
"3b9ac8febc3582c8c914c9c8f53340a78b417c7d707aafd8c63585b34fa55454")
37+
3538
add_configs("shared", {
3639
description = "Build shared library.",
3740
default = os.getenv("RT_XMAKE_LINK_TYPE") ~= "static",

0 commit comments

Comments
 (0)