|
From: | Paweł Daniluk |
Subject: | Re: Libtool and CUDA |
Date: | Tue, 07 Dec 2010 13:58:21 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 |
Hi,
Of course the whole support currently won't work if you need to have both compilers CC=gcc and, say, NVCC=nvcc or so; to workaround you currently need a subpackage with a sub configure script where you override CC=$NVCC. We could fix that in the same way as the proposed Go patch: by explicitly introducing a new language called Cuda or so. I'm not disinclined, but since there exists no free version of this compiler this might politically be a bit "interesting", to say the least. I was wrong a bit in my last message though: the manual for version 2.0 does document --shared and -shared, and mentions that other flags necessary for shared libraries need to be passed through with -Xcompiler. Which matches my proposed patch.
That would be exactly what I need. AFAIK nvcc provides facility to link shared libs, and if the whole project may be built with it there is no need for libtool. I can't do it since most of my code is written in C and cannot be compiled with C++ compiler.
I think I found another solution though. nvcc has an option to compile CUDA program to C++, so I added an intermediate step in my Makefile that does that. Then I use libtool with g++ to process the result. It works fine and probably is more consistent with your policy. Nevertheless it is not straightforward, and it would be more convenient to have libtool do it for me.
Thanks for your help, Paweł
[Prev in Thread] | Current Thread | [Next in Thread] |