Subject: | use the compiler that perl was compiled with |
nvcc defaults to gcc (here: 4.7), which is wrong when one additionally
installs an older version (4.6) that actually works with cuda. The
following patch fixes this.
diff --git a/lib/ExtUtils/nvcc/Backend.pm b/lib/ExtUtils/nvcc/Backend.pm
index 7a806fe..2d03cfb 100644
--- a/lib/ExtUtils/nvcc/Backend.pm
+++ b/lib/ExtUtils/nvcc/Backend.pm
@@ -220,6 +220,8 @@ sub run_nvcc {
# seperate the kernel code from the host code and send only the
kernel code
# through nvcc.
+ push @_, "--compiler-bindir=$Config{cc}";
+
our $verbose;
print "Running nvcc with args [[", join(']], [[', @_), "]]\n"
if $verbose;