From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH v3 6/7] autoconf: Fix strict prototype errors in generated tests
Date: Wed, 17 Aug 2022 00:04:39 -0700 [thread overview]
Message-ID: <20220817070440.537761-6-raj.khem@gmail.com> (raw)
In-Reply-To: <20220817070440.537761-1-raj.khem@gmail.com>
This will fix issues with autoconf tests which fail due to lacking
prototypes
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...totype-for-functions-with-no-paramet.patch | 64 +++++++++++++++++++
.../autoconf/autoconf_2.71.bb | 1 +
2 files changed, 65 insertions(+)
create mode 100644 meta/recipes-devtools/autoconf/autoconf/0001-specify-void-prototype-for-functions-with-no-paramet.patch
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 @@
+From 7ccfea413216bddd988823acf4e93421ea0f7f9f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 16 Aug 2022 18:35:45 -0700
+Subject: [PATCH] specify void prototype for functions with no parameters
+
+Compilers defaulting to C99 flag such functions as warning which fails
+to compile when using -Werror
+
+Fixes
+error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
+
+Upstream-Status: Submitted [https://lists.gnu.org/archive/html/autoconf-patches/2022-08/msg00003.html]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/autoconf/c.m4 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/lib/autoconf/c.m4
++++ b/lib/autoconf/c.m4
+@@ -127,7 +127,7 @@ m4_if([$2], [main], ,
+ [/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+-char $2 ();])], [return $2 ();])])
++char $2 (void);])], [return $2 ();])])
+
+
+ # AC_LANG_FUNC_LINK_TRY(C)(FUNCTION)
+@@ -151,7 +151,7 @@ m4_define([AC_LANG_FUNC_LINK_TRY(C)],
+ #define $1 innocuous_$1
+
+ /* System header to define __stub macros and hopefully few prototypes,
+- which can conflict with char $1 (); below. */
++ which can conflict with char $1 (void); below. */
+
+ #include <limits.h>
+ #undef $1
+@@ -162,7 +162,7 @@ m4_define([AC_LANG_FUNC_LINK_TRY(C)],
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char $1 ();
++char $1 (void);
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+@@ -252,7 +252,7 @@ dnl other built-in extern "C" functions,
+ dnl when it actually happens.
+ [AC_LANG_PROGRAM([[$1
+ namespace conftest {
+- extern "C" int $2 ();
++ extern "C" int $2 (void);
+ }]],
+ [[return conftest::$2 ();]])])
+
+@@ -2457,7 +2457,7 @@ using std::strcmp;
+
+ namespace {
+
+-void test_exception_syntax()
++void test_exception_syntax(void)
+ {
+ try {
+ 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 \
file://preferbash.patch \
file://autotest-automake-result-format.patch \
file://man-host-perl.patch \
+ file://0001-specify-void-prototype-for-functions-with-no-paramet.patch \
"
SRC_URI:append:class-native = " file://no-man.patch"
--
2.37.2
next prev parent reply other threads:[~2022-08-17 7:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 7:04 [PATCH v3 1/7] binutils: Upgrade to 2.39 release Khem Raj
2022-08-17 7:04 ` [PATCH v3 2/7] binutils-cross: Disable gprofng for when building cross binutils Khem Raj
2022-08-17 7:04 ` [PATCH v3 3/7] binutils: Package up gprofng Khem Raj
2022-08-17 7:04 ` [PATCH v3 4/7] binutils: Disable gprofng when using clang Khem Raj
2022-08-17 7:04 ` [PATCH v3 5/7] binutils-cross-canadian: Package up new gprofng.rc file Khem Raj
2022-08-17 7:04 ` Khem Raj [this message]
2022-08-17 7:04 ` [PATCH v3 7/7] rsync: Add missing prototypes to function declarations Khem Raj
2022-08-18 19:48 ` [OE-core] [PATCH v3 1/7] binutils: Upgrade to 2.39 release Alexandre Belloni
2022-08-18 20:29 ` Khem Raj
2022-08-19 9:45 ` Alexandre Belloni
2022-08-19 19:18 ` Khem Raj
2022-08-19 19:43 ` Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220817070440.537761-6-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox