raiden00pl opened a new pull request, #3734:
URL: https://github.com/apache/nuttx-apps/pull/3734
## Summary
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.
## Impact
python on intel64 works
## Testing
qemu intel64 with:
```
qemu-system-x86_64 -m 2G -cpu host -enable-kvm -smp 4 \
-kernel nuttx -nographic -serial mon:stdio \
-device e1000,netdev=u0 -netdev user,id=u0
```
<img width="1220" height="1500" alt="image"
src="https://github.com/user-attachments/assets/721ad7b1-4668-41ac-8381-e8f639ef741e"
/>
not tested yet on bare-metal intel64 HW.
rv-virt:python tested with the same python commands.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]