nuttx-apps/interpreters
raiden00pl fa4a430080 interpreters/python: fix build for x86_64 targets built with the host gcc
NuttX x86_64 (qemu-intel64) builds with the native host gcc, which
exposed several host-environment leaks in the CPython cross build:

- Pass the -D/-U macro flags from CFLAGS as CPPFLAGS so
  preprocessor-only configure probes (Misc/platform_triplet.c) do not
  see the host's __linux__ and misdetect the platform as
  x86_64-linux-gnu, enabling Linux-only code such as the perf
  trampoline.

- Force linux/random.h and sys/xattr.h probes to no in config.site:
  NuttX provides neither, but a native toolchain resolves them against
  the host /usr/include.  The former drags host ioctl macros into
  posixmodule, the latter enables os xattr support with no xattr
  syscalls to link against.

- Disable _curses, _curses_panel, _dbm, _gdbm, _hashlib and _tkinter:
  their host libraries are discovered via pkg-config when the target
  compiler can compile host headers.  hashlib keeps working through
  the built-in HACL implementations.

- Only build _posixsubprocess when the arch has a real fork(): its
  vfork() support is only an optimization and the fork() fallback path
  (PyOS_BeforeFork/PyOS_AfterFork_*) is compiled unconditionally but
  declared only under HAVE_FORK.  This also fixes rv-virt:python,
  which became vfork-only after the fork/vfork split.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
2026-08-18 15:23:54 -03:00
..
bas interpreters: Fix spelling errors 2026-02-18 11:01:02 +01:00
berry cmake: Use NUTTX(_DIR/_BINARY_DIR) instead of CMAKE(_SOURCE_DIR/BINARY_DIR) 2026-08-09 10:43:01 -03:00
duktape interpreters: migrate to SPDX identifier 2024-12-21 13:53:10 +08:00
ficl interpreters: migrate to SPDX identifier 2024-12-21 13:53:10 +08:00
jimtcl cmake: Use NUTTX(_DIR/_BINARY_DIR) instead of CMAKE(_SOURCE_DIR/BINARY_DIR) 2026-08-09 10:43:01 -03:00
lua cmake: Use NUTTX(_DIR/_BINARY_DIR) instead of CMAKE(_SOURCE_DIR/BINARY_DIR) 2026-08-09 10:43:01 -03:00
luajit interpreters: migrate to SPDX identifier 2024-12-21 13:53:10 +08:00
luamodules interpreters: migrate to SPDX identifier 2024-12-21 13:53:10 +08:00
minibasic interpreters: Fix spelling errors 2026-02-18 11:01:02 +01:00
mquickjs interpreters: Add mquickjs JavaScript interpreter integration 2026-01-07 09:44:19 +08:00
python interpreters/python: fix build for x86_64 targets built with the host gcc 2026-08-18 15:23:54 -03:00
quickjs cmake: Use NUTTX(_DIR/_BINARY_DIR) instead of CMAKE(_SOURCE_DIR/BINARY_DIR) 2026-08-09 10:43:01 -03:00
toywasm toywasm: regen for v67.0.0 2025-04-13 11:31:36 +08:00
wamr cmake: Use NUTTX(_DIR/_BINARY_DIR) instead of CMAKE(_SOURCE_DIR/BINARY_DIR) 2026-08-09 10:43:01 -03:00
wasm3 interpreters: migrate to SPDX identifier 2024-12-21 13:53:10 +08:00
.gitignore Remove extra whitespace from files (#43) 2020-01-31 08:29:24 -06:00
CMakeLists.txt interpreters: migrate to SPDX identifier 2024-12-21 13:53:10 +08:00
Make.defs interpreters: migrate to SPDX identifier 2024-12-21 13:53:10 +08:00
Makefile interpreters: migrate to SPDX identifier 2024-12-21 13:53:10 +08:00