From: Bruno Haible Date: Wed, 29 Jan 2025 11:05:42 +0000 (+0100) Subject: xgettext: Rust: Fix xgettext-rust-stackovfl-* failures on MSVC 14/x86_64. X-Git-Tag: v0.24~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81add3eb2a222f47e6cd07de5735ae2f91b3f4f9;p=thirdparty%2Fgettext.git xgettext: Rust: Fix xgettext-rust-stackovfl-* failures on MSVC 14/x86_64. * autogen.sh (GNULIB_MODULES_TOOLS_OTHER): Add test-xfail. * gettext-tools/src/Makefile.am (xgettext_LDFLAGS): On MSVC, use a larger stack size. --- diff --git a/autogen.sh b/autogen.sh index 51967dd87..421f87fd8 100755 --- a/autogen.sh +++ b/autogen.sh @@ -328,6 +328,7 @@ if ! $skip_gnulib; then javaexec-script manywarnings stdint-h + test-xfail ' GNULIB_MODULES_TOOLS_LIBUNISTRING_TESTS=' unilbrk/u8-possible-linebreaks-tests diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am index c5aa1dacd..27d234092 100644 --- a/gettext-tools/src/Makefile.am +++ b/gettext-tools/src/Makefile.am @@ -520,6 +520,17 @@ recode_sr_latin_LDFLAGS = `$(RELOCATABLE_LDFLAGS) $(bindir)` hostname_LDFLAGS = `$(RELOCATABLE_LDFLAGS) $(pkglibexecdir)` urlget_LDFLAGS = `$(RELOCATABLE_LDFLAGS) $(pkglibexecdir)` cldr_plurals_LDFLAGS = `$(RELOCATABLE_LDFLAGS) $(pkglibexecdir)` +else +xgettext_LDFLAGS = +endif + +# Link-time flags for particular programs. +# With MSVC 14/x86_64, the default stack size of 1 MB is sufficient only for +# a recursion depth in "xgettext -L Rust" invocations of 501. To guarantee a +# recursion depth of 1000, we need to increase the stack size. Cf. +# . +if PLATFORM_IS_MSVC +xgettext_LDFLAGS += -Wl,/F4000000 endif # Linking with C++ libraries is needed _only_ on mingw and Cygwin.