Description of problem: When using rpmbuild with older gcc versions (4.4.x, 4.5.x etc) the compiler cannot produce executables. Version-Release number of selected component (if applicable): 9.1.0 How reproducible: always Steps to Reproduce: 1. rpmbuild -bb <spec_file> 2. 3. Actual results: An error is produced during configure/compile state due to the wrong option used as indicated above. Expected results: No errors to be produced. Additional info: This is produced as a result of the inclusion of "-grecord-gcc-switches" option in the %__global_cflags macro included in "macros", which is NOT a valid gcc option on older version of the compiler. Please remove it.
The default compilation flags in redhat-rpm-config are strictly for the gcc shipped with the distro only. If you want to compile with something else you need to set your own defaults.