Skip to content

Commit 33029a3

Browse files
committed
add ppc patch
1 parent 831d963 commit 33029a3

2 files changed

Lines changed: 23 additions & 9 deletions

File tree

‎tools/nix/cross-compile-perfetto-tools.nix‎

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ let
1111
(final: prev: {
1212
# Disable compiling tools we do not use
1313
perfetto = prev.perfetto.overrideAttrs (old: {
14-
gnFlags = old.gnFlags ++ [
15-
"enable_perfetto_x64_cpu_opt=false"
16-
''extra_target_ldflags="-static"''
17-
];
18-
doCheck = false;
19-
ninjaFlags = [ "trace_processor_shell" ];
20-
installPhase = "install -Dt $tools/bin $ninjaFlags";
21-
nativeInstallCheckInputs = [ ];
14+
gnFlags = old.gnFlags ++ [
15+
"enable_perfetto_x64_cpu_opt=false"
16+
''extra_target_ldflags="-static"''
17+
];
18+
doCheck = false;
19+
ninjaFlags = [ "trace_processor_shell" ];
20+
installPhase = "install -Dt $tools/bin $ninjaFlags";
21+
nativeInstallCheckInputs = [ ];
2222
});
2323
})
2424
(
@@ -85,6 +85,20 @@ let
8585
});
8686
}
8787
)
88+
// prev.lib.optionalAttrs (prev.stdenv.hostPlatform.system == "powerpc64le-linux") {
89+
perfetto = prev.perfetto.overrideAttrs (
90+
old:
91+
let
92+
patch = final.fetchpatch2 {
93+
url = "https://github.com/google/perfetto/commit/a7c43b904ba74e90e8971357b90fb6c98d6a47d1.patch?full_index=1";
94+
hash = "sha256-ERtRmwBsfNmVl+h8eoEnIDDFKVBXxnEn3/m/u1A5ywU=";
95+
};
96+
in
97+
{
98+
patches = (old.patches or [ ]) ++ final.lib.optional (!(builtins.elem patch old.patches)) patch;
99+
}
100+
);
101+
}
88102
)
89103
];
90104
};

‎tools/perfetto/trace_processor_shell.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
},
66
"linux-ppc64le": {
77
"crossSystem": "musl-power",
8-
"storePath": "/nix/store/i66m4s4agv26wiid9s8r6wgzq1ynvjba-perfetto-static-powerpc64le-unknown-linux-musl-59.1-tools/bin/trace_processor_shell"
8+
"storePath": "/nix/store/qk1qgscid4094r5g7sz6f91w5ha71y35-perfetto-static-powerpc64le-unknown-linux-musl-59.1-tools/bin/trace_processor_shell"
99
},
1010
"linux-s390x": {
1111
"crossSystem": "s390x",

0 commit comments

Comments
 (0)