bug-libtool
[Top][All Lists]
Advanced

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

Re: Libtool generating flags incompatible with nvcc


From: Mahesh N
Subject: Re: Libtool generating flags incompatible with nvcc
Date: Mon, 21 Sep 2009 11:15:10 +0530

Hi Ralf,

I apologize for my late reply. I checked the patch. It seems like we are using nvcc to do the linking also, we would instead like to link with GCC although we would compile with nvcc.

I think there is some symbol stripping happening when nvcc is used to generate the shared library. When I use the generated shared library with another project, the compilation fails and the compiler returns with :

test1.c:(.text+0x58): undefined reference to `gsl_vector_set_all'
test1.c:(.text+0x73): undefined reference to `gsl_vector_get'
test1.c:(.text+0x88): undefined reference to `gsl_vector_get'
test1.c:(.text+0xc9): undefined reference to `gsl_vector_add'
test1.c:(.text+0xe4): undefined reference to `gsl_vector_get'
test1.c:(.text+0xf9): undefined reference to `gsl_vector_get'
test1.c:(.text+0x133): undefined reference to `gsl_vector_free'


But, such a thing does not happen when gcc is used during the linking stage. That seems like a quick fix to me for the time being.

Right now, libtool, I think, does not allow one to specify the choice of a linker. Could the AC_PROG_LIBTOOL macro be expanded to accept choice of linkers as arguments? Would that be a good solution?

like for example:

AC_PROG_CC([nvcc gcc])
AC_PROG_LIBTOOL([gcc])

In that case, we would need to use a separate variable to hold the path to the linker instead of using the same CC as for the compiler as is done in libtool.sh.

Cheers,
Mahesh Narayanamurthi


On Sat, Sep 19, 2009 at 12:09 AM, Ralf Wildenhues <address@hidden> wrote:
* Ralf Wildenhues wrote on Sat, Sep 12, 2009 at 09:17:15AM CEST:
> Others, any issues with this patch?

I've pushed this now, with NEWS entry added as below.

Cheers,
Ralf

>    Initial support for the Cuda Compiler Driver on Linux.
>
>    * libltdl/config/ltmain.m4sh (func_mode_compile): Accept source
>    file extensions `.cu' and `.cup'.
>    * libltdl/m4/libtool.m4 (_LT_COMPILER_NO_RTTI, _LT_COMPILER_PIC)
>    (_LT_LINKER_SHLIBS): Support for `nvcc' compiler driver.
>    * THANKS: Update.
>    Report by Mahesh N.

diff --git a/NEWS b/NEWS
index f96a717..7843378 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,7 @@ New in 2.2.8 2009-??-??: git version 2.2.7a, Libtool team:
  - Initial support for compilers on BlueGene BG/L.
  - Improved support for Atari FreeMiNT.
  - With binutils 2.19.50+, shared libraries can be built on AIX.
+  - Initial support for the Cuda Compiler Driver on GNU/Linux.

 * Bug fixes:




--
Developer
ASCEND Project
http://ascendwiki.cheme.cmu.edu

reply via email to

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