Skip to content

cross-compile for ARM#365

Closed
harp-intel wants to merge 17 commits into
mainfrom
armbuild
Closed

cross-compile for ARM#365
harp-intel wants to merge 17 commits into
mainfrom
armbuild

Conversation

@harp-intel
Copy link
Copy Markdown
Contributor

Use the Go compiler's cross-compilation feature to build perfspect for aarch64.

Much more to-do, e.g., build binary resources for aarch64.

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
harp-intel added 16 commits June 4, 2025 15:57
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
@echiugoog
Copy link
Copy Markdown
Contributor

LGTM, this minimizes needing an ARM host for building

@harp-intel
Copy link
Copy Markdown
Contributor Author

harp-intel commented Jun 5, 2025

LGTM, this minimizes needing an ARM host for building

That's the idea. Was able to get Linux perf built (cross-compiled) but still considering options for the other tools, e.g., use QEMU or spin up an ARM VM on AWS or GCP.

@echiugoog
Copy link
Copy Markdown
Contributor

I'm going through the other tools, might not be too bad... dmidecode was pretty simple to cross-compile, something like echiugoog@5414e3e

Comment thread tools/Makefile
mkdir -p bin
cp linux_perf/tools/perf/perf bin/
strip --strip-unneeded bin/perf
-strip --strip-unneeded bin/perf || true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For aarch64, you can use aarch64-linux-gnu-strip

@echiugoog
Copy link
Copy Markdown
Contributor

For tools, what do you think of this approach? https://github.com/echiugoog/PerfSpect/tree/tools-cross-compile-arm

@harp-intel
Copy link
Copy Markdown
Contributor Author

For tools, what do you think of this approach? https://github.com/echiugoog/PerfSpect/tree/tools-cross-compile-arm

I like it. Thanks. Just need to make sure the build container is configured with the required cross-compile packages.

@echiugoog
Copy link
Copy Markdown
Contributor

I finished cross-compile work for aarch64 here: https://github.com/echiugoog/PerfSpect/tree/tools-cross-compile-arm

@harp-intel
Copy link
Copy Markdown
Contributor Author

I finished cross-compile work for aarch64 here: https://github.com/echiugoog/PerfSpect/tree/tools-cross-compile-arm

Hi @echiugoog. Thanks. I haven't been able to spend any time here for a while as other things took priority. I took a quick look at your branch. From what I can tell, it all looks reasonable. Please open a PR when you're ready.

@harp-intel
Copy link
Copy Markdown
Contributor Author

addressed by another PR

@harp-intel harp-intel closed this Jul 5, 2025
@harp-intel harp-intel deleted the armbuild branch July 5, 2025 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants