summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/autoconf
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-08-17 00:04:39 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-21 22:51:41 +0100
commitca943bd72fb08a12f3084a21393ca8c1d952c864 (patch)
treec7aba11e1bc4768ff927b5de9e6179003520c10f /meta/recipes-devtools/autoconf
parentd745c8b588460676a23d7ac4aa941d862b739136 (diff)
downloadpoky-ca943bd72fb08a12f3084a21393ca8c1d952c864.tar.gz
autoconf: Fix strict prototype errors in generated tests
This will fix issues with autoconf tests which fail due to lacking prototypes (From OE-Core rev: eb477854ba230d8a8370f24880bd421607399e5a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/autoconf')
-rw-r--r--meta/recipes-devtools/autoconf/autoconf/0001-specify-void-prototype-for-functions-with-no-paramet.patch64
-rw-r--r--meta/recipes-devtools/autoconf/autoconf_2.71.bb1
2 files changed, 65 insertions, 0 deletions
diff --git a/meta/recipes-devtools/autoconf/autoconf/0001-specify-void-prototype-for-functions-with-no-paramet.patch b/meta/recipes-devtools/autoconf/autoconf/0001-specify-void-prototype-for-functions-with-no-paramet.patch
new file mode 100644
index 0000000000..4d8aa296cd
--- /dev/null
+++ b/meta/recipes-devtools/autoconf/autoconf/0001-specify-void-prototype-for-functions-with-no-paramet.patch
@@ -0,0 +1,64 @@
1From 7ccfea413216bddd988823acf4e93421ea0f7f9f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 16 Aug 2022 18:35:45 -0700
4Subject: [PATCH] specify void prototype for functions with no parameters
5
6Compilers defaulting to C99 flag such functions as warning which fails
7to compile when using -Werror
8
9Fixes
10error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
11
12Upstream-Status: Submitted [https://lists.gnu.org/archive/html/autoconf-patches/2022-08/msg00003.html]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 lib/autoconf/c.m4 | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18--- a/lib/autoconf/c.m4
19+++ b/lib/autoconf/c.m4
20@@ -127,7 +127,7 @@ m4_if([$2], [main], ,
21 [/* Override any GCC internal prototype to avoid an error.
22 Use char because int might match the return type of a GCC
23 builtin and then its argument prototype would still apply. */
24-char $2 ();])], [return $2 ();])])
25+char $2 (void);])], [return $2 ();])])
26
27
28 # AC_LANG_FUNC_LINK_TRY(C)(FUNCTION)
29@@ -151,7 +151,7 @@ m4_define([AC_LANG_FUNC_LINK_TRY(C)],
30 #define $1 innocuous_$1
31
32 /* System header to define __stub macros and hopefully few prototypes,
33- which can conflict with char $1 (); below. */
34+ which can conflict with char $1 (void); below. */
35
36 #include <limits.h>
37 #undef $1
38@@ -162,7 +162,7 @@ m4_define([AC_LANG_FUNC_LINK_TRY(C)],
39 #ifdef __cplusplus
40 extern "C"
41 #endif
42-char $1 ();
43+char $1 (void);
44 /* The GNU C library defines this for functions which it implements
45 to always fail with ENOSYS. Some functions are actually named
46 something starting with __ and the normal name is an alias. */
47@@ -252,7 +252,7 @@ dnl other built-in extern "C" functions,
48 dnl when it actually happens.
49 [AC_LANG_PROGRAM([[$1
50 namespace conftest {
51- extern "C" int $2 ();
52+ extern "C" int $2 (void);
53 }]],
54 [[return conftest::$2 ();]])])
55
56@@ -2457,7 +2457,7 @@ using std::strcmp;
57
58 namespace {
59
60-void test_exception_syntax()
61+void test_exception_syntax(void)
62 {
63 try {
64 throw "test";
diff --git a/meta/recipes-devtools/autoconf/autoconf_2.71.bb b/meta/recipes-devtools/autoconf/autoconf_2.71.bb
index 799191e2ca..239b268119 100644
--- a/meta/recipes-devtools/autoconf/autoconf_2.71.bb
+++ b/meta/recipes-devtools/autoconf/autoconf_2.71.bb
@@ -18,6 +18,7 @@ SRC_URI = "${GNU_MIRROR}/autoconf/${BP}.tar.gz \
18 file://preferbash.patch \ 18 file://preferbash.patch \
19 file://autotest-automake-result-format.patch \ 19 file://autotest-automake-result-format.patch \
20 file://man-host-perl.patch \ 20 file://man-host-perl.patch \
21 file://0001-specify-void-prototype-for-functions-with-no-paramet.patch \
21 " 22 "
22SRC_URI:append:class-native = " file://no-man.patch" 23SRC_URI:append:class-native = " file://no-man.patch"
23 24