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/alignedTypes.cu.o] 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
Command_Line_Tools_OS_X_10.10_for_Xcode_6.4
cudatoolkit_4.0.17_macos
devdriver_4.0.50_macos
gpucomputingsdk_4.0.17_macos
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 http://www.nvidia.com/object/mac-driver-archive.html

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.