cpu: cortexm: make newlib a default module#10767
cpu: cortexm: make newlib a default module#10767kaspar030 wants to merge 3 commits intoRIOT-OS:masterfrom
Conversation
|
To be more precise, this does really disable newlib, only the bindings to the system calls (which are not "system calls" in RIOT really.) I'm trying to achieve the same, but in a more granular way, in #9258. Many applications will not be able to remove their dependencies on all syscalls, but they can still benefit from not including certain parts. |
Yup. Useful for chopping off unused fat, or possibly using a slimmer libc, or ... |
|
Can you give a testing procedure for the NEW possible usage? |
|
If it should be used to select a different So I am interested at seeing the usage. Also right now, when not setting |
Add On master, you'll get the usual "EXPECT ERRORS" warning. There even seems to be some effect on code size, but that must be accidental. Size: This is the output of Note newlib*, stdio_uart and periph_uart. With this PR (and the same modified Makefile): Size: info-modules: Note the absence of newlib*, stdio_uart and periph_uart. |
Actually with our toolchains, newlib is the default. By disabling the newlib module, what actually happens is that RIOT's newlib support code (the syscalls) and their dependency don't get built/linked.
Agreed, but IMO that would be a next step. |
Oh, OK, good to know. I think we need a test to show that a functioning application can be built without newlib, and that newlib itself is not being included (i.e. that the change is effective). For the second point, maybe verify that newlib init stuff is not the symbols in the elf file. |
I've added a commit disabling newlib for the bootloader. This is before (on samr21-xpro): This is after: @basilfx can you give this a try on efm32? |
|
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. |
ae7182a to
cf16071
Compare
I have 1 |
|
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. |
|
ping @kaspar030 are you still interested in this one? |
|
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. |
Obviously not... |
Contribution description
Currently, newlib is always selected using
USEMODULEfor all Cortex-M.This PR turns it into
DEFAULT_MODULE. The advantage is that now it can be disabled on-demand usingDISABLE_MODULE.Testing procedure
CI compiling successfully should be fine.
Issues/PRs references
With #10744, this allows deployments without newlib altogether in some cases.