summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2025-04-22 20:52:59 +0200
committerKhem Raj <raj.khem@gmail.com>2025-04-23 19:35:09 -0700
commiteb6dc0ceb5e1cd1d1f2fed8bbd6d3143c434b7ab (patch)
treeec3886bfc3b85161cb9413a95aed6d362f36f992
parente2598555433c4a07690ca827a5b7360aa6c9de8a (diff)
downloadmeta-openembedded-eb6dc0ceb5e1cd1d1f2fed8bbd6d3143c434b7ab.tar.gz
mce-test: fix build with gcc-15
fix wait_handler declaration to match definition in: tools/ltp-pan/ltp-pan.c:wait_handler( int sig ) * fixes build with gcc-15: http://errors.yoctoproject.org/Errors/Details/852857/ ltp-pan.c: In function 'main': ltp-pan.c:459:19: error: assignment to '__sighandler_t' {aka 'void (*)(int)'} from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types] 459 | sa.sa_handler = wait_handler; | ^ In file included from ltp-pan.c:67: zoolib.h:52:6: note: 'wait_handler' declared here 52 | void wait_handler(); | ^~~~~~~~~~~~ In file included from TOPDIR/tmp/work/core2-64-oe-linux/mce-test/20230601+git/recipe-sysroot/usr/include/sys/param.h:28, from ltp-pan.c:56: TOPDIR/tmp/work/core2-64-oe-linux/mce-test/20230601+git/recipe-sysroot/usr/include/signal.h:72:16: note: '__sighandler_t' declared here 72 | typedef void (*__sighandler_t) (int); | ^~~~~~~~~~~~~~ ltp-pan.c:489:17: error: too many arguments to function 'wait_handler'; expected 0, have 1 489 | wait_handler(SIGINT); | ^~~~~~~~~~~~ ~~~~~~ Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/mcelog/mce-test/0001-gcov_merge.py-scov_merge.py-switch-to-python3.patch2
-rw-r--r--meta-oe/recipes-support/mcelog/mce-test/0001-ltp-pan-fix-wait_handler-declaration.patch47
-rw-r--r--meta-oe/recipes-support/mcelog/mce-test_git.bb7
3 files changed, 52 insertions, 4 deletions
diff --git a/meta-oe/recipes-support/mcelog/mce-test/0001-gcov_merge.py-scov_merge.py-switch-to-python3.patch b/meta-oe/recipes-support/mcelog/mce-test/0001-gcov_merge.py-scov_merge.py-switch-to-python3.patch
index 969bfc17cf..80b9ae23b3 100644
--- a/meta-oe/recipes-support/mcelog/mce-test/0001-gcov_merge.py-scov_merge.py-switch-to-python3.patch
+++ b/meta-oe/recipes-support/mcelog/mce-test/0001-gcov_merge.py-scov_merge.py-switch-to-python3.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] gcov_merge.py/scov_merge.py: switch to python3
5 5
6Make gcov_merge.py and scov_merge.py port to python3. 6Make gcov_merge.py and scov_merge.py port to python3.
7 7
8Upstream-Status: Pending 8Upstream-Status: Submitted [https://github.com/andikleen/mce-test/pull/8]
9 9
10Signed-off-by: Mingli Yu <mingli.yu@windriver.com> 10Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
11--- 11---
diff --git a/meta-oe/recipes-support/mcelog/mce-test/0001-ltp-pan-fix-wait_handler-declaration.patch b/meta-oe/recipes-support/mcelog/mce-test/0001-ltp-pan-fix-wait_handler-declaration.patch
new file mode 100644
index 0000000000..3b2e9502ae
--- /dev/null
+++ b/meta-oe/recipes-support/mcelog/mce-test/0001-ltp-pan-fix-wait_handler-declaration.patch
@@ -0,0 +1,47 @@
1From 3f1f2d143a1e365bb0451609d08194756951099a Mon Sep 17 00:00:00 2001
2From: Martin Jansa <martin.jansa@gmail.com>
3Date: Tue, 22 Apr 2025 18:03:24 +0000
4Subject: [PATCH] ltp-pan: fix wait_handler declaration
5
6to match definition in:
7tools/ltp-pan/ltp-pan.c:wait_handler( int sig )
8
9* fixes build with gcc-15:
10 http://errors.yoctoproject.org/Errors/Details/852857/
11
12ltp-pan.c: In function 'main':
13ltp-pan.c:459:19: error: assignment to '__sighandler_t' {aka 'void (*)(int)'} from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types]
14 459 | sa.sa_handler = wait_handler;
15 | ^
16In file included from ltp-pan.c:67:
17zoolib.h:52:6: note: 'wait_handler' declared here
18 52 | void wait_handler();
19 | ^~~~~~~~~~~~
20In file included from TOPDIR/tmp/work/core2-64-oe-linux/mce-test/20230601+git/recipe-sysroot/usr/include/sys/param.h:28,
21 from ltp-pan.c:56:
22TOPDIR/tmp/work/core2-64-oe-linux/mce-test/20230601+git/recipe-sysroot/usr/include/signal.h:72:16: note: '__sighandler_t' declared here
23 72 | typedef void (*__sighandler_t) (int);
24 | ^~~~~~~~~~~~~~
25ltp-pan.c:489:17: error: too many arguments to function 'wait_handler'; expected 0, have 1
26 489 | wait_handler(SIGINT);
27 | ^~~~~~~~~~~~ ~~~~~~
28
29Upstream-Status: Submitted [https://github.com/andikleen/mce-test/pull/9]
30Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
31---
32 tools/ltp-pan/zoolib.h | 2 +-
33 1 file changed, 1 insertion(+), 1 deletion(-)
34
35diff --git a/tools/ltp-pan/zoolib.h b/tools/ltp-pan/zoolib.h
36index 8b4049e..34ce76f 100644
37--- a/tools/ltp-pan/zoolib.h
38+++ b/tools/ltp-pan/zoolib.h
39@@ -49,7 +49,7 @@ extern char zoo_error[ZELEN];
40 int lock_file( FILE *fp, short ltype, char **errmsg );
41 /* FILE *open_file( char *file, char *mode, char **errmsg ); */
42
43-void wait_handler();
44+void wait_handler(int sig);
45
46 /* char *zoo_active( void ); */
47 /* zoo_getname(): create a filename to use for the zoo
diff --git a/meta-oe/recipes-support/mcelog/mce-test_git.bb b/meta-oe/recipes-support/mcelog/mce-test_git.bb
index c43651f6eb..c1661b5ed4 100644
--- a/meta-oe/recipes-support/mcelog/mce-test_git.bb
+++ b/meta-oe/recipes-support/mcelog/mce-test_git.bb
@@ -11,9 +11,10 @@ LICENSE = "GPL-2.0-only"
11LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" 11LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
12 12
13SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mce-test.git;protocol=git;branch=master \ 13SRC_URI = "git://git.kernel.org/pub/scm/utils/cpu/mce/mce-test.git;protocol=git;branch=master \
14 file://makefile-remove-ldflags.patch \ 14 file://makefile-remove-ldflags.patch \
15 file://0001-gcov_merge.py-scov_merge.py-switch-to-python3.patch \ 15 file://0001-gcov_merge.py-scov_merge.py-switch-to-python3.patch \
16 " 16 file://0001-ltp-pan-fix-wait_handler-declaration.patch \
17"
17SRCREV = "9d11fc3e05eae7b454efeb5941beded56f80445b" 18SRCREV = "9d11fc3e05eae7b454efeb5941beded56f80445b"
18PV = "20230601+git" 19PV = "20230601+git"
19 20