2

After updating CUDA on my mac(Snow Leopard) nvidia's nvcc compiler acting strange, when compiling this:

 nvcc batched_gemm.cu

I get the following compile error, and I have no idea how to fix the problem.

ld: unknown option: -no_pie
collect2: ld returned 1 exit status

Does anyone know what the problem might be?

Bart
  • 19,692
  • 7
  • 68
  • 77
Martin Kristiansen
  • 9,875
  • 10
  • 51
  • 83

1 Answers1

8

Having done an update, I assume is to the latest stable (v4.1), so according to

NVIDIA CUDA Toolkit v4.1 Production Release Notes for Windows, Linux, and Mac OS X, CUDA Toolkit Known Issues, *MAC 10.*7:

The host linker on Mac OS 10.7 generates position-independent executables by default. As CUDA does not support position-independent executable currently, the linker must generate position-dependent executable by passing in the -no_pie option. If nvcc is being used to link the application, this option will be passed to the linker by default. To override the default behavior, the -Xlinker -pie option can be passed to nvcc.

pQB
  • 3,077
  • 3
  • 23
  • 49