diff options
author | FreeArtMan <dos21h@gmail.com> | 2023-08-31 10:07:55 +0100 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2023-08-31 10:07:55 +0100 |
commit | 95ea03431757a829f0018b2950519add508d2629 (patch) | |
tree | 497cd701558e21c58c4c447322e7a5caa5edafa3 /create_tools/config | |
parent | b45185d2a439802d6bf2cd0b0a8b0cd4cfea1b53 (diff) | |
download | os201-95ea03431757a829f0018b2950519add508d2629.tar.gz os201-95ea03431757a829f0018b2950519add508d2629.zip |
Add micropython building script
Diffstat (limited to 'create_tools/config')
-rw-r--r-- | create_tools/config/0001-Mod-micropython.patch | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/create_tools/config/0001-Mod-micropython.patch b/create_tools/config/0001-Mod-micropython.patch new file mode 100644 index 0000000..0df5d8e --- /dev/null +++ b/create_tools/config/0001-Mod-micropython.patch @@ -0,0 +1,82 @@ +From bd97b42bdae5685571eaeb077232500c6dfd6234 Mon Sep 17 00:00:00 2001 +From: Arturs Artamonovs <dos21h@gmail.com> +Date: Thu, 31 Aug 2023 09:25:05 +0100 +Subject: [PATCH] Mod micropython + +--- + ports/unix/Makefile | 8 ++++---- + ports/unix/mpconfigport.mk | 6 +++--- + py/stackctrl.c | 2 ++ + 3 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/ports/unix/Makefile b/ports/unix/Makefile +index 403405dcc..116b9f658 100644 +--- a/ports/unix/Makefile ++++ b/ports/unix/Makefile +@@ -44,9 +44,9 @@ INC += -I$(TOP) + INC += -I$(BUILD) + + # compiler settings +-CWARN = -Wall -Werror ++CWARN = -Wall + CWARN += -Wextra -Wno-unused-parameter -Wpointer-arith -Wdouble-promotion -Wfloat-conversion +-CFLAGS += $(INC) $(CWARN) -std=gnu99 -DUNIX $(COPT) -I$(VARIANT_DIR) $(CFLAGS_EXTRA) ++CFLAGS += $(INC) $(CWARN) -std=gnu99 -DUNIX $(COPT) -I$(VARIANT_DIR) $(CFLAGS_EXTRA) -static + + # Debugging/Optimization + ifdef DEBUG +@@ -102,10 +102,10 @@ else + CC = clang + endif + # Use clang syntax for map file +-LDFLAGS_ARCH = -Wl,-map,$@.map -Wl,-dead_strip ++LDFLAGS_ARCH = -Wl,-map,$@.map -Wl,-dead_strip -static + else + # Use gcc syntax for map file +-LDFLAGS_ARCH = -Wl,-Map=$@.map,--cref -Wl,--gc-sections ++LDFLAGS_ARCH = -Wl,-Map=$@.map,--cref -Wl,--gc-sections -static + endif + LDFLAGS += $(LDFLAGS_MOD) $(LDFLAGS_ARCH) -lm $(LDFLAGS_EXTRA) + +diff --git a/ports/unix/mpconfigport.mk b/ports/unix/mpconfigport.mk +index ce6183c13..11fbbb7b2 100644 +--- a/ports/unix/mpconfigport.mk ++++ b/ports/unix/mpconfigport.mk +@@ -18,10 +18,10 @@ MICROPY_PY_THREAD = 1 + MICROPY_PY_TERMIOS = 1 + + # Subset of CPython socket module +-MICROPY_PY_SOCKET = 1 ++MICROPY_PY_SOCKET = 0 + + # ffi module requires libffi (libffi-dev Debian package) +-MICROPY_PY_FFI = 1 ++MICROPY_PY_FFI = 0 + + # ussl module requires one of the TLS libraries below + MICROPY_PY_USSL = 1 +@@ -37,7 +37,7 @@ MICROPY_PY_JNI = 0 + + # Avoid using system libraries, use copies bundled with MicroPython + # as submodules (currently affects only libffi). +-MICROPY_STANDALONE = 0 ++MICROPY_STANDALONE = 1 + + MICROPY_ROM_TEXT_COMPRESSION = 1 + +diff --git a/py/stackctrl.c b/py/stackctrl.c +index c2f3adb5e..4675532ad 100644 +--- a/py/stackctrl.c ++++ b/py/stackctrl.c +@@ -27,6 +27,8 @@ + #include "py/runtime.h" + #include "py/stackctrl.h" + ++#pragma GCC diagnostic ignored "-Wdangling-pointer=1" ++ + void mp_stack_ctrl_init(void) { + volatile int stack_dummy; + MP_STATE_THREAD(stack_top) = (char *)&stack_dummy; +-- +2.42.0 + |