1 |
On 11/25/2012 02:14 PM, Justin wrote: |
2 |
> On 25.11.2012 18:59, Rick "Zero_Chaos" Farina wrote: |
3 |
>> On 11/25/2012 11:47 AM, Justin wrote: |
4 |
>>> Hi, |
5 |
>> |
6 |
>>> I would like to introduce a new eclass for packages using the nvidia |
7 |
>>> cuda compiler suite. Currently the eclass simply sanitize the NVCCFLAGS. |
8 |
>>> May be extended in the future. |
9 |
>> |
10 |
>>> Two problems come up with using nvcc: |
11 |
>> |
12 |
>>> * Each version only supports a limited number of gcc versions. Therefore |
13 |
>>> we need to pass the path to a supported gcc bindir |
14 |
>> |
15 |
>>> * nvcc calls CXX but doesn't pass CXXFLAGS on. |
16 |
>> |
17 |
>> This whole idea seems great but I see two issues. Issue 1.) I'm stupid |
18 |
>> and don't really understand all the intricacy of the toolchain stuff and |
19 |
>> 2.) you didn't include an example ebuild. |
20 |
>> |
21 |
>> Fortunately issue 1 can (at least functionally) be solved by providing a |
22 |
>> solution for issue 2. If you need an ebuild to cuda.eclassify then I am |
23 |
>> happy to provide (or feel free to use a before and after of anything you |
24 |
>> have available). |
25 |
>> |
26 |
>> https://code.google.com/p/pentoo/source/browse/portage/trunk/app-crypt/cryptohaze-combined/cryptohaze-combined-9999.ebuild |
27 |
>> |
28 |
>> Thanks! |
29 |
>> Zero |
30 |
>> |
31 |
> |
32 |
> 1) |
33 |
> The build fails if you are using a compiler newer then the supported ones. |
34 |
> |
35 |
> In file included from /opt/cuda/include/cuda_runtime.h:59:0, |
36 |
> from <command-line>:0: |
37 |
> /opt/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU |
38 |
> version! gcc 4.7 and up are not supported! |
39 |
> make[1]: *** [obj/x86_64/release/segmentationTree.cu_13.o] Error 1 |
40 |
> |
41 |
> |
42 |
> or similar. Solution, tell nvcc where to find a compatible compiler. |
43 |
|
44 |
I can see this improvement right away, love it. |
45 |
> |
46 |
> 2) |
47 |
> The underlying call of c compiler doesn't respect CXXFLAGS, therefore we |
48 |
> need to tell nvcc what to use. Otherwise only the plain NVCCFLAGS are used. |
49 |
> |
50 |
> |
51 |
> How to fix your package, depends on the buildsystem and where and how |
52 |
> they are calling the nvcc. Normally you need to sed it in. |
53 |
> |
54 |
> Here as an example the nvidia-cuda-sdk version bump: |
55 |
> |
56 |
> https://github.com/gentoo-science/sci/blob/cuda/dev-util/nvidia-cuda-sdk/nvidia-cuda-sdk-5.0.35.ebuild |
57 |
|
58 |
I mostly get this, seems like a good thing. |
59 |
|
60 |
All in all, definitely ACK. I like it. |
61 |
|
62 |
Thanks, |
63 |
Zero |