From 9333647560d0adfab3c11f2cfbe5b8a77ba968c2 Mon Sep 17 00:00:00 2001 From: fly_fzc <2385803914@qq.com> Date: Tue, 26 Aug 2025 19:36:31 +0800 Subject: [PATCH] backport upstream patch (cherry picked from commit 6b6645a510d8143557a903056f40348ae9237163) --- autoconf.spec | 6 ++- ...e-incorrect-check-in-AC_CHECK_SIZEOF.patch | 53 +++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 backport-Remove-incorrect-check-in-AC_CHECK_SIZEOF.patch diff --git a/autoconf.spec b/autoconf.spec index c9222c4..7824723 100644 --- a/autoconf.spec +++ b/autoconf.spec @@ -3,7 +3,7 @@ Name: autoconf Version: 2.71 -Release: 9 +Release: 10 Summary: An extensible package to automatically configure software source code packages License: GPLv2+ and GPLv3+ and GFDL-1.3-only URL: https://www.gnu.org/software/%{name}/ @@ -13,6 +13,7 @@ Source2: autoconf-el.el Patch1: backport-_AC_PROG_CXX_STDCXX_EDITION_TRY-fix-typo-in-variable.patch Patch2: backport-Fix-testsuite-failures-with-bash-5.2.patch +Patch3: backport-Remove-incorrect-check-in-AC_CHECK_SIZEOF.patch Patch9000: skip-one-test-at-line-1616-of-autotest.patch @@ -73,6 +74,9 @@ fi %changelog +* Tue Aug 26 2025 fuanan - 2.71-10 +- backport upstream patch + * Fri Dec 06 2024 Funda Wang - 2.71-9 - revert previous fix, as it causes too many regressions diff --git a/backport-Remove-incorrect-check-in-AC_CHECK_SIZEOF.patch b/backport-Remove-incorrect-check-in-AC_CHECK_SIZEOF.patch new file mode 100644 index 0000000..74f3bba --- /dev/null +++ b/backport-Remove-incorrect-check-in-AC_CHECK_SIZEOF.patch @@ -0,0 +1,53 @@ +From 51dec81849467973b1ef6d3fc8318b5b4f34b1c4 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Wed, 7 Feb 2024 12:42:04 -0800 +Subject: [PATCH] Remove incorrect check in AC_CHECK_SIZEOF +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* lib/autoconf/types.m4 (AC_CHECK_SIZEOF, AC_CHECK_ALIGNOF): +When the size or alignment cannot be determined, do not fail if +ac_cv_type_$1 is yes, as there’s no guarantee that ac_cv_type_$1 +is defined, and failure here would contradict the documentation +that the size or alignment is 0 when sizeof($1)/alignof($1) cannot +be compiled. The test for ac_cv_type_$1 made sense long ago when +it was checked for in these macros, but the test has not made +sense for many years. +--- + lib/autoconf/types.m4 | 12 ++---------- + 1 file changed, 2 insertions(+), 10 deletions(-) + +diff --git a/lib/autoconf/types.m4 b/lib/autoconf/types.m4 +index 8ed2f155..f231fcfc 100644 +--- a/lib/autoconf/types.m4 ++++ b/lib/autoconf/types.m4 +@@ -837,11 +837,7 @@ AC_DEFUN([AC_CHECK_SIZEOF], + _AC_CACHE_CHECK_INT([size of $1], [AS_TR_SH([ac_cv_sizeof_$1])], + [(long int) (sizeof ($1))], + [AC_INCLUDES_DEFAULT([$3])], +- [if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then +- AC_MSG_FAILURE([cannot compute sizeof ($1)], 77) +- else +- AS_TR_SH([ac_cv_sizeof_$1])=0 +- fi]) ++ [AS_TR_SH([ac_cv_sizeof_$1])=0]) + + AC_DEFINE_UNQUOTED(AS_TR_CPP(sizeof_$1), $AS_TR_SH([ac_cv_sizeof_$1]), + [The size of `$1', as computed by sizeof.]) +@@ -866,11 +862,7 @@ _AC_CACHE_CHECK_INT([alignment of $1], [AS_TR_SH([ac_cv_alignof_$3])], + [(long int) offsetof (ac__type_alignof_, y)], + [AC_INCLUDES_DEFAULT([$2]) + typedef struct { char x; $1 y; } ac__type_alignof_;], +- [if test "$AS_TR_SH([ac_cv_type_$3])" = yes; then +- AC_MSG_FAILURE([cannot compute alignment of $1], 77) +- else +- AS_TR_SH([ac_cv_alignof_$3])=0 +- fi]) ++ [AS_TR_SH([ac_cv_alignof_$3])=0]) + + AC_DEFINE_UNQUOTED(AS_TR_CPP(alignof_$3), $AS_TR_SH([ac_cv_alignof_$3]), + [The normal alignment of `$1', in bytes.]) +-- +2.33.0 + -- Gitee