Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: fix native build on arm #262

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

bene42
Copy link

@bene42 bene42 commented Oct 12, 2023

uname -m on 32bit Arm platforms (little endian) report a machine string like armv5tejl, armv7l or armv8l.

A native build on these machines fail:

CMake Error at lib/processor/CMakeLists.txt:1 (add_subdirectory):
add_subdirectory given source "armv8l" which is not an existing directory.

Set PROJECT_PROCESSOR to arm on these machines.

uname -m on 32bit Arm platforms (little endian) report a machine string
like armv5tejl, armv7l or armv8l.

A native build on these machines fail:

CMake Error at lib/processor/CMakeLists.txt:1 (add_subdirectory):
  add_subdirectory given source "armv8l" which is not an existing directory.

Set PROJECT_PROCESSOR to arm on these machines.

Signed-off-by: Benedikt Spranger <[email protected]>
@arnopo
Copy link
Contributor

arnopo commented Oct 24, 2023

Hello @bene42
Do you have some examples, how other project manage this?
Look like Zephyr use ARCH set(CMAKE_SYSTEM_PROCESSOR ${ARCH})

I wonder if we should not use it also instead of having an exhaustive list.
could you confirm as a first step the value of ${ARCH} in your build environment?

@bene42
Copy link
Author

bene42 commented Oct 25, 2023

Hello @bene42 Do you have some examples, how other project manage this? Look like Zephyr use ARCH set(CMAKE_SYSTEM_PROCESSOR ${ARCH})

I wonder if we should not use it also instead of having an exhaustive list. could you confirm as a first step the value of ${ARCH} in your build environment?

I look into that, but it take some time. I am more familiar with the autotools universe rather then cmake.
From that universe I can report that there is a rather huge switch-case logic involved. Maybe cmake hides it better... :)

Copy link

This pull request has been marked as a stale pull request because it has been open (more than) 45 days with no activity.

@github-actions github-actions bot added the Stale label Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants