From: Joseph Myers Date: Tue, 27 May 2025 15:56:56 +0000 (+0000) Subject: Use -std=gnu17 in build-many-glibcs.py when configuring GMP X-Git-Tag: glibc-2.42~203 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=08d7243a6179d5a1f3f65a53aba1ec0803895aeb;p=thirdparty%2Fglibc.git Use -std=gnu17 in build-many-glibcs.py when configuring GMP This works around incompatibility of GMP 6.3.0 with GCC 15 (defaulting to C23) following an approach suggested by Florian. Tested with build-many-glibcs.py (host-libraries build only). Reviewed-by: Florian Weimer --- diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py index 28258e372c..fa3e75defe 100755 --- a/scripts/build-many-glibcs.py +++ b/scripts/build-many-glibcs.py @@ -742,7 +742,13 @@ class Context(object): logsdir = os.path.join(self.logsdir, 'host-libraries') self.remove_recreate_dirs(installdir, builddir, logsdir) cmdlist = CommandList('host-libraries', self.keep) - self.build_host_library(cmdlist, 'gmp') + # This CFLAGS setting works around GMP 6.3.0's configure + # script being incompatible with compilers defaulting to C23 + # and should be removed when this script is updated to use a + # release of GMP from after that configure test was fixed in + # Jan 2025. + self.build_host_library(cmdlist, 'gmp', + ['CFLAGS=-Wall -O2 -std=gnu17']) self.build_host_library(cmdlist, 'mpfr', ['--with-gmp=%s' % installdir]) self.build_host_library(cmdlist, 'mpc',