I'm also inclined to agree that the buggy code (and it *is* buggy even if it was meant to fix something originally) should be removed outright. Nobody can point to a real world issue that it fixes anymore, yet we can point to real world consequences caused by this bug still.
However, I could also agree that this should come with better support for CXXFLAGS and CXXLINK. It's no wonder these variables are ignored by CPython--it doesn't use any c++. That said, extension module compilation is tied, through distutils, to CPython. And there are plenty of c++ extension modules in the wild that are affected. So it's worth addressing how these variables are used--or rather not used properly--by distutils.
I'd be happy to take a look at that if that sounds like a good approach? Otherwise I'd push for accepting some versions of the existing patches by Joshua.J.Cogliati that remove the buggy code.