From: Bruno Haible Date: Wed, 9 Jul 2025 06:02:21 +0000 (+0200) Subject: build: On mingw, avoid link dependency from xgettext.exe to libstdc++. X-Git-Tag: v0.26~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd84361f0e77eced3524db24c90b596f1f3dad40;p=thirdparty%2Fgettext.git build: On mingw, avoid link dependency from xgettext.exe to libstdc++. Reported by Michele Locati in . * gettext-tools/src/Makefile.am (xgettext_CXXFLAGS): New variable. --- diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am index 4ce51af0a..1b7faf125 100644 --- a/gettext-tools/src/Makefile.am +++ b/gettext-tools/src/Makefile.am @@ -480,6 +480,16 @@ endif # Compile-time flags for particular source files. msgmerge_CFLAGS = $(AM_CFLAGS) $(OPENMP_CFLAGS) msgmerge_CXXFLAGS = $(AM_CXXFLAGS) $(OPENMP_CFLAGS) +# On mingw, the compiler option '-fno-threadsafe-statics' avoids requiring +# the symbols __cxa_guard_acquire and __cxa_guard_release, which in turn +# avoids a dependency towards libstdc++. +if WOE32DLL +if WINDOWS_NATIVE +if !WINDOWS_MSVC +xgettext_CXXFLAGS = $(AM_CXXFLAGS) -fno-threadsafe-statics +endif +endif +endif # Link dependencies. # INTL_MACOSX_LIBS is needed because the programs depend on libintl.la