diff options
author | Chen Tao <t.clydechen@gmail.com> | 2022-06-27 17:13:18 +0900 |
---|---|---|
committer | Chris Packham <judge.packham@gmail.com> | 2022-06-28 20:54:26 +1200 |
commit | 75c8a08a3ae59c27177d98d9d54c4c246b301da2 (patch) | |
tree | 1e01e8fb83d63a1e431c256062cd5e14cd247693 /config/libc | |
parent | b9ee00e3cb1a43b8a7f84b8a1463e0e1f60fa2e5 (diff) | |
download | crosstool-ng-75c8a08a3ae59c27177d98d9d54c4c246b301da2.tar.gz crosstool-ng-75c8a08a3ae59c27177d98d9d54c4c246b301da2.tar.bz2 crosstool-ng-75c8a08a3ae59c27177d98d9d54c4c246b301da2.zip |
newlib: fix conflicting configure options
Configuring the newlib with "--enable-newlib-nano-formatted-io" and
"--enable-newlib-io-pos-args" would cause built GCC cannot compile some
IO functions like "std::cout".
And I added additional notes at Nano Formatted I/O config.
Signed-off-by: Chen Tao <t.clydechen@gmail.com>
Diffstat (limited to 'config/libc')
-rw-r--r-- | config/libc/newlib.in | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/config/libc/newlib.in b/config/libc/newlib.in index f1cb29be..7bba2293 100644 --- a/config/libc/newlib.in +++ b/config/libc/newlib.in @@ -55,6 +55,7 @@ config LIBC_NEWLIB_IO_LDBL config LIBC_NEWLIB_IO_POS_ARGS bool prompt "Enable printf-family positional arg support" + depends on !LIBC_NEWLIB_NANO_FORMATTED_IO help Enable printf-family positional arg support. @@ -199,6 +200,29 @@ config LIBC_NEWLIB_NANO_FORMATTED_IO with size constraint issues. This option does not affect wide-char formatted I/O functions. + Some notes about this feature: + 1) Floating-point support is split out of the formatted I/O code into + weak functions which are not linked by default. Programs that need + floating-point I/O support must explicitly request linking of one or + both of the floating-point functions: _printf_float or _scanf_float. + This can be done at link time using the -u option which can be passed + to either gcc or ld. + + 2) The following configuration options are ignored for non-wide-char + formatted I/O functions, and can be thought of as disabled. + + "Enable printf-family positional arg support" + "Enable IOs on C99 formats" + "Enable IOs on long long" + "Enable IOs on long doubles" + + Additionally, "Enable IOs on floats and doubles" is supported in this + specific implementation, one can disable it to further reduce code size. + In this case, the floating-point specifiers will not be recognized or + handled, and the -u option will not work either. + + Learn more: https://sourceware.org/newlib/README + config LIBC_NEWLIB_EXTRA_CONFIG_ARRAY string prompt "Extra config for newlib" |