-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Add cross-compiling toolchain files for Android and Raspberry Pi. #1973
Conversation
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.
I can use raspberry_pi.cmake
compiler raspberry pi version. But if use the make j
command, the compilation process may be interrupted due to the error.
# | ||
# Also you can set CMAKE_C/CXX_COMPILER yourself, through cmake arguments. | ||
|
||
IF(NOT RPI) |
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.
这个不需要判断吧,include(raspberry_pi.cmake)前已经判断了。
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.
每个toolchain file最开始都做了双重判断。留着保险一些吧。
@hedaoyuan Thank you for your try. I have reproduced the compiling error. It is because of the misuse of |
cmake/external/openblas.cmake
Outdated
SET(COMMON_ARGS CC=${CMAKE_C_COMPILER} NO_LAPACK=1 NO_SHARED=1) | ||
|
||
IF(ANDROID) | ||
SET(OPENBLAS_COMMIT "b5c96fcfcdc82945502a2303116a64d89985daf5") |
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.
用这个commit是什么原因呢 支持android?
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.
OpenBLAS为支持softfp新开的一个分支arm_soft_fp_abi,主分支只支持hardfp,Android上运行有些问题。
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.
明白了
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.
我加个注释说明一下吧~
ENDIF() | ||
ENDIF() | ||
|
||
# prefix and suffix on different os | ||
IF(WIN32) |
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.
👍
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.
LGTM
@hedaoyuan 建议写一个 |
相关PR:#1698, #1835