Unrelated but I've also been working to have the Linux toolchain to be updated to (at least) LLVM 14 (ebpfpub use of LLVM APIs needed to be updated too).
I will also try with an even newer version, but I recall testing with LLVM 15 back then and there were some weird ELF issues that I assumed were due to us using a very old glibc. Will see. The idea is to get C++20.
The glibc can and should still be updated to the CentOS 7 version eventually (along with reconfiguring the various libs); that might be necessary for the even newer versions of LLVM.