Skip to content

Commit 237fa40

Browse files
krajrpurdie
authored andcommitted
oeqa: Build cpio with C17 std
cpio is not yet buildable with C23 standard which is default with GCC 15, therefore ensure to apply needed bandage to keep it compiling in C17 mode even with GCC 15 (From OE-Core rev: 6abab2909c2cb73c4dfcd174f7db5ffe647ed3a8) Signed-off-by: Khem Raj <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
1 parent 7f09d85 commit 237fa40

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

meta/lib/oeqa/runtime/cases/buildcpio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ def tearDownClass(cls):
2929
@OEHasPackage(['autoconf'])
3030
def test_cpio(self):
3131
self.project.download_archive()
32-
self.project.run_configure()
33-
self.project.run_make()
32+
self.project.run_configure(configure_args="CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration'")
33+
self.project.run_make(make_args="CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration'")
3434
self.project.run_install()

meta/lib/oeqa/sdk/cases/autotools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ def test_cpio(self):
3535
self.assertTrue(os.path.isdir(dirs["source"]))
3636
os.makedirs(dirs["build"])
3737

38-
self._run("cd {build} && {source}/configure $CONFIGURE_FLAGS".format(**dirs))
39-
self._run("cd {build} && make -j".format(**dirs))
38+
self._run("cd {build} && {source}/configure CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration' $CONFIGURE_FLAGS".format(**dirs))
39+
self._run("cd {build} && make CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration' -j".format(**dirs))
4040
self._run("cd {build} && make install DESTDIR={install}".format(**dirs))
4141

4242
self.check_elf(os.path.join(dirs["install"], "usr", "local", "bin", "cpio"))

meta/lib/oeqa/selftest/cases/meta_ide.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ def test_meta_ide_can_build_cpio_project(self):
4747
"https://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.gz",
4848
self.tmpdir_metaideQA, self.td['DATETIME'], dl_dir=dl_dir)
4949
self.project.download_archive()
50-
self.assertEqual(self.project.run_configure('$CONFIGURE_FLAGS'), 0,
50+
self.assertEqual(self.project.run_configure('CFLAGS="-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration" $CONFIGURE_FLAGS'), 0,
5151
msg="Running configure failed")
52-
self.assertEqual(self.project.run_make(), 0,
52+
self.assertEqual(self.project.run_make(make_args="CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration'"), 0,
5353
msg="Running make failed")
5454
self.assertEqual(self.project.run_install(), 0,
5555
msg="Running make install failed")

0 commit comments

Comments
 (0)