Re: [PATCH 0/2] fix undefined reference to `__ssputws_r'
Corinna Vinschen <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
Hi Jörn,
On Jul 21 17:04, Joern Wolfgang Rennecke wrote:
> On Jul 21 09:56, Corinna Vinschen wrote:
> >On 20/07/2025 15:17, Joern Wolfgang Rennecke wrote:
> >> We need to decide first if --enable-newlib-nano-formatted-io should or
> >> should not remove support for wide character handling.
> >> Then we can look at individual test failures.
> >
> >Didn't we already remove wchar support at least partially with commit
> >3b97a5ec67a5 ("libc/stdio: Remove wchar_t functions from
> >NEWLIB_NANO_FORMATTED_IO")?
>
> Yes, this partial removal is the cause of massive breakage both in C and
> C++, because a lot of wchar functions have disappeared from libc.a, but not
> all the references.
> To fix the immediate breakage, we could either make the removal complete, or
> use Hau Hsu's approach to revert the wchar support removal, and fix the
> original problem without a feature change.
> As was pointed out in
> https://sourceware.org/pipermail/newlib/2024/021160.html ,
> where Hau Hsu wrote on Jul 8 2024:
> >The previous patch removes wchar_t functions from
> >NEWLIB_NANO_FORMATTED_IO, but in the newlib/README says:
> >
> >> --enable-newlib-nano-formatted-io
> >> This option does not affect wide-char formatted I/O functions
>
> With newlib 4.5.0 , we now have a release where the README still says that,
> but most of the wchar support is missing from the built library, and what
> remains causes link failures.
>
>
> >So I guess applying
> https://sourceware.org/pipermail/newlib/2024/021162.html
> >or something along these lines should be in order.
> >
> >A new patch or a resend of the patch from 2024 would be most helpful.
>
> Ok, I've re-made the revert patch from git, and cut&pasted the patch
> "[PATCH 2/2] libc/stdio: fix undefined reference to `__ssputws_r'",
> and verified that both apply cleanly to my newlib 4.5.0 copy.
> Both patches are attached.
Uhm... can you provide them as git format-patch patches, by any chance?
I'm also a bit puzzled in terms of the first patch filename,
rev-06aa5a751682118ef1d7f2456f8937b4ac181fac.txt. This sounds like a
"revert 06aa5a751682...", but patch 06aa5a751682 is a completely
unrelated patch in the Cygwin part of the source tree.
I tried your patches with git apply and (adding ersatz mail headers)
with git am, but the second patch doesn't apply. I also tried a manual
revert of 3b97a5ec67a5 ("libc/stdio: Remove wchar_t functions from
NEWLIB_NANO_FORMATTED_IO") and I grabbed the original second patch
(https://sourceware.org/pipermail/newlib/2024/021161.html) from
the mailing list archives, but it doesn't apply cleanly either.
What am I missing?
Thanks,
Corinna