GCC8 cant create a Ruby3 binary

Can gcc8 create a ruby3 binary ?
In other words can we install ruby3 on a system with gcc8?

In my AmazonLinux v2 container, I have GCC 7.3.1. I can compile Ruby 3.0.0 with RVM without any sort of problems.