Fix error like:
Fatal error: can't create 
tests/ptimer-test.p/..._qemu-5.2.0_hw_core_ptimer.c.o: File name too long

Signed-off-by: Changqing Li <[email protected]>
---
 meta/recipes-devtools/qemu/qemu.inc           |  1 +
 ...d-use-relative-path-to-refer-to-file.patch | 34 +++++++++++++++++++
 2 files changed, 35 insertions(+)
 create mode 100644 
meta/recipes-devtools/qemu/qemu/0001-tests-meson.build-use-relative-path-to-refer-to-file.patch

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index cfa65f99d0..c894b81b10 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -29,6 +29,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
            file://mingwfix.patch \
            file://mmap.patch \
            file://mmap2.patch \
+           
file://0001-tests-meson.build-use-relative-path-to-refer-to-file.patch \
            "
 UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
 
diff --git 
a/meta/recipes-devtools/qemu/qemu/0001-tests-meson.build-use-relative-path-to-refer-to-file.patch
 
b/meta/recipes-devtools/qemu/qemu/0001-tests-meson.build-use-relative-path-to-refer-to-file.patch
new file mode 100644
index 0000000000..5cb5757c37
--- /dev/null
+++ 
b/meta/recipes-devtools/qemu/qemu/0001-tests-meson.build-use-relative-path-to-refer-to-file.patch
@@ -0,0 +1,34 @@
+From a4bdc0416134477e4eae386db04b1de7491163bb Mon Sep 17 00:00:00 2001
+From: Changqing Li <[email protected]>
+Date: Thu, 14 Jan 2021 06:33:04 +0000
+Subject: [PATCH] tests/meson.build: use relative path to refer to files
+
+Fix error like:
+Fatal error: can't create 
tests/ptimer-test.p/..._qemu-5.2.0_hw_core_ptimer.c.o: File name too long
+
+when build path is too long, use meson.source_root() will make this
+filename too long. Fixed by using relative path to refer to files
+
+Upstream-Status: Submitted [send to qemu-devel]
+
+Signed-off-by: Changqing Li <[email protected]>
+---
+ tests/meson.build   | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletion(-)
+
+diff --git a/tests/meson.build b/tests/meson.build
+index afeb6be..54684b5 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -113,7 +113,7 @@ tests = {
+   'test-keyval': [testqapi],
+   'test-logging': [],
+   'test-uuid': [],
+-  'ptimer-test': ['ptimer-test-stubs.c', meson.source_root() / 
'hw/core/ptimer.c'],
++  'ptimer-test': ['ptimer-test-stubs.c', '../hw/core/ptimer.c'],
+   'test-qapi-util': [],
+ }
+ 
+-- 
+2.29.2
+
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#146676): 
https://lists.openembedded.org/g/openembedded-core/message/146676
Mute This Topic: https://lists.openembedded.org/mt/79671096/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to