Skip to contentSkip to conversation

perfetto: Use gn from native sysroot

PATCH New Khem Raj 1 participant 1 message Sep 27, 2025

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 perfetto: Use gn from native sysroot

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.

---
 meta-oe/recipes-devtools/perfetto/perfetto.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta-oe/recipes-devtools/perfetto/perfetto.bb +3 -3
index a2a4c9f39e..d697485e69 100644
@@ -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 ..