]> code.ossystems Code Review - openembedded-core.git/commitdiff
buildcpio.py: Apply patch to fix build with -fno-common
authorKhem Raj <raj.khem@gmail.com>
Mon, 17 Aug 2020 03:30:15 +0000 (20:30 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 18 Aug 2020 10:43:32 +0000 (11:43 +0100)
This sed expression implements the needed patch to fix compilation with
-fno-common, hopefully this patch will get included in 2.14 release and
we can remove this operation

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/cases/buildcpio.py
meta/lib/oeqa/sdk/cases/buildcpio.py

index d0f91668b230f09aadb1aa4be54a6c752a5483c1..e29bf16ccb0d0ec8ba455522c71c2863a1e7fddb 100644 (file)
@@ -27,6 +27,7 @@ class BuildCpioTest(OERuntimeTestCase):
     @OEHasPackage(['autoconf'])
     def test_cpio(self):
         self.project.download_archive()
-        self.project.run_configure('--disable-maintainer-mode','')
+        self.project.run_configure('--disable-maintainer-mode',
+                                   'sed -i -e "/char \*program_name/d" src/global.c;')
         self.project.run_make()
         self.project.run_install()
index 902e93f623b471bea444e0b621c5f4f36087327c..e565826541610e0722b0b6c7cbca5d03b7738279 100644 (file)
@@ -28,6 +28,7 @@ class BuildCpioTest(OESDKTestCase):
             self.assertTrue(os.path.isdir(dirs["source"]))
             os.makedirs(dirs["build"])
 
+            self._run("sed -i -e '/char.*program_name/d' {source}/src/global.c".format(**dirs))
             self._run("cd {build} && {source}/configure --disable-maintainer-mode $CONFIGURE_FLAGS".format(**dirs))
             self._run("cd {build} && make -j".format(**dirs))
             self._run("cd {build} && make install DESTDIR={install}".format(**dirs))