[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gettext-tools: disabling thread safety on Windows?
From: |
Bruno Haible |
Subject: |
Re: gettext-tools: disabling thread safety on Windows? |
Date: |
Thu, 03 Oct 2024 14:59:30 +0200 |
Michele Locati wrote:
> > Oh. Indeed, libwinpthread should be avoided, because it is of lower quality
> > than the rest of mingw.
>
> I have to include libwinpthread-1.dll just because it's required by
> libstdc++-6.dll: it doesn't seem that any of the gettext stuff uses it
> (I'm using --enable-threads=windows)
Oh well. I don't think it will cause problems, though, since we hardly
use anything from libstdc++.
> > The only program in GNU gettext that uses multithreading is msgmerge.
> > And indeed, without multithreading, msgmerge is much slower. So,
> > I wouldn't recommend --disable-threads for the entire package.
> >
> > But for the other programs, including xgettext, there is no issue.
> > So, you can add fno-threadsafe-statics to xgettext_CXXFLAGS without
> > problem.
>
> Do you think that msgmerge could have problems if I use
> --enable-threads=windows together with -fno-threadsafe-statics?
I don't think there will be problems: The MT code of msgmerge is in
the fstrcmp.c compilation unit, which is in C. The part that needs to
be compiled in C++ mode is msgmerge.c, which doesn't do any MT thing.
> The alternative would be to build everything with
> -fno-threadsafe-statics and --disable-threads, then rebuild just
> msgmerge without them
Be careful: The MT part of msgmerge, fstrcmp.c, sits in libgettextlib.dll.
Bruno