mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-17 15:32:21 +08:00
interpreters/python: Add Python's port to NuttX
This is the NuttX's port of Python (cpython)! Initial support of Python includes building the Python's static library and the `python` (Programs/python.c) application. Python's modules are stored in `pyc` (byte-code file) and loaded as needed from flash.
This commit is contained in:

committed by
Alan C. Assis

parent
9d7714f843
commit
efc1bf710c
@@ -0,0 +1,60 @@
|
||||
From 1bb8d824a4b4e4b38c3541b7c26c5d71f0970266 Mon Sep 17 00:00:00 2001
|
||||
From: Ivan Grokhotkov <ivan@espressif.com>
|
||||
Date: Wed, 23 Oct 2024 16:55:53 +0200
|
||||
Subject: [PATCH 04/10] recognize *-*-nuttx as a supported OS
|
||||
|
||||
cpython's configure script bails out when cross-compiling for an
|
||||
unknown OS, so we have to add "nuttx" to the list, even though it
|
||||
is not used almost anywhere else.
|
||||
|
||||
Co-authored-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
|
||||
---
|
||||
config.sub | 2 +-
|
||||
configure | 3 +++
|
||||
configure.ac | 3 +++
|
||||
3 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/config.sub b/config.sub
|
||||
index 1bb6a05dc11..2a87d3e0ddb 100755
|
||||
--- a/config.sub
|
||||
+++ b/config.sub
|
||||
@@ -1769,7 +1769,7 @@ case $os in
|
||||
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
|
||||
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
|
||||
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
|
||||
- | fiwix* | mlibc* | cos* | mbr* | ironclad* )
|
||||
+ | fiwix* | mlibc* | cos* | mbr* | ironclad* | nuttx* )
|
||||
;;
|
||||
# This one is extra strict with allowed versions
|
||||
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
|
||||
diff --git a/configure b/configure
|
||||
index 7cdd386c387..6da5e9f3832 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -4527,6 +4527,9 @@ printf "%s\n" "$IPHONEOS_DEPLOYMENT_TARGET" >&6; }
|
||||
wasm32-*-* | wasm64-*-*)
|
||||
_host_ident=$host_cpu
|
||||
;;
|
||||
+ *-*-nuttx*)
|
||||
+ _host_ident=$host_cpu
|
||||
+ ;;
|
||||
*)
|
||||
# for now, limit cross builds to known configurations
|
||||
MACHDEP="unknown"
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 24e28a1e2de..80d6738fab5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -777,6 +777,9 @@ if test "$cross_compiling" = yes; then
|
||||
wasm32-*-* | wasm64-*-*)
|
||||
_host_ident=$host_cpu
|
||||
;;
|
||||
+ *-*-nuttx*)
|
||||
+ _host_ident=$host_cpu
|
||||
+ ;;
|
||||
*)
|
||||
# for now, limit cross builds to known configurations
|
||||
MACHDEP="unknown"
|
||||
--
|
||||
2.46.1
|
||||
|
Reference in New Issue
Block a user