This is to allow using PCH when gcc is built as PIE. This has come up in the past with Ruby, see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=1721553 for further discussion. This would include backporting r12-5768 and r12-5802.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (gcc bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:2072