mirror of
https://github.com/bitwiseworks/gcc-os2.git
synced 2026-04-22 22:09:52 +00:00
Make sure special wchar_t support is enabled #21
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dmik on GitHub (Jan 29, 2020).
Originally assigned to: @dmik on GitHub.
From https://github.com/psmedley/gcc/issues/30:
IIRC this is disabled by configure now because kLIBC doesn't implement all necessary wide character functions (so the respective configure test fails).
When enabled, gcc defines
_GLIBCXX_USE_WCHAR_Twhich enables special code for wide characters. This code includes e.g. astd::is_integral<wchar_t>specialization returningtrueinstead offalseand a lot of other things.The problem was found while working on the
QTypeInfo<wchar_t>specialization for Qt 5 within https://github.com/bitwiseworks/qtbase-os2/issues/29.Note that we may force such support with
--enable-wchar_tbut a test build needs to be done to check if it will work with our kLIBC.@dmik commented on GitHub (Jan 29, 2020):
Read the original ticket for more info. In particular, a few changes should be undone one this issue is resolved. These include:
9e4df832a6e7a97582cdNote that the LIBC part of wide char support is done within https://github.com/bitwiseworks/libc/issues/8.
Also note that we should keep
wchar_tandwint_tdefinitions in the EMX target for GCC in sync with LIBC.wchar_tis currently fine (unsigned shortin both cases) butwint_tis not (intin LIBC andunsigned intin GCC). I will fix it within this ticket as well.@dmik commented on GitHub (Feb 28, 2020):
std::is_integral<wchar_t>::valueisfalseATM, this breaks Chromium and needs to be dealt with. I guess we must force--enable-wchar_tfor now and pray that it doesn't blow somewhere. And if it blows,#if 0such places with a reference to this ticket as a temporary solution.@dmik commented on GitHub (Feb 28, 2020):
With the latest
wprinfchanges to LIBC, the number of the missing functions has shortened to this in conftest responsible for this setting to be automatically enabled:fputwswas somehow lost when doing59105a4d89. The rest are scan/get functions that were never done so far. It may take a while to do them.@dmik commented on GitHub (Feb 28, 2020):
No, forcing
--enable-wchar_tw/o bringing the above functions to LIBC is not an option. It brings a lot of side effects. E.g. simply#include <cwchar>in the C++ source code will bring virtually the same error message as above (expected). We have to add those functions to LIBC to continue on Chromium.@dmik commented on GitHub (Mar 4, 2020):
With https://github.com/bitwiseworks/libc/issues/8 resolved, this issue goes away: libstdc++v3 configure can detect wchar_t function presence now and imply
--enable-wchar_tby default. Closing this.@dmik commented on GitHub (Mar 17, 2020):
I need to reopen this as I get build errors when trying to rebuild GCC from scratch. Some conflict with
2eafb765c8it seems:@dmik commented on GitHub (Mar 18, 2020):
Got one more problem when linking STDCPP6.DLL now:
Which means that this one was not required by configure so it didn't fall. Sigh. I will have to add it to LIBC or make GCC not use it. I.e. more time on this.
@dmik commented on GitHub (Mar 19, 2020):
Now all builds but I've faced https://github.com/bitwiseworks/libc/issues/35 during another round. Need to investigate it further.
@dmik commented on GitHub (Mar 19, 2020):
Couldn't move further with the make break investigation, it just worked upon the next time. This is irrelevant to this ticket though so I'm going to close it — rebuilt GCC fully supports wchar_t in all my tests (QtBase/QtDeclarative with rolled back hacks, QtWebEngine, even wregex works).