]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
configure: hard code -Wno-alloc-size-larger-than=2147483647
authorPaul Floyd <pjfloyd@wanadoo.fr>
Mon, 13 Oct 2025 11:02:52 +0000 (13:02 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Mon, 13 Oct 2025 11:02:52 +0000 (13:02 +0200)
Should be OK for both 32bit and 64bit.
Remove AC_GCC_WARNING_SUBST_NO_VAL - always need to set a value.

configure.ac

index 9217aa0ac85dbf4e35370ac67479b338bad34d17..724e8f07df77c6424fa79dd94e21ded50f72ebf7 100644 (file)
@@ -2566,20 +2566,6 @@ AC_DEFUN([AC_GCC_WARNING_SUBST_NO],[
   CFLAGS=$safe_CFLAGS
 ])
 
-# A variation of the above for arguments that
-# take a value
-AC_DEFUN([AC_GCC_WARNING_SUBST_NO_VAL],[
-  AC_MSG_CHECKING([if gcc accepts -W$1=$2])
-  safe_CFLAGS=$CFLAGS
-  CFLAGS="-W$1=$2 -Werror"
-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[;]])], [
-  AC_SUBST([$3], [-Wno-$1])
-  AC_MSG_RESULT([yes])], [
-  AC_SUBST([$3], [])
-  AC_MSG_RESULT([no])])
-  CFLAGS=$safe_CFLAGS
-])
-
 # Convenience function. Like AC_GCC_WARNING_SUBST_NO, except it substitutes
 # -W$1  (instead of -Wno-$1).
 AC_DEFUN([AC_GCC_WARNING_SUBST],[
@@ -2623,8 +2609,8 @@ AC_GCC_WARNING_SUBST_NO([attributes], [FLAG_W_NO_ATTRIBUTES])
 AC_GCC_WARNING_SUBST_NO([unused-result], [FLAG_W_NO_UNUSED_RESULT])
 AC_GCC_WARNING_SUBST_NO([infinite-recursion], [FLAG_W_NO_INFINITE_RECURSION])
 AC_GCC_WARNING_SUBST_NO([deprecated], [FLAG_W_NO_DEPRECATED])
-
-AC_GCC_WARNING_SUBST_NO_VAL([alloc-size-larger-than], [1677216], [FLAG_W_NO_ALLOC_SIZE_LARGER_THAN])
+# OK for 32 and 64 bit
+AC_GCC_WARNING_SUBST_NO([alloc-size-larger-than=2147483647], [FLAG_W_NO_ALLOC_SIZE_LARGER_THAN])
 
 AC_GCC_WARNING_SUBST([write-strings], [FLAG_W_WRITE_STRINGS])
 AC_GCC_WARNING_SUBST([empty-body], [FLAG_W_EMPTY_BODY])