GCC support in upcoming CUDA 4.1

Hello,

I tried to find the answer somewhere in here but I found no explicit answer. From I could gather, it seems that gcc 4.5 can compile the CUDA SDK of 4.1 RC. Do we know if it will support gcc 4.6 in the final version? Did someone try with the release candidate?

Hello,

I tried to find the answer somewhere in here but I found no explicit answer. From I could gather, it seems that gcc 4.5 can compile the CUDA SDK of 4.1 RC. Do we know if it will support gcc 4.6 in the final version? Did someone try with the release candidate?

I tried to compile the 4.1 RC2 sdk with gcc 4.6.1, and hit this:

In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,

                 from <command-line>:0:

/usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.6 and up are not supported!

So no I guess we’re not getting support for 4.6.1 in the upcoming release.

I tried to compile the 4.1 RC2 sdk with gcc 4.6.1, and hit this:

In file included from /usr/local/cuda/include/cuda_runtime.h:59:0,

                 from <command-line>:0:

/usr/local/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.6 and up are not supported!

So no I guess we’re not getting support for 4.6.1 in the upcoming release.

Remove this check from this particular file, and then re-try - I remember using gcc 4.5 with CUDA over long period of time this way, even if it was “unsupported”.

Remove this check from this particular file, and then re-try - I remember using gcc 4.5 with CUDA over long period of time this way, even if it was “unsupported”.

I actually setup a new linux machine to try it out. I installed OpenSuse 12.1 (gcc 4.6.2), CUDA 4.1 RC2, changed the line 82 of /usr/local/cuda/include/host_config.h so I can compile with gcc 4.6.2. And I managed to compile the SDK. I have tried a couple of examples and they seem to run fine. I’m aware that this is not an exhaustive test, but it seems fine. So it’s a pretty good piece of news.