makefiles/feature_precheck: check libc availability prior deciding usage
Contribution description
Add a feature pre-check for picolibc and newlibc into the make process
Testing procedure
make things with either having or not having picolibc or newlib installed
Issues/PRs references
Fixes #15325
@maribu , @nmeum , @benpicco : might what to have a look at it
NACK, didn't look at the other changes yet, but I'm against moving the include order.
@kfessel can you explain the reasoning for this change better?
will rebase to solve for conflicting change in master
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.
So this can be used to opportunistically enable picolibc and fall back to newlib if it's not installed?
So this can be used to opportunistically enable picolibc and fall back to newlib if it's not installed?
yes this was the intention
the stall:bot is digging deep :nice:
without picolibc-arm... on the system:
examples/gnrc_minimal$ BOARD=nucleo-f767zi make
Building application "gnrc_minimal" for "nucleo-f767zi" with MCU "stm32".
picolibc was selected to be build but no picolibc.spec could be found
you might want to install picolibc for arm-none-eabi
or add FEATURES_BLACKLIST += picolibc to Makefile)
check your installation or build configuration.
make: *** [../RIOT-master/makefiles/libc/picolibc.mk:21: _missing-picolibc] Error 1
since #16008 got merged is at least failing loud providing a kinda fix
with this PR it would just fallback to use newlibc
Can you give it a rebase?
My change requests still stand here.
Thinking about this again I'm still against it, if we change to have picolibc enabled by default then picolibc would become a dependency of RIOT, we don't blacklist native because libcan is not there, either install it or don't use it.
If we move to picolibc as default then what we can do is check if it's installed and if not add a warning that it should be installed or FEATURES_REQUIRED += newlib added to their application Makefile or RIOT_MAKEFILES_GLOBAL_PRE. If you don't want to install everything there is always the docker path.
Features so far are all declarative, I do not see the need to change because of picolibc, neither do I think its a good idea.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.