libtool
[Top][All Lists]
Advanced

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

Generate Libtool Objects for Cuda files


From: Labeeb Asari
Subject: Generate Libtool Objects for Cuda files
Date: Mon, 20 Mar 2023 14:09:19 +0530

Background : 

I'm trying to integrate Cuda in an existing C library. This C library uses GNU Autotools for building.

The flow is 

I've tried this on a small test library by manually running compiling and linking commands and the library was created successfully.

Questions : 
  1. How do I configure libtool to compile cuda source files using a different compiler (nvcc)? I've tried writing a rule to compile Cuda source files separately, however during linking, libtool ignores all the cuda object files because they don't have corresponding libtool object files with them.                      I've tried the following libtool commands to compile a .cu file(cuda source code) image.png The correct command to compile this using just nvcc is :  nvcc -Xcompiler -fPIC -c test.cu
  2. If libtool cannot compile cuda source files, How do I use libtool without generating libtool objects?(I only want to build a shared object file). Basically libtool should generate only .o files for each .c file during compilation. And it should link all the .o files (including the ones generated by nvcc) during linking. How do I achieve this?
ThankYou.

reply via email to

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