bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gettext-tools: disabling thread safety on Windows?


From: Michele Locati
Subject: gettext-tools: disabling thread safety on Windows?
Date: Thu, 3 Oct 2024 12:32:29 +0200

When building gettext for Windows in "shared" mode, I noticed that
xgettext depends on libstdc++-6.dll because it uses its two functions
__cxa_guard_acquire and __cxa_guard_release.

So, since libstdc++-6.dll requires libgcc_s_seh-1.dll and
libwinpthread-1.dll, I have to distribute these 3 libraries because of
those 2 functions.

I've been told ([1]) that those 2 functions are used because of thread
safety initialization.

So, I tried to configure gettext with --disable-threads, but that was
not enough: I've had to add -fno-threadsafe-statics to CXXFLAGS too
(compare the "Process dependencies" step of [2] vs previous builds).

So, the question is: is this an acceptable approach or can it have bad
consequences? Will xgettext be much slower?
>From a quick check on the xgettext code, it seems that muti-threading
is only used to call setocale (but of course I may be wrong): I know
that setlocale is slow on posix, but I'm not sure on Windows...

Ciao,
Michele

[1] https://sourceforge.net/p/mingw-w64/mailman/message/58824383/
[2] 
https://github.com/mlocati/gettext-iconv-windows/actions/runs/11159867156/job/31019156401?pr=23



reply via email to

[Prev in Thread] Current Thread [Next in Thread]