Static library compilation bug in Linux?

Hi all.

When I compile CUDA code to generate a static library, i.e., something like:

$ nvcc file1.cu … -lib -o libsomething.a

the resulting generated library does NOT substitute the old one, but it is added to it instead (so, in fact, the library keeps on growing after each new compilation). Thus, I must manually remove the old file each time, this way:

$ rm libsomething.a; nvcc file1.cu … -lib -o libsomething.a

I think it could be a small error in nvcc, because if you don’t manually remove the old library, then old versions of the recompiled functions stay on it, resulting in replicated versions of the functions!! (as you can check using the nm command):

$ nm libsomething.a
… several versions of the same functions …

Am I right?

Thanks, and greetings,
Pedro E.

P.D: I think this could also be related to this post:
[url=“http://forums.nvidia.com/index.php?showtopic=62385&st=0&p=449755”]http://forums.nvidia.com/index.php?showtop...5&st=0&p=449755[/url]