[Patch] (2/n) newlib: Move vasniprintf.c to ELIX 1 (was: Build-dependency issues with ELIX_LEVEL)

Tobias Burnus tobias@codesourcery.com
Wed Mar 30 10:56:47 GMT 2022

Attached is a revised version of the patch in the first email in the thread.
Found when looking for referenced but not provided functions
with nvptx, which sets ELIX Level to 1.

libc/stdio/vdiprintf.c's _vdiprintf_r calls _vasniprintf_r
The file is compiled with ELIX Level 1.

The function _vasniprintf_r is provided either via
* libc/stdio/vasniprintf.c which calls _svfiprintf_r
* libc/stdio/vasnprintf.c (only '#ifdef _NANO_FORMATTED_IO')
   which calls _svfprintf_r

We can ignore the second file as no NANO function calls
it. Thus, only the first file (vasniprintf.c) remains.

The _svfiprintf_r / _svfiprintf_r are provided by
Those files are also available with ELIX Level 1.

Solution: Also build vasniprintf.c with ELIX Level 1
instead of building it with ELIX Level 4.

The change should be save as the only library call I see
in that file (vasniprintf.c) is to vfprintf.c. And on the
caller side, the call to _vasniprintf_r is not guarded by
any #if. Thus, no new dependencies should get introduced
by this change.

OK? Comments?

(Makefile.inc patch + regenerated Makefile.in as separate patch)
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-newlib-Move-vasniprintf.c-to-ELIX-1.patch
Type: text/x-patch
Size: 1265 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/newlib/attachments/20220330/c910c01f/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: re-gen-Makefile.in.diff
Type: text/x-patch
Size: 11455 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/newlib/attachments/20220330/c910c01f/attachment-0003.bin>

More information about the Newlib mailing list