[Picolibc] Integrating Picolibc into a GCC toolchain

R. Diez rdiezmail-newlib at yahoo.de
Sat Feb 19 12:25:41 PST 2022


> That's looking quite usable. Would you be willing to release that under
> the BSD license used by most of newlib?
> [...]

I would rather keep it AGPLv3.


> [...]
> To do that, we'll need settings for c_ld, exe_wrapper and c_link_args.

I can add those settings, but I have some questions first.


For c_link_args, I can add an option '--lflag' to my script that works in the same way as '--cflag'.

Do you have an example? Your 340-picolibc.sh script does not use this setting.

I guess that it has to go under [built-in options] now, instead of [properties]. It is not clearly documented, which is becoming an annoying pattern for Meson cross-compilation.


Initially, I thought that these other settings would be as follow (taken from the Meson documentation):

c_ld = 'lld'
exe_wrapper = 'wine'

But I saw in scripts/cross-arm-none-eabi.txt that exe_wrapper can be an array like this:

exe_wrapper = ['sh', '-c', 'test -z "$MESON_SOURCE_ROOT" || "$MESON_SOURCE_ROOT"/scripts/run-arm "$@"', 'run-arm']

That possibility not documented anywhere in Meson. Or did I miss it?

I guess I can add an option called '--exewrap', but that is going to be cumbersome to use:

--exewrap 'sh'
--exewrap '-c'
--exewrap 'test -z "$MESON_SOURCE_ROOT" || "$MESON_SOURCE_ROOT"/scripts/run-arm "$@"'
--exewrap 'run-arm'

Is that OK? I haven't figured out yet how to test it at the moment on my system.

I guess I should automatically add "needs_exe_wrapper = true" if option exe_wrapper is present.


Is that the same for c_ld? Or does it have to be a single string, and then Meson adds c_link_args? Again, it is not documented whether c_ld could be an array, like the others. Maybe you could test it on your system.


Regards,
   rdiez


More information about the Picolibc mailing list