-
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
Client Lite fails to compile with Mbed OS 6.0.0 Alpha 3 #12781
Comments
The first thing comes to my mind: However I dont understand why I am running it locally. |
Internal Jira reference: https://jira.arm.com/browse/MBOTRIAGE-2624 |
Nope, |
It seems to be that fact that the I also do have to admit that I don't know how the |
The -c option seems to imply not linking.
according to: https://gcc.gnu.org/onlinedocs/gcc.pdf (page 34). |
I can't compile mbed anymore at the moment to be able to reproduce, not able to investigate (antivirus thinks I am doing something wrong compiling this example 🙄 ) 😞 |
I think it's this expansion of the json blocks that now causes the -c to be there twice;
or linker can't accept the "-c", which now comes in via the common -block. It seems I can work around this issue by modifying the pico-profile to have the "-c" similarly broken out. That's at least my guess for now. |
Yes, that is correct. My understanding due to linking process suggestions for LTO to use the same flags,
To fix it, moving That PR should have been been "breaking" and I'll fix that now in PR #11856. |
Sure; this flag The release note I mentioned above:
|
When switching over to Mbed OS 6.0 Alpha 3 the most tight optimized version of Client Lite stopped compiling. A mysterious error popped up complaining "-c" option is not supported. After some git bisecting the offending commit was found a issue was back-traced to some workarounds done to avoid some LTO issues with GCC. ARMmbed/mbed-os#11856 Issue is that the gcc.py changes done now expand the parameters to linked from the ld-block and common-block. THe linker does not recognize the "-c" option expanded there from the common-block. However, we can work around this issue the same way the original Mbed OS PR did - split the -c out to asm, c and cxx blocks. This works with both Mbed OS 5.15.x and Mbed OS 6.0.0 Alpha 3. More details in Mbed OS issue [#12871](ARMmbed/mbed-os#12781)
Description of defect
Client Lite 1.0.0 with mbed_app.json fixes (hence the fork) does not compile with Mbed OS 6.0.0 Alpha 3 using the baremetal profiles. It compiles still with Alpha 2.
Target(s) affected by this defect ?
NRF52840_DK + BG96 cellular
Toolchain(s) (name and version) displaying this defect ?
gcc-arm-none-eabi-9-2019-q4-major
What version of Mbed-os are you using (tag or sha) ?
mbed-os-6.0.0-alpha-3
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
1.10.1
How is this defect reproduced ?
mbed compile -m NRF52840_DK -t GCC_ARM --profile profiles/pico_lte_size.json
[Warning] setup.cpp@429,9: unused variable 'ret' [-Wunused-variable]
Link: client-lite-example-internal
arm-none-eabi-cpp: fatal error: '-c' is not a valid option to the preprocessor
compilation terminated.
[ERROR] arm-none-eabi-cpp: fatal error: '-c' is not a valid option to the preprocessor
compilation terminated.
The text was updated successfully, but these errors were encountered: