Skip to content
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

[analyzer] Adds -fno-freestanding to ignored GCC compiler flags #4281

Merged
merged 3 commits into from
Jul 8, 2024

Conversation

ArchieAtkinson
Copy link
Contributor

-ffreestanding and -fno-freestanding are common in embedded systems but clang does not support it. This PR adds them both to the ignored GCC compiler flags list.

@whisperity whisperity added analyzer 📈 Related to the analyze commands (analysis driver) config ⚙️ labels Jun 30, 2024
@bruntib
Copy link
Contributor

bruntib commented Jul 3, 2024

Is it possible that only an old Clang version doesn't support this flag? I can see this in the current Clang docs: https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-ffreestanding

@ArchieAtkinson
Copy link
Contributor Author

Is it possible that only an old Clang version doesn't support this flag? I can see this in the current Clang docs: https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-ffreestanding

Odd, I'm running 17.0.6 and I get this:

[INFO 2024-07-04 18:39] - Starting static analysis ...
[ERROR 2024-07-04 18:39] - Analyzing main.cpp with clang-tidy  failed!
[ERROR 2024-07-04 18:39] - 
error: unknown argument: '-fno-freestanding' [clang-diagnostic-error]

[ERROR 2024-07-04 18:39] - 

@ArchieAtkinson
Copy link
Contributor Author

Is it possible that only an old Clang version doesn't support this flag? I can see this in the current Clang docs: https://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-ffreestanding

Updated to only ignore -fno-freestanding, which isn't supported by clang (Godbolt) while -freestanding is (Godbolt)

@ArchieAtkinson ArchieAtkinson changed the title [analyzer] Adds -ffreestanding to ignored GCC compiler flags [analyzer] Adds -fno-freestanding to ignored GCC compiler flags Jul 7, 2024
Co-authored-by: bruntib <bruntib@users.noreply.github.com>
@bruntib bruntib merged commit 4c33c5a into Ericsson:master Jul 8, 2024
7 of 8 checks passed
@bruntib bruntib added this to the release 6.24.1 milestone Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer 📈 Related to the analyze commands (analysis driver) config ⚙️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants