diff mbox series

[meta-oe] perfetto: Use gn from native sysroot

Message ID 20250927055330.364599-1-raj.khem@gmail.com
State New
Headers show
Series [meta-oe] perfetto: Use gn from native sysroot | expand

Commit Message

Khem Raj Sept. 27, 2025, 5:53 a.m. UTC
Prebuilts shipped with sources is a x86_64 binary which works ok
on x86_64 build hosts, but we do have arm64 hosts quite commonly
used to build OE these days, where this fails miserably. Therefore
use the gn from gn-native, so we can get it targtted correctly for
build host architecture.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Ross Burton <ross.burton@arm.com>
---
 meta-oe/recipes-devtools/perfetto/perfetto.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/perfetto/perfetto.bb b/meta-oe/recipes-devtools/perfetto/perfetto.bb
index a2a4c9f39e..d697485e69 100644
--- a/meta-oe/recipes-devtools/perfetto/perfetto.bb
+++ b/meta-oe/recipes-devtools/perfetto/perfetto.bb
@@ -49,7 +49,7 @@  SRC_URI[gn.sha256sum] = "f706aaa0676e3e22f5fc9ca482295d7caee8535d1869f99efa23581
 
 require perfetto.inc
 
-DEPENDS += " ninja-native"
+DEPENDS += " ninja-native gn-native"
 
 # Use clang in order to enable traced_perf ( see https://github.com/google/perfetto/blob/092d0ceace6fa516fac1bd4e715c226eaaebe26e/gn/perfetto.gni#L177 ,
 # enable_perfetto_traced_perf depends on "is_clang")
@@ -73,8 +73,8 @@  do_configure () {
     cd ${S}
     # Rename a few build tools if they have not been renamed
     cd buildtools
-    x="gn-linux64-1968-0725d782"
-    [ -f $x ] && mkdir linux64 && mv $x linux64/gn
+
+    mkdir linux64 && cp ${RECIPE_SYSROOT_NATIVE}${bindir}/gn linux64/gn
     chmod +x linux64/gn
     cd ..