Tuesday, June 7, 2011

[CUDA] Solving the problem of not supporting gcc-4.5 and above

Here is what I usually do:
- in parallel to the current gcc version (currently 4.5.2 on Arch Linux), install an older one. Right now I have 4.3.4 and 4.4.4, available as "gcc-4.3" and "gcc-4.4".
- for each of these old compilers, create a folder, say /opt/gcc43 and /opt/gcc44, which contain symlinks to /usr/bin/g{cc,++}-4.{3,4} that are named "gcc" and "g++" without version numbers
- run nvcc with the --compiler-bindir option: "nvcc --compiler-bindir /opt/gcc44 $CUFLAGS ..."

Posted via email from Troy's posterous

No comments:

Post a Comment

Google+