summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-25 08:17:53 (GMT)
committerGitHub <noreply@github.com>2024-06-25 08:17:53 (GMT)
commitd26ce50f7bd59aa0bf6d1659ff96fb3a9075ff38 (patch)
tree107e066b0a3b703c953a92a9ea236797eb14f97d
parent6bfcf98ff6f6bb4f04f84c330794640c6e38d8bf (diff)
downloadcpython-d26ce50f7bd59aa0bf6d1659ff96fb3a9075ff38.zip
cpython-d26ce50f7bd59aa0bf6d1659ff96fb3a9075ff38.tar.gz
cpython-d26ce50f7bd59aa0bf6d1659ff96fb3a9075ff38.tar.bz2
[3.13] gh-120671: Fix PY_CHECK_CC_WARNING() in configure.ac (GH-120822) (#120985)
gh-120671: Fix PY_CHECK_CC_WARNING() in configure.ac (GH-120822) Add missing space in AS_VAR_APPEND() on CFLAGS. (cherry picked from commit 2106c9bef0c18ff35db7d6c083cb8f189507758e) Co-authored-by: Michael Allwright <allsey87@gmail.com>
-rw-r--r--Misc/NEWS.d/next/Build/2024-06-21-09-24-03.gh-issue-120671.Z8sBQB.rst1
-rwxr-xr-xconfigure16
-rw-r--r--configure.ac2
3 files changed, 10 insertions, 9 deletions
diff --git a/Misc/NEWS.d/next/Build/2024-06-21-09-24-03.gh-issue-120671.Z8sBQB.rst b/Misc/NEWS.d/next/Build/2024-06-21-09-24-03.gh-issue-120671.Z8sBQB.rst
new file mode 100644
index 0000000..bbe4a30
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2024-06-21-09-24-03.gh-issue-120671.Z8sBQB.rst
@@ -0,0 +1 @@
+Fix failing configure tests due to a missing space when appending to CFLAGS.
diff --git a/configure b/configure
index b7e2e8e..e90f475 100755
--- a/configure
+++ b/configure
@@ -9614,7 +9614,7 @@ then :
else $as_nop
py_cflags=$CFLAGS
- as_fn_append CFLAGS "-Wextra -Werror"
+ as_fn_append CFLAGS " -Wextra -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9732,7 +9732,7 @@ then :
else $as_nop
py_cflags=$CFLAGS
- as_fn_append CFLAGS "-Wunused-result -Werror"
+ as_fn_append CFLAGS " -Wunused-result -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9777,7 +9777,7 @@ then :
else $as_nop
py_cflags=$CFLAGS
- as_fn_append CFLAGS "-Wunused-parameter -Werror"
+ as_fn_append CFLAGS " -Wunused-parameter -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9818,7 +9818,7 @@ then :
else $as_nop
py_cflags=$CFLAGS
- as_fn_append CFLAGS "-Wint-conversion -Werror"
+ as_fn_append CFLAGS " -Wint-conversion -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9859,7 +9859,7 @@ then :
else $as_nop
py_cflags=$CFLAGS
- as_fn_append CFLAGS "-Wmissing-field-initializers -Werror"
+ as_fn_append CFLAGS " -Wmissing-field-initializers -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9900,7 +9900,7 @@ then :
else $as_nop
py_cflags=$CFLAGS
- as_fn_append CFLAGS "-Wsign-compare -Werror"
+ as_fn_append CFLAGS " -Wsign-compare -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9941,7 +9941,7 @@ then :
else $as_nop
py_cflags=$CFLAGS
- as_fn_append CFLAGS "-Wunreachable-code -Werror"
+ as_fn_append CFLAGS " -Wunreachable-code -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9993,7 +9993,7 @@ then :
else $as_nop
py_cflags=$CFLAGS
- as_fn_append CFLAGS "-Wstrict-prototypes -Werror"
+ as_fn_append CFLAGS " -Wstrict-prototypes -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
diff --git a/configure.ac b/configure.ac
index 4e4a709..93dd489 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2432,7 +2432,7 @@ AC_DEFUN([PY_CHECK_CC_WARNING], [
AS_VAR_PUSHDEF([py_var], [ac_cv_$1_]m4_normalize($2)[_warning])
AC_CACHE_CHECK([m4_ifblank([$3], [if we can $1 $CC $2 warning], [$3])], [py_var], [
AS_VAR_COPY([py_cflags], [CFLAGS])
- AS_VAR_APPEND([CFLAGS], ["-W$2 -Werror"])
+ AS_VAR_APPEND([CFLAGS], [" -W$2 -Werror"])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[AS_VAR_SET([py_var], [yes])],
[AS_VAR_SET([py_var], [no])])