Skip to content

fix: Correctly handle ARM64 cross-compilation#255

Open
taskset wants to merge 1 commit intoclMathLibraries:masterfrom
taskset:fix_for_arm64
Open

fix: Correctly handle ARM64 cross-compilation#255
taskset wants to merge 1 commit intoclMathLibraries:masterfrom
taskset:fix_for_arm64

Conversation

@taskset
Copy link

@taskset taskset commented Dec 18, 2025

The previous CMake script unconditionally added -m64 or -m32 flags for GCC builds based on the BUILD64 variable. This caused build failures when cross-compiling for ARM64, as the ARM toolchain does not recognize the -m64 flag.

This patch introduces a check for the target architecture. The -m64 and -m32 flags are now only applied for non-ARM architectures, resolving the cross-compilation issue.

The previous CMake script unconditionally added `-m64` or `-m32` flags for GCC builds based on the `BUILD64` variable. This caused build failures when cross-compiling for ARM64, as the ARM toolchain does not recognize the `-m64` flag.

This patch introduces a check for the target architecture. The `-m64` and `-m32` flags are now only applied for non-ARM architectures, resolving the cross-compilation issue.
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.

1 participant