CUDA driver version is insufficient for CUDA runtime version -OS X 10.10 -CUDA 4.0

I know the match of -OS X 10.10 -CUDA 4.0 should work, cause someone else is using it this way. But I cannot really make the compile work, and got errors:

clang: error: unsupported option ‘-dumpspecs’
clang: error: no input files
make[1]: *** [obj/x86_64/release/] Error 1
make: *** [src/alignedTypes/Makefile.ph_build] Error 2

but after reading all the posts, I tried sudo make -k to force it compiling. And then tested ./deviceQuery
which is saying
CUDA driver version is insufficient for CUDA runtime version

I thought I installed wrong version of driver, the one I installed is 4.0.50, toolkits are 4.0.17. So I tried the earlier one 4.0.17, its worse. It cannot even recognize my gcc.

What can I do next?

My graphic card: NVIDIA GeForce GT 755M
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

Install the latest driver for your GT755M GPU.

clang: error: unsupported option ‘-dumpspecs’
Seems that Xcode_6.4 is not supported in the CUDA 4.x yet.

CUDA driver version is insufficient for CUDA runtime version
The latest CUDA Mac driver could be found under

My coworker used Xcode 6.1.1, and everything seems fine for her. Can it be the problem with my command line tool which is the newest? I tried the latest driver. The problem is still there.

You reported two different issues. The clang/dumpspecs issue, which is related to the toolchain (expecting gcc but using clang) and the driver version is insufficient for runtime version. The second issue should be rectified with the proper driver. The first issue is a toolchain issue and has been discussed extensively elsewhere.