From: "Richard Earnshaw (lists)" <Richard.Earnshaw@arm.com>
To: Torbjorn SVENSSON <torbjorn.svensson@foss.st.com>,
Newlib <newlib@sourceware.org>
Subject: Re: undefined reference to __ssputws_r with --specs=nano.specs
Date: Mon, 19 Feb 2024 16:20:03 +0000 [thread overview]
Message-ID: <bfb6dc60-4b68-4ef1-872c-803b60d19bb5@arm.com> (raw)
In-Reply-To: <d5df5758-30c9-42f1-9fb5-761335ab7fe9@foss.st.com>
On 15/02/2024 15:19, Torbjorn SVENSSON wrote:
> Hi again,
>
> Anyone having some insights on the below question?
>
> Kind regards,
> Torbjörn
>
> On 2024-02-06 18:40, Torbjorn SVENSSON wrote:
>> Hi,
>>
>> I noticed that a lot of testcases fails when running the GCC testsuite with --specs=nano.specs.
>> Below is an example that fails with --specs=nano.specs:
>>
>> $ /build/13-head-bin/bin/arm-none-eabi-g++ /build/gcc13_src/gcc/testsuite/g++.dg/coroutines/pr100611.C -std=c++20 --specs=nosys.specs -o /dev/null --specs=nano.specs
>> /build/13-head-bin/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /build/13-head-bin/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/libc_nano.a(libc_a-svfwprintf.o): in function `_svfwprintf_r':
>> (.text._svfwprintf_r+0xd8): undefined reference to `__ssputws_r'
>> /build/13-head-bin/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: (.text._svfwprintf_r+0x834): undefined reference to `__ssputws_r'
>> /build/13-head-bin/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: (.text._svfwprintf_r+0x85c): undefined reference to `__ssputws_r'
>> /build/13-head-bin/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: (.text._svfwprintf_r+0x8a8): undefined reference to `__ssputws_r'
>> /build/13-head-bin/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: (.text._svfwprintf_r+0x8dc): undefined reference to `__ssputws_r'
>> /build/13-head-bin/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /build/13-head-bin/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/libc_nano.a(libc_a-svfwprintf.o):(.text._svfwprintf_r+0x900): more undefined references to `__ssputws_r' follow
>> collect2: error: ld returned 1 exit status
>>
>>
>> The newlib nano is configured with:
>>
>> --disable-newlib-supplied-syscalls
>> --enable-newlib-reent-check-verify
>> --enable-newlib-reent-small
>> --enable-newlib-retargetable-locking
>> --disable-newlib-fvwrite-in-streamio
>> --disable-newlib-fseek-optimization
>> --disable-newlib-wide-orient
>> --enable-newlib-nano-malloc
>> --disable-newlib-unbuf-stream-opt
>> --enable-lite-exit
>> --enable-newlib-global-atexit
>> --enable-newlib-nano-formatted-io
>> --disable-nls
>>
>>
>> Is it expected that the symbol __ssputws_r is referenced but not provided when (I presume this is the reason) --enable-newlib-nano-formatted-io and --disable-newlib-wide-orient is used?
>>
>> Kind regards,
>> Torbjörn
newlib/Makefile.in contains:
@HAVE_STDIO_DIR_TRUE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ libc/stdio/ssputws_r.c \
But:
@HAVE_STDIO_DIR_TRUE@ libc/stdio/svfwprintf.c \
So I'm guessing the latter should be similarly guarded.
There may be other wprint/wscan functions that should be similarly guarded.
next prev parent reply other threads:[~2024-02-19 16:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 17:40 Torbjorn SVENSSON
2024-02-15 15:19 ` Torbjorn SVENSSON
2024-02-19 16:20 ` Richard Earnshaw (lists) [this message]
2024-02-23 15:31 ` [PATCH] libc/stdio: Remove wchar_t functions from NEWLIB_NANO_FORMATTED_IO Torbjörn SVENSSON
2024-02-23 16:05 ` R. Diez
2024-03-09 8:15 ` [PATCH v2] " Torbjörn SVENSSON
2024-03-11 10:30 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bfb6dc60-4b68-4ef1-872c-803b60d19bb5@arm.com \
--to=richard.earnshaw@arm.com \
--cc=newlib@sourceware.org \
--cc=torbjorn.svensson@foss.st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).