Hi, Nvidia doesn't yet support gcc in version 5.2 (http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html#axzz3waRLz1NZ). After I installed 4.9 everything compiles just fine, so I think there should be added dependency of <=sys-devel/gcc-4.9.3 Greetings, Marek Pikuła
Just depending on that gcc version doesn't work. What exactly is your problem?
If I have only GCC 5.3 installed, there is en error that my version of gcc is too new. After I installed GCC 4.9 it compiles smoothly even without changing default gcc version via gcc-config.
Please reinstall dev-util/nvidia-cuda-toolkit. commit e00bd5b9853e52bd77e5da576a09346a5281605f Author: Justin Lecher <jlec@gentoo.org> Date: Mon Jan 11 09:27:04 2016 +0100 dev-util/nvidia-cuda-toolkit: Set upper limit for gcc Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=571192 Package-Manager: portage-2.2.26 Signed-off-by: Justin Lecher <jlec@gentoo.org> https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e00bd5b9853e52bd77e5da576a09346a5281605f