From 4d6f772ff10695816781985f41e818efe8ec0e8c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 26 Sep 2025 22:51:05 -0700 Subject: [PATCH] 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. Signed-off-by: Khem Raj Cc: Ross Burton --- meta-oe/recipes-devtools/perfetto/perfetto.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ..