circuitpython/tools
Alessandro Gatti b63e528076 examples/natmod/btree: Fix build on RV32 with Picolibc.
This commit fixes building the "btree" example natmod on RV32 when
Picolibc is being used and uses thread-local storage for storing the
errno variable.

The fix is surprisingly simple: Picolibc allows overriding the function
that will provide a pointer to the "errno" variable, and the btree
natmod integration code already has all of this machinery set up as part
of its library integration.  Redirecting Picolibc to the already
existing pointer provider function via a compile-time definition is
enough to let the module compile and pass QEMU tests.

This workaround will work on any Picolibc versions (Arm, RV32, Xtensa,
etc.) even if TLS support was not enabled to begin with, and will
effectively do nothing if the toolchain used will rely on Newlib to
provide standard C library functions.

Given that the btree module now builds and passes the relevant natmod
tests, said module is now part of the QEMU port's natmod testing
procedure, and CI now will build the btree module for RV32 as part to
its checks.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2025-07-20 23:03:40 +10:00
..
autobuild tools/autobuild: Build alif boards as part of auto-build. 2025-06-26 13:25:37 +10:00
mpremote tools/mpremote: Support OSError's on targets without errno. 2025-07-08 21:52:56 +10:00
.gitattributes micropython-upip: Mark as binary file and re-commit. 2015-06-06 23:09:23 +03:00
ar_util.py tools/mpy_ld.py: Allow linking static libraries. 2025-03-17 13:03:27 +11:00
boardgen.py tools/boardgen.py: Ensure board pin locals_dict has consistent order. 2025-06-10 11:09:14 +10:00
cc1 tools: Add C middle-processor to make builtin tables proper hash tables. 2015-12-31 00:24:33 +00:00
ci.sh examples/natmod/btree: Fix build on RV32 with Picolibc. 2025-07-20 23:03:40 +10:00
codeformat.py nrf/modules/machine: Enable code formatting. 2024-03-26 12:49:09 +11:00
codestats.sh all: Prune trailing whitespace. 2024-03-07 16:25:17 +11:00
dfu.py tools/dfu.py: Make tool work with python3 when parsing DFU files. 2021-11-01 15:46:59 +11:00
file2h.py all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
gen-changelog.sh tools/gen-changelog.sh: Exclude "-preview" tags from generated log. 2024-01-05 15:06:14 +11:00
gen-cpydiff.py tools/gen-cpydiff.py: Ensure every item has at least 2 TOC levels. 2025-05-16 11:52:03 +10:00
hci_trace_to_pcap.py extmod/modbluetooth: Make all HCI transports trace in the same format. 2023-04-26 11:37:20 +10:00
insert-usb-ids.py all: Fix strings with backslash by using raw string literals. 2023-05-02 11:55:02 +10:00
makemanifest.py tools/makemanifest.py: Generate working code for empty manifests. 2024-06-05 14:07:26 +02:00
manifestfile.py tools/manifestfile.py: Fix freeze() when script is an empty iterable. 2024-03-25 13:41:37 +11:00
metrics.py tools/metrics.py: Add VIRT_RV32 to the code size metrics. 2024-09-23 13:03:26 +10:00
mpy-tool.py tools/mpy-tool.py: Support calling main() from an external script. 2025-03-05 16:02:08 +11:00
mpy_bin2res.py tools/mpy_bin2res: Tools to convert binary resources to Python module. 2017-07-27 14:41:27 +03:00
mpy_cross_all.py all: Remove MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE. 2021-09-16 16:04:03 +10:00
mpy_ld.py tools/mpy_ld.py: Support R_ARM_ABS32 relocation in text. 2025-06-10 13:40:11 +10:00
pyboard.py tools/pyboard.py: Align execpty prefix. 2025-07-20 22:59:06 +10:00
pydfu.py all: Upgrade to ruff v0.9.6. 2025-02-25 13:02:49 +01:00
uf2conv.py all: Fix strings with backslash by using raw string literals. 2023-05-02 11:55:02 +10:00
uf2families.json tools/uf2conv.py: Update to latest version. 2022-02-02 23:43:58 +11:00
uncrustify.cfg all: Fix spelling mistakes based on codespell check. 2023-04-27 18:03:06 +10:00
verifygitlog.py tools/verifygitlog.py: Allow long co-author and sign-off names. 2025-05-15 13:03:11 +10:00