summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2024-06-19 14:36:18 +0000
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2024-06-19 22:12:24 +0200
commit26df3f9d9ad91e98d71ebb090ab6650239db37fc (patch)
treef656952cc2f9db98cf0a8f03a1475ff7bfa8990c
parent9a563adb4d11bffe40b2a66e881f8dd7822d11ca (diff)
downloadopenembedded-core-contrib-abelloni/master-next.tar.gz
bash: fix configure checks that fail with GCC 14.1abelloni/master-next
These configure checks cause compiler errors with GCC 14.1, so they always fail. Backport fixes from upstream to solve this. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r--meta/recipes-extended/bash/bash/0001-fix-c99.patch41
-rw-r--r--meta/recipes-extended/bash/bash_5.2.21.bb1
2 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-extended/bash/bash/0001-fix-c99.patch b/meta/recipes-extended/bash/bash/0001-fix-c99.patch
new file mode 100644
index 0000000000..aa810f7d4e
--- /dev/null
+++ b/meta/recipes-extended/bash/bash/0001-fix-c99.patch
@@ -0,0 +1,41 @@
+From e9ed388e760ec33dcf9e72c639946c0d0abeec26 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@arm.com>
+Date: Wed, 19 Jun 2024 12:57:39 +0000
+Subject: [PATCH] Fix C99 problems
+
+Backport some fixes from upstream to fix configure checks that fail with GCC 14.1.
+
+Upstream-Status: Backport [devel branch]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ aclocal.m4 | 3 +++
+ configure.ac | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index cc97bd4..7423b99 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -238,6 +238,9 @@ AC_CACHE_VAL(bash_cv_dup2_broken,
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
++#ifdef HAVE_UNISTD_H
++# include <unistd.h>
++#endif /* HAVE_UNISTD_H */
+ int
+ main()
+ {
+diff --git a/configure.ac b/configure.ac
+index a3b5bd7..2a38c6b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -842,7 +842,7 @@ AC_CHECK_DECLS([strtold], [
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdlib.h>]],
+- [[long double r; char *foo, bar; r = strtold(foo, &bar);]]
++ [[long double r; char *foo, *bar; r = strtold(foo, &bar);]]
+ )],
+ [bash_cv_strtold_broken=no],[bash_cv_strtold_broken=yes])
+ ]
diff --git a/meta/recipes-extended/bash/bash_5.2.21.bb b/meta/recipes-extended/bash/bash_5.2.21.bb
index 532adf4c1a..ccfe5c47a7 100644
--- a/meta/recipes-extended/bash/bash_5.2.21.bb
+++ b/meta/recipes-extended/bash/bash_5.2.21.bb
@@ -14,6 +14,7 @@ SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \
file://use_aclocal.patch \
file://0001-changes-to-SIGINT-handler-while-waiting-for-a-child-.patch \
file://fix-filesubst-errexit.patch \
+ file://0001-fix-c99.patch \
"
SRC_URI[tarball.sha256sum] = "c8e31bdc59b69aaffc5b36509905ba3e5cbb12747091d27b4b977f078560d5b8"