summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2025-03-19 01:16:07 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-24 17:29:16 +0000
commitb76c04bdcbc527b76c0811822d4ca8200ba809b4 (patch)
tree3b30e15c47435633b0849e672f41c14bb5c5e5a9
parent6edb7e77f1342cb63f11067c50f9a2b10f10b3b9 (diff)
downloadpoky-b76c04bdcbc527b76c0811822d4ca8200ba809b4.tar.gz
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: 0c637099887f1be421c8e1203f99631a1e040150) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/runtime/cases/buildcpio.py4
-rw-r--r--meta/lib/oeqa/sdk/cases/autotools.py4
-rw-r--r--meta/lib/oeqa/selftest/cases/meta_ide.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/meta/lib/oeqa/runtime/cases/buildcpio.py b/meta/lib/oeqa/runtime/cases/buildcpio.py
index 7be734cb4f..0c9c57a3cb 100644
--- a/meta/lib/oeqa/runtime/cases/buildcpio.py
+++ b/meta/lib/oeqa/runtime/cases/buildcpio.py
@@ -29,6 +29,6 @@ class BuildCpioTest(OERuntimeTestCase):
29 @OEHasPackage(['autoconf']) 29 @OEHasPackage(['autoconf'])
30 def test_cpio(self): 30 def test_cpio(self):
31 self.project.download_archive() 31 self.project.download_archive()
32 self.project.run_configure() 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() 33 self.project.run_make(make_args="CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration'")
34 self.project.run_install() 34 self.project.run_install()
diff --git a/meta/lib/oeqa/sdk/cases/autotools.py b/meta/lib/oeqa/sdk/cases/autotools.py
index 4bac28f04d..b3a71f2aa5 100644
--- a/meta/lib/oeqa/sdk/cases/autotools.py
+++ b/meta/lib/oeqa/sdk/cases/autotools.py
@@ -35,8 +35,8 @@ class AutotoolsTest(OESDKTestCase):
35 self.assertTrue(os.path.isdir(dirs["source"])) 35 self.assertTrue(os.path.isdir(dirs["source"]))
36 os.makedirs(dirs["build"]) 36 os.makedirs(dirs["build"])
37 37
38 self._run("cd {build} && {source}/configure $CONFIGURE_FLAGS".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 -j".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))
40 self._run("cd {build} && make install DESTDIR={install}".format(**dirs)) 40 self._run("cd {build} && make install DESTDIR={install}".format(**dirs))
41 41
42 self.check_elf(os.path.join(dirs["install"], "usr", "local", "bin", "cpio")) 42 self.check_elf(os.path.join(dirs["install"], "usr", "local", "bin", "cpio"))
diff --git a/meta/lib/oeqa/selftest/cases/meta_ide.py b/meta/lib/oeqa/selftest/cases/meta_ide.py
index 5a17ca52ea..c3a7df4cdf 100644
--- a/meta/lib/oeqa/selftest/cases/meta_ide.py
+++ b/meta/lib/oeqa/selftest/cases/meta_ide.py
@@ -47,9 +47,9 @@ class MetaIDE(OESelftestTestCase):
47 "https://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.gz", 47 "https://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.gz",
48 self.tmpdir_metaideQA, self.td['DATETIME'], dl_dir=dl_dir) 48 self.tmpdir_metaideQA, self.td['DATETIME'], dl_dir=dl_dir)
49 self.project.download_archive() 49 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,
51 msg="Running configure failed") 51 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,
53 msg="Running make failed") 53 msg="Running make failed")
54 self.assertEqual(self.project.run_install(), 0, 54 self.assertEqual(self.project.run_install(), 0,
55 msg="Running make install failed") 55 msg="Running make install failed")