Skip to content

Conversation

@logic-wei
Copy link

The CMakeLists.txt can only build the target for host. So I add the cross-compile support.

I have only tested cross-compilation on the aarch64 platform. If you need to compile for other platforms, you just need to make a few minor modifications.

How to build:

  1. mkdir build; cd build
  2. cmake -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc ../examples/c/
  3. make

Signed-off-by: weipeng <wp387925@alibaba-inc.com>
Copy link
Collaborator

@danielocfb danielocfb left a comment

Choose a reason for hiding this comment

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

Nice work. I have one question, please see below.

weipeng added 2 commits December 3, 2025 10:48
Signed-off-by: weipeng <wp387925@alibaba-inc.com>
…otential

problem.

See the issuse: libbpf#354

Signed-off-by: weipeng <wp387925@alibaba-inc.com>
Copy link
Collaborator

@danielocfb danielocfb left a comment

Choose a reason for hiding this comment

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

It's not what I meant but it's acceptable to me. CI is broken, though, due to 53a23f7 cc @anakryiko

@anakryiko anakryiko merged commit ad4ebde into libbpf:master Dec 4, 2025
14 of 24 checks passed
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.

3 participants