Currently the centos stream9 CI task is using gcc-11. This is fine, because this is also the minimum supported.
However:
- There is already a CI task that is checking the minimum supported version: https://github.com/bitcoin/bitcoin/blob/62bd61de110b057cbfd6e31e4d0b727d93119c72/ci/test/00_setup_env_native_previous_releases.sh#L11-L12
- The CI log is a bit useless, because it is mostly just
#warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform [-Werror=cpp]
. This makes it harder to spot real warnings, such as #31476
Fix both issues by using gcc-12.