Description of problem: redhat-rpm-config injects flags to gfortran, which are appropriate for the C/C++ compiler and/or preprocessor but not for Fortran. Version-Release number of selected component (if applicable): redhat-rpm-config-252-1.fc38.noarch How reproducible: always Steps to Reproduce: 1. build an rpm containing Fortran code Actual results: three warnings are generated, which are not generated outside of rpmbuild f951: Warning: ‘-Werror=’ argument ‘-Werror=format-security’ is not valid for Fortran f951: Warning: -D_FORTIFY_SOURCE not defined annobin: test.f: Warning: -D_GLIBCXX_ASSERTIONS not defined Expected results: should not pass -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS to gfortran. Additional info: this has actually been around for a while, but has only just crossed my annoyance threshold:)
Some discussion in PR 254. I'm working on a different approach.