GCC 4.7+ support in CUDA 5.0?

We would love to R&D CUDA here at our studio, but we are using Fedora 17 and the CUDA 5.0 Toolkit has an explicit compile-time check for the gcc version. It can’t be greater than 4.7 which is what Fedora 17 comes with. Is there any way around this? We’d like to get CUDA 5.0 working in Fedora 17.

Either install gcc 4.4 and make it the default on your system or remove the compile-time check from the file (and perhaps edit some sources to get it to compile) There’s various tutorials on how to do this (at least for Ubuntu I’ve seen many) this if you google.

See for example:
(using a much earlier earlier gcc)
(removing some compile checks/fixing source to compile correctly)

The ideal solution is something like this, which is what I do on my Ubuntu 12.10/13.04 install, except for the fact that I install the older gcc 4.4 version from the Ubuntu package repositories:

It might be that your version of Fedora has gcc 4.4/4.5/4.6 on their repos that work without having to compile/install it from source.