[2/2] buildcpio.py: Apply patch to fix build with -fno-common

Submitted by Khem Raj on Aug. 16, 2020, 6:42 a.m. | Patch ID: 175359

Details

Message ID 20200816064216.1142587-2-raj.khem@gmail.com
State Master Next
Commit 975281cb7520599638ddb748a81f308dcd482581
Headers show

Commit Message

Khem Raj Aug. 16, 2020, 6:42 a.m.
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>
---
 meta/lib/oeqa/runtime/cases/buildcpio.py | 3 ++-
 meta/lib/oeqa/sdk/cases/buildcpio.py     | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta/lib/oeqa/runtime/cases/buildcpio.py b/meta/lib/oeqa/runtime/cases/buildcpio.py
index d0f91668b2..e29bf16ccb 100644
--- a/meta/lib/oeqa/runtime/cases/buildcpio.py
+++ b/meta/lib/oeqa/runtime/cases/buildcpio.py
@@ -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()
diff --git a/meta/lib/oeqa/sdk/cases/buildcpio.py b/meta/lib/oeqa/sdk/cases/buildcpio.py
index 902e93f623..6fce47d953 100644
--- a/meta/lib/oeqa/sdk/cases/buildcpio.py
+++ b/meta/lib/oeqa/sdk/cases/buildcpio.py
@@ -28,6 +28,7 @@  class BuildCpioTest(OESDKTestCase):
             self.assertTrue(os.path.isdir(dirs["source"]))
             os.makedirs(dirs["build"])
 
+            self._run("cd {source} && sed -i -e '/char \*program_name/d' 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))