sba1 / adtools

Experimental GNU toolchain for AmigaOS
31 stars 18 forks source link

Add std::wstring #118

Open ksdhans opened 2 years ago

ksdhans commented 2 years ago

Std::wstring is currently undefined, which is a problem when using/porting code that requires it. People are implementing workarounds such as: https://www.amigans.net/modules/newbb/viewtopic.php?post_id=113200#forumpost113200

Could we get this fixed, so that workarounds can be removed?

NOTE: I'm using GCC 8.3.1, so haven't tested it with a newer GCC version.

sodero commented 2 years ago

My guess is that this is due to missing wchar support in clib2. I don't have working Linux HW right now so I can't say for sure though.

I think that @afxgroup is working on extending clib2. Maybe maybe wchar is one of those things he's adding.

ksdhans commented 2 years ago

I don't use clib2, because every time I try it, something else breaks.

sodero commented 2 years ago

Yes, but unless I misunderstand how adtools work, libstd++v3 is configured and built using clib2 (per default at least), so even though you don't use -mcrt=clib2 when building your project, you will be limited by what autotools finds in the configure step when gcc itself is built.

ksdhans commented 2 years ago

@sodero There is a separate c++config.h for newlib, so it seems to be generating per clib configurations. I did try manually tweaking it to enable wstring, but ended up with a whole array of errors. A bit weird, considering that wstring is basically std::basic_string.

afxgroup commented 2 years ago

On my clib2 everything works correclty with wchar and c++ (except some usual problems with libstdc++.so i have to fix one day). I think i will open it soon because I need help

sodero commented 2 years ago

@ksdhans Ah, I didn't know that. I focused only on clib2 since the newlib code is hidden to me.

@afxgroup Sounds good. Did you implement the all the wchar_* functions?

sodero commented 2 years ago

@afxgroup Once you publish your work it's probably time to consolidate the efforts. I implemented C11 threading BTW. The thrd* and mtx* parts seem to work fine. I don't have a clear understanding of how TSS is supposed to work though.

afxgroup commented 2 years ago

@afxgroup Sounds good. Did you implement the all the wchar_* functions?

Yes. With some tests too. However everything needs to test deeply and i'm expecting lot of pull requests from you.. :D

sodero commented 2 years ago

Yes. With some tests too. However everything needs to test deeply and i'm expecting lot of pull requests from you.. :D

Excellent, I'll do my best with the PR:s :)

afxgroup commented 2 years ago

Repository is now visible

https://github.com/afxgroup/clib2