Skip to content

23.x: [cpullvm] Add picolibc v1.8.12 overlay - #584

Closed
Jonathon Penix (jonathonpenix) wants to merge 3 commits into
qualcomm:release/qualcomm-software/23.xfrom
jonathonpenix:pr/23.x/picolibc_v1812_overlay
Closed

Jonathon Penix (jonathonpenix) wants to merge 3 commits into
qualcomm:release/qualcomm-software/23.xfrom
jonathonpenix:pr/23.x/picolibc_v1812_overlay

Conversation

@jonathonpenix

@jonathonpenix Jonathon Penix (jonathonpenix) commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Add a new C library variant for picolibc v1.8.12 (picolibc-v1812) and start building it as an overlay.

For now, this shares all the same variants as the main picolibc library.

picolibc v1.8.12 includes API-breaking changes to off_t, so this is intended to serve users on codebases that expect such changes (Zephyr, for example seems to getting ready to make changes to support picolibc v1.8.12).


Stacked on #582 #583

I'll bring #582 and #583 to the branch once they're merged in qualcomm-software.

This also needs #595--I'll again bring that to the branch once they're merged in qualcomm-software.

This also also needs #598 for everything to pass.

I'm not going to stack #595 and #598 at this point, will wait for things to start merging.

dcandler and others added 2 commits August 6, 2026 21:43
The minimum version of meson required by picolibc has been increased to
0.61, and so the PICOLIBC_TEST hack to enable builds on older versions
has been removed from upstream test scripts. The scripts used by ATfE
still expected this variable to be set, and so this has now also been
removed to match.

In order to continue to set stdin to /dev/null, this is now done in the
run_qemu script.

(cherry picked from commit 779e73e74ff8c9c15fe5dd95e046c9665655d580)

---

This is a cherry-pick from ATfE [1]. Our "main" picolibc doesn't need
this, but this will be needed by our soon-to-be-added picolibc v1.8.12
overlay as [2] is present in that version (which removes the support
for `PICOLIBC_TEST`).

This is safe for us to do in cpullvm with picolibc versions before
the meson minimum requirement bump in picolibc [3] as cpullvm needs
meson >= 1.9.0 anyway (for eld support in meson).

[1] arm/arm-toolchain@779e73e
[2] picolibc/picolibc@45dde90
[3] picolibc/picolibc@33065fe

Signed-off-by: Jonathon Penix <jpenix@qti.qualcomm.com>
Note that this is derived from a commit in ATfE [1].

[2] in picolibc introduced a new `--args <string>` option to pass arguments
into tests rather than just passing them through as extra individual arguments.
[2] isn't present in our "main" picolibc, but will be in our soon-to-be-added
picolibc v1.8.12 overlay.

Which, causes a bit of a wrinkle--we need to support both picolibc's old and
new way of handling these arguments. To do so, I think we can just leave both
bits in--older picolibcs don't use `--args`, newer picolibc versions seem to
only use `--args` (and not pass in extra arguments).

That said, `argparse.REMAINDER` needs to change as otherwise it will eat what
is passed in after the last positional argument (which is how picolibc passes
in `--args`).  Instead, use `parse_known_args()` and feed whatever is unknown
into the program.  There's a small risk of possible conflicts (picolibc using
an argument that matches one in our wrapper, a prefix matching, etc.) but I
think the risk of that should be fairly small.

[1] arm/arm-toolchain@3e28dfd
[2] picolibc/picolibc@295b450

Signed-off-by: Jonathon Penix <jpenix@qti.qualcomm.com>
Two primary issues to sort out:
* The xqci memcpy patches need to be rebased and added
* There's a few picolibc tests that are xpassing that need to be
  investigated/fixed.

Signed-off-by: Jonathon Penix <jpenix@qti.qualcomm.com>
@jonathonpenix

Copy link
Copy Markdown
Contributor Author

Going to close this--I removed the extra stacking in the mainline commit, so I'll just cherry-pick to the branch directly rather than rebase, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants