On Fri, 2017-01-13 at 13:24 +0000, Thomas Preudhomme wrote:
And here's the patch. Tested with full and partial retargeting as
well as no
retargeting.
I confirm - if I provide just some of the functions/objects, the
linking will fail with "multiple definition" error. Great!
Any chance for adding all locks used by newlib internally? These 4 are
missing from what I've seen:
newlib/libc/posix/telldir.c:__LOCK_INIT(static, dd_hash_lock);
newlib/libc/time/tzlock.c:__LOCK_INIT(static, __tz_lock_object);
newlib/libc/stdlib/quick_exit.c:__LOCK_INIT(static, atexit_mutex);
newlib/libc/stdlib/envlock.c:__LOCK_INIT_RECURSIVE(static, __env_lock_object);
I know these are not "popular", but nevertheless required. For example
time-zone locking is pulled by any function dealing with "local" time,
like a very useful mktime(). 4 bytes here or there is not such a big
deal (;