]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
xgettext: Rust: Fix xgettext-rust-stackovfl-* failures on MSVC 14/x86_64.
authorBruno Haible <bruno@clisp.org>
Wed, 29 Jan 2025 11:05:42 +0000 (12:05 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 29 Jan 2025 11:05:42 +0000 (12:05 +0100)
* autogen.sh (GNULIB_MODULES_TOOLS_OTHER): Add test-xfail.
* gettext-tools/src/Makefile.am (xgettext_LDFLAGS): On MSVC, use a larger
stack size.

autogen.sh
gettext-tools/src/Makefile.am

index 51967dd87b0e7f2a9c75b006644a70f38b4969e8..421f87fd80c989ac91b76b3306978aa3ed5c5a6e 100755 (executable)
@@ -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
index c5aa1dacdcf623cdafb2a893b31bd0caa8be7aec..27d234092938fa5eb4ab0c25ebb9d40fe3300601 100644 (file)
@@ -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.
+# <https://learn.microsoft.com/en-us/cpp/build/reference/f-set-stack-size>.
+if PLATFORM_IS_MSVC
+xgettext_LDFLAGS += -Wl,/F4000000
 endif
 
 # Linking with C++ libraries is needed _only_ on mingw and Cygwin.