Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(repo/packages/m/micropython/xmake.lua): fix building error #36

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions repo/packages/m/micropython/patches/1.20.0/02_fix_gcc13.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/py/stackctrl.c b/py/stackctrl.c
index c2f3adb5eedc..c2566ebad92b 100644
--- a/py/stackctrl.c
+++ b/py/stackctrl.c
@@ -28,8 +28,15 @@
#include "py/stackctrl.h"

void mp_stack_ctrl_init(void) {
+ #if __GNUC__ >= 13
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wdangling-pointer"
+ #endif
volatile int stack_dummy;
MP_STATE_THREAD(stack_top) = (char *)&stack_dummy;
+ #if __GNUC__ >= 13
+ #pragma GCC diagnostic pop
+ #endif
}

void mp_stack_set_top(void *top) {
3 changes: 3 additions & 0 deletions repo/packages/m/micropython/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ do
add_patches("1.20.0", path.join(os.scriptdir(), "patches", "1.20.0", "01_adapt_smart.diff"),
"d0eb05d02339977f9c5771dcc81d2a616962ec57cb4d272fe8da3b8b22cc830c")

add_patches("1.20.0", path.join(os.scriptdir(), "patches", "1.20.0", "02_fix_gcc13.diff"),
"3b9ac8febc3582c8c914c9c8f53340a78b417c7d707aafd8c63585b34fa55454")

add_configs("shared", {
description = "Build shared library.",
default = os.getenv("RT_XMAKE_LINK_TYPE") ~= "static",
Expand Down