Skip to content

fixed #14158 - Disable the use of getloadavg(), my_fpe(), feenableexcept() and -rdynamic in AIX#7856

Merged
firewave merged 3 commits into
cppcheck-opensource:mainfrom
reshmavk:cppcheck-for-aix
Oct 14, 2025
Merged

fixed #14158 - Disable the use of getloadavg(), my_fpe(), feenableexcept() and -rdynamic in AIX#7856
firewave merged 3 commits into
cppcheck-opensource:mainfrom
reshmavk:cppcheck-for-aix

Conversation

@reshmavk

Copy link
Copy Markdown
Contributor

In AIX, getloadavg, feenableexcept and my_fpe are not available. In addition, -rdynamic flag is not supported. This results in compilation errors in AIX and this patch fixes it.
For more information please refer the discussion : https://sourceforge.net/p/cppcheck/discussion/development/thread/f7bad36f1f/

Comment thread test/signal/CMakeLists.txt Outdated
Comment thread test/signal/CMakeLists.txt Outdated
Comment thread cli/processexecutor.cpp Outdated
@firewave

Copy link
Copy Markdown
Collaborator

Thanks for your contribution.

Could you also verify that a make build with RDYNAMIC= works? Thanks.

@firewave firewave changed the title Disable the use of getloadavg, my_fpe, feenableexcept and -rdynamic in AIX Disable the use of getloadavg(), my_fpe(), feenableexcept() and -rdynamic in AIX Sep 25, 2025
@firewave firewave self-assigned this Sep 25, 2025
@firewave

Copy link
Copy Markdown
Collaborator

Side note for future cleanup: there is https://cmake.org/cmake/help/latest/module/CheckLinkerFlag.html which allows us to check if a linker option is available - but it was only added in CMake 3.18.

@firewave

Copy link
Copy Markdown
Collaborator

Oh, and please add the name you want to be credited with to the AUTHORS file.

@firewave firewave changed the title Disable the use of getloadavg(), my_fpe(), feenableexcept() and -rdynamic in AIX fixed #14158 - Disable the use of getloadavg(), my_fpe(), feenableexcept() and -rdynamic in AIX Sep 25, 2025
@reshmavk

reshmavk commented Oct 8, 2025

Copy link
Copy Markdown
Contributor Author

I have made the requested changes.
I also tried make build with RDYNAMIC= , but this didn't help in resolving the error.

@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2025

Copy link
Copy Markdown

@danmar

danmar commented Oct 9, 2025

Copy link
Copy Markdown
Collaborator

It looks good to me but I would like approval from @firewave also

@firewave

firewave commented Oct 9, 2025

Copy link
Copy Markdown
Collaborator

I also tried make build with RDYNAMIC= , but this didn't help in resolving the error.

What error are you referring to?

@reshmavk

reshmavk commented Oct 9, 2025

Copy link
Copy Markdown
Contributor Author

The compilation fails with the error g++: error: unrecognized command-line option '-rdynamic' since -rdynamic is not supported in AIX.

@firewave

firewave commented Oct 9, 2025

Copy link
Copy Markdown
Collaborator

Strange.

I did some tests and make RDYNAMIC= should work. Please be aware that RDYNAMIC= make does not work (potentially a shortcoming which will look into with future changes).

@firewave

Copy link
Copy Markdown
Collaborator

I did some tests and make RDYNAMIC= should work. Please be aware that RDYNAMIC= make does not work (potentially a shortcoming which will look into with future changes).

The shortcoming is being addressed by an external submission: #7877

@danmar

danmar commented Oct 12, 2025

Copy link
Copy Markdown
Collaborator

#7877 has been merged.. does make RDYNAMIC= work better now?

@reshmavk

Copy link
Copy Markdown
Contributor Author

In our case, we are doing a cmake build. So, -rdynamic gets passed from test/signal/CMakeLists.txt.

@firewave firewave merged commit aede22c into cppcheck-opensource:main Oct 14, 2025
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants