OP could just use devtoolset-7 on RHEL6 (https://access.redhat.com/documentation/en-us/red_hat_develo...) and get a modern (supported) compiler that way.
$ repoquery python27 rh-python36-python
python27-0:1.1-25.el6.x86_64
rh-python36-python-0:3.6.3-1.el6.x86_64were you running on potato computers ? I clearly remember building GCC 5.0 from source a few years ago and don't remember it taking more than 15-20 minutes on a i7 2600. (Of course you have to disable the whole unnecessary bootstrap stuff and only build c & c++ support).
edit: well, OK, the official answer is more nuanced: https://access.redhat.com/documentation/en-us/red_hat_develo...