[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Libtool generating flags incompatible with nvcc

From: mahesh.mach
Subject: Re: Libtool generating flags incompatible with nvcc
Date: Tue, 1 Sep 2009 22:16:06 -0700 (PDT)

Hi Ralf,

>Hello Mahesh,

> We need a port of Libtool to nvcc.  That means, editing libtool.m4 and
> possibly other files, to detect nvcc and set the correct flags for it.
> Is it a GCC derivative?  Does it define __GNUC__?  What flags are used
> for shared library creation, what flags for hard-coding of run paths?
> Can you point to its documentation?

The documentation on compiler options is available here:

Basically, in the CUDA programming, there are two types of codes. 1) the
host code intended to run on the CPU which is basically serial code like
decision making, memory allocation, memory copying, etc. The host code is
compiled with the standard compiler on the host machine - gcc on linux, cl
on windows, likewise.
2) the device code intended to run on the GPU which is compute intensive and
runs on vector processors (SIMD). The device code is compiled by nvcc
(acting as a cross compiler) which is loaded onto the GPU when the host code
makes calls to it. nvcc takes care of linking both the host and the device
code appropriately.

So I am not sure if its a direct extension of gcc, as such an assumption may
not be portable on the other platform. 

> Would you be willing to help with such a port (it would require
> downloading the Libtool sources, building it, trying out proposed
> patches and running the testsuites a few times with it) or know somebody
> who could?

I would definitely be ready to help build such a port. Thanks :), although I
have limited knowledge of the M4 macro language. Nonetheless, it will be a
good learning experience.

> If yes: the bug-libtool at list is the right one to have this
> discussion on.  Please direct followups there.  Thanks.

Yes, I have registered myself on their mailing list. Thanks :)

>> On further inspection, we found that these flags are passed from
>> which is autogenerated by config.status which in turn depends on

> The 'libtool' script stores these flags, right.  You can edit it to
> temporarily override flags.  However, then they will be lost the next
> time config.status is run.  The flags are set in the configure script.
> That in turn is generated from the macros in the libtool.m4 file (and a
> few other ones) that need to be edited in order to fix things.

We tried editing manually, but considering that during further development,
our source tree would change considerably and we would need to rerun
configure scripts and hence we concluded that a permanent solution would be
the right thing to do.

> Hope that helps.

> Cheers,
> Ralf

Thank you so much for patiently answering my queries.

Autoconf mailing list

View this message in context:
Sent from the Gnu - Autoconf - General mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]