Skip to content

Conversation

reshmavk
Copy link

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/

@firewave
Copy link
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
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
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
Copy link
Author

reshmavk commented Oct 8, 2025

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

Copy link

sonarqubecloud bot commented Oct 8, 2025

@danmar
Copy link
Owner

danmar commented Oct 9, 2025

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

@firewave
Copy link
Collaborator

firewave commented Oct 9, 2025

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

What error are you referring to?

@reshmavk
Copy link
Author

reshmavk commented Oct 9, 2025

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

@firewave
Copy link
Collaborator

firewave commented Oct 9, 2025

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
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
Copy link
Owner

danmar commented Oct 12, 2025

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

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