From: Bruno Haible Date: Wed, 15 Nov 2023 15:11:34 +0000 (+0100) Subject: build: Fix a compilation failure on AIX with gcc 10. X-Git-Tag: v0.22.4~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a91c3da9124b663f91884a28b1b237e8678cb1f;p=thirdparty%2Fgettext.git build: Fix a compilation failure on AIX with gcc 10. * m4/more-warnings.m4 (gt_MORE_WARNINGS): Turn off -fanalyzer with GCC 10 or older. --- diff --git a/m4/more-warnings.m4 b/m4/more-warnings.m4 index 42c168b10..d223aa2b3 100644 --- a/m4/more-warnings.m4 +++ b/m4/more-warnings.m4 @@ -1,4 +1,4 @@ -# more-warnings.m4 serial 1 (gettext-0.21.2) +# more-warnings.m4 serial 1.1 (gettext-0.22.4) dnl Copyright (C) 2023 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -166,6 +166,20 @@ AS_HELP_STRING([[--disable-more-warnings]], [obey exactly the warning options sp dnl Cf. -Wshadow, above. gl_WARN_ADD([-Wshadow=local]) + dnl With GCC 10 and older, turn off -fanalyzer, because it requires too much + dnl memory in the compiler. + dnl See . In particular, + dnl on AIX 7.3, gcc 10.3 cannot compile regex.c with -fanalyzer: + dnl cc1: out of memory allocating 732 bytes after a total of 1072239104 bytes + AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ + #if __GNUC__ > 10 + #error "You are lucky" + #endif + ]])], + [ + gl_WARN_ADD([-fno-analyzer]) + ]) + dnl For production code imported from other packages, disable some other dnl warnings. For imported code, I want to minimize difference w.r.t. dnl upstream.