-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 ARM build issues #3602
Fix ARM build issues #3602
Conversation
Let's give it a try? 🤷 |
Is the regex reasonable? Inspired from here: https://github.com/opencv/opencv/blob/8c221981bf7e2c8eb87302d70000aa246641487c/cmake/OpenCVDetectCXXCompiler.cmake#L91 The typo is a real bug. |
Probably not. |
Btw, we also use AMD64, but not amd64 which seems to be more common. Out of scope. |
The conditional processor/architecture dependent stuff is full of redundancies and old cruft. Needs to be rewritten at some time. |
CMakeLists.txt
Outdated
@@ -201,9 +201,9 @@ elseif(GNU_GCC OR LLVM_CLANG) | |||
# TODO(rryan): macOS can use SSE3, and possibly SSE 4.1 once | |||
# we require macOS 10.12. | |||
# https://stackoverflow.com/questions/45917280/mac-osx-minumum-support-sse-version | |||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm") | |||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm.*") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This regex does not work now, because it matches a "armv8b" which is a arm64. This means it matches some arm64.
Please revert to the original and add a comment why this is correct.
Something like:
// CMAKE_SYSTEM_PROCESSOR is just "arm" for all 32 bit ARMs. These flags are not valid with AArch64 and ARMv8 targets where CMAKE_SYSTEM_PROCESSOR is one of ("aarch64_be (arm64)", "aarch64 (arm64)", "armv8b (arm64 compat)" and "armv8l (arm64 compat)".
Someone else may take over. |
Final proposal. I am not doing research on ARM architectures. |
You may add the comments you think are required later. |
...just in case and for consistency
Btw, STREQUAL "arm" never worked, because otherwise the bug would have been detected. |
Thank you. |
No, it won't fix the NaN issue. This was just a bycatch. |
Typo & detection