summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/gawk
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2024-05-21 15:32:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-05-22 10:21:27 +0100
commit3d2ade560bea80d5166a84ef3c113da4e57f3a38 (patch)
treec3d46e4ad306cd28ad96614f0e22a33e5191fd5c /meta/recipes-extended/gawk
parent73da2653818739fb759d820f6c101149c832d0ff (diff)
downloadpoky-3d2ade560bea80d5166a84ef3c113da4e57f3a38.tar.gz
gawk: fix readline detection
The code fragment used to detect readline in cross builds doesn't compile cleanly with GCC 14.1, so readline is never enabled. Add missing includes so the test works, and readline can be enabled. (From OE-Core rev: a6e7c3ce700b82c57f1102187fea6b387339eca3) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/gawk')
-rw-r--r--meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch38
-rw-r--r--meta/recipes-extended/gawk/gawk_5.3.0.bb1
2 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch b/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch
new file mode 100644
index 0000000000..5be2fd97ee
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch
@@ -0,0 +1,38 @@
1From 4f4e84f139e2a8682f1374a592f2636c43ad857b Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@arm.com>
3Date: Tue, 21 May 2024 15:10:11 +0000
4Subject: [PATCH] m4/readline: add missing includes
5
6The cross-specific code fragment only includes stdio.h, where the native
7fragment also includes fcntl.h and unistd.h. This is important because
8GCC 14.1 has made the implicit definitions an error:
9
10conftest.c: In function 'main':
11conftest.c:144:9: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Wimplicit-function-declaration]
12conftest.c:146:14: error: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration]
13
14Add the missing includes so that the check doesn't always fail due to
15these errors.
16
17Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-gawk/2024-05/msg00000.html]
18Signed-off-by: Ross Burton <ross.burton@arm.com>
19---
20 m4/readline.m4 | 2 ++
21 1 file changed, 2 insertions(+)
22
23diff --git a/m4/readline.m4 b/m4/readline.m4
24index 38f96326..efd52d4e 100644
25--- a/m4/readline.m4
26+++ b/m4/readline.m4
27@@ -66,6 +66,8 @@ dnl action if false:
28 dnl action if cross compiling:
29 [AC_LINK_IFELSE(
30 [AC_LANG_PROGRAM([[#include <stdio.h>
31+#include <fcntl.h>
32+#include <unistd.h>
33 #include <readline/readline.h>
34 #include <readline/history.h>]], dnl includes
35 dnl function body
36--
372.34.1
38
diff --git a/meta/recipes-extended/gawk/gawk_5.3.0.bb b/meta/recipes-extended/gawk/gawk_5.3.0.bb
index d7a0fc616d..e94cf19db4 100644
--- a/meta/recipes-extended/gawk/gawk_5.3.0.bb
+++ b/meta/recipes-extended/gawk/gawk_5.3.0.bb
@@ -16,6 +16,7 @@ PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
16PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr" 16PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr"
17 17
18SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ 18SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
19 file://0001-m4-readline-add-missing-includes.patch \
19 file://run-ptest \ 20 file://run-ptest \
20 " 21 "
21 22