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

Fix for building on aarch64 with 32-bit OS #1015

Merged
merged 2 commits into from
May 16, 2023

Conversation

dkostic
Copy link
Contributor

@dkostic dkostic commented May 15, 2023

Issues:

N/A

Description of changes:

In some cases, when building on a 64-bit Arm architecture (aarch64)
that runs a 32-bit OS, CMake sets CMAKE_SYSTEM_PROCESSOR = aarch64.
This change adds an additional check (similarly as for x86) that correctly
initializes the build in the above described situation.

Call-outs:

Point out areas that need special attention or support during the review process. Discuss architecture or design changes.

Testing:

How is this change tested (unit tests, fuzz tests, etc.)? Are there any testing steps to be verified by the reviewer?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@@ -682,7 +682,14 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86|i386|i686")
set(ARCH "x86")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm64.*|ARM64|aarch64")
set(ARCH "aarch64")
# If ARCH is originally detected as 64-bit, perform an additional check
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this only an Arm issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's also x86 issue but it was already fixed, see few lines above

@dkostic dkostic merged commit a34d07c into aws:main May 16, 2023
@dkostic dkostic deleted the fix-cmake-arm-32vs64bit branch May 16, 2023 14:20
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.

4 participants