Failed to compile CUDA SDK on Lion

Hi all,

I got the following errors when compiling the latest CUDA SDK on Lion:

/usr/include/libkern/i386/_OSByteOrder.h(60): error: identifier "__builtin_bswap32" is undefined

/usr/include/libkern/i386/_OSByteOrder.h(74): error: identifier "__builtin_bswap64" is undefined

../../common/inc/cutil_inline_runtime.h(176): error: class "cudaDeviceProp" has no member "tccDriver"

../../common/inc/cutil_inline_runtime.h(201): error: class "cudaDeviceProp" has no member "tccDriver"

../../common/inc/cutil_inline_runtime.h(307): error: identifier "CUFFT_UNALIGNED_DATA" is undefined

I have a GeForce GT 330M in my MacbookPro, and CUDA driver’s version is 4.0.50

Any help is highly appreciated.

Yifei