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:
[url]http://fedoraproject.org/wiki/Cuda[/url]
(using a much earlier earlier gcc)
or
[url]http://hamelot.co.uk/programming/installing-cuda-sdk-5-0-on-fedora-18/[/url]
(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:
[url]http://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/installing-gcc-4-4-on-fedora-14-to-use-cuda-sdk-4-0-a-903157/[/url]

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.