There is one problem with this, and that is that MANY packages has malformed SPEC-files, so they do not pick up the CFLAGS/CXXFLAGS/LDFLAGS from anywhere...