Open Fabrizio-Caruso opened 5 years ago
The obvious solution is to simply build multiple copies of printf/scanf with different sets of options into their own library, and then let the user select which one they want at link time. I suspect it might not even be very hard. Let me think about that.
Hi David! Thanks for the recent progress! I was just proposing the solution other dev-kits use (such as Z88DK). They just have one library which is rebuilt if some pragmas/options are passed. You cannot take into account the exponential number of combinations unless you restrict yourself to just 2 or 3 options.
Anyway, any solution that can reduce the size of the binary for 8-bit targets is great. The rest is just details.
The CP/M is barely usable with the standard library because (if I understand well) the libraries are not rebuilt dynamicly but simply linked entirely when used by the code.
Other 8-bit compilers (such as Z88DK), use pragmas to exclude portions of the standard library such as for example:
The library arre then rebuilt on the fly without the unnecessary features.
Would a similar solution be possible?