how to add -fvisibility in

Hello all,
I have been doing to accelerate c file (large file) on GPU using CUDA. The make is generated using automake and I modified to use CUDA. But when I run make, I have got error of “nvcc fatal: unknown option fvisibility”. How to define and add -fvisibility option for nvcc so that works fine.

Maybe fvisibility is a gcc option?

Without knowing anything about it, you could search your configure and look for where -fvisibility is specified, and preface it with:

-Xcompiler -fvisibility

this will cause nvcc to send that switch to the host compiler.

Thanks txbob for you response. Yes it gcc option. But complaining about unknown error when run make. Can I restrict to use in gcc only not in nvcc? The Makefile contains both gcc and nvcc.