-
Notifications
You must be signed in to change notification settings - Fork 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
CMake: Fix Cortex-A9 flags for GCC_ARM toolchain #14411
CMake: Fix Cortex-A9 flags for GCC_ARM toolchain #14411
Conversation
@hugueskamba, thank you for your changes. |
Could you give more information about how the dummy build test fails? Maybe we can get it working by using |
@Patater This is really useful information, I wish I knew it earlier. It solves the dummy compiler check which prevented me from using better solution in #14401. In any case I think we should set this variable in |
@LDong-Arm as you pointed out, this is related to https://gitlab.kitware.com/cmake/cmake/-/issues/21173, isn't it? We shall review try compile target as static separately. I'll log this into our backlog. |
I don't think it's related - this PR is about I think @Patater's suggestion is likely enough for this PR. |
We discussed the static type back in December but we had other issues with flags we wanted to fix #13987 (comment). @multiplemonomials Please review |
Here is the build output:
|
Using The errors are:
|
Yes, in most cases I'd recommend avoiding setting
If it's the first one, which is what it sounds like here, then we just need to find the right flags. If it's the second issue, then the appropriate flags need to get moved to CMAKE_CXX_FLAGS etc, because having incorrect flags like that will cause a lot of stuff inside CMake to go haywire. |
The -mcpu=cortex-a9 flag conflicts with the march=armv7-a flag. Opted to keep mcpu=cortex-a9 as it is more specific and allows GCC to perform better optimization. The compiler is also changed to use soft-float ABI as it was necessary to successfully build. Without it the application appears to be built with soft-float ABI and it conflicts with the previous setting which was built with hard-float ABI. This may be related to: https://gitlab.kitware.com/cmake/cmake/-/issues/21173
b01168f
to
b193d97
Compare
This force-push uses |
CI started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
The
-mcpu=cortex-a9
flag conflicts with the-march=armv7-a
flag. Opted to keep-mcpu=cortex-a9
as it is more specific and allows GCC to perform better optimization.The compiler is also changed to use soft-float ABI as it was necessary to successfully build. Without it the application appears to be built with soft-float ABI and it conflicts with the previous setting which was built with hard-float ABI.
This may be related to: https://gitlab.kitware.com/cmake/cmake/-/issues/21173
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers
@0xc0170 @LDong-Arm @Patater