It was a problem with the 331.20 driver, downgraded to 319.17 and device query works
just downloaded from first page and same thing, full log:
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -msse2 -fopenmp -pthread -fno-strict-aliasing -O3 -MT cudaminer-cpu-miner.o -MD -MP -MF .deps/cudaminer-cpu-miner.Tpo -c -o cudaminer-cpu-miner.o `test -f 'cpu-miner.c' || echo './'`cpu-miner.c
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -msse2 -fopenmp -pthread -fno-strict-aliasing -O3 -MT cudaminer-util.o -MD -MP -MF .deps/cudaminer-util.Tpo -c -o cudaminer-util.o `test -f 'util.c' || echo './'`util.c
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -msse2 -fopenmp -pthread -fno-strict-aliasing -O3 -MT cudaminer-sha2.o -MD -MP -MF .deps/cudaminer-sha2.Tpo -c -o cudaminer-sha2.o `test -f 'sha2.c' || echo './'`sha2.c
g++ -DHAVE_CONFIG_H -I. -msse2 -fopenmp -pthread -fno-strict-aliasing -O3 -MT cudaminer-scrypt.o -MD -MP -MF .deps/cudaminer-scrypt.Tpo -c -o cudaminer-scrypt.o `test -f 'scrypt.cpp' || echo './'`scrypt.cpp
mv -f .deps/cudaminer-cpu-miner.Tpo .deps/cudaminer-cpu-miner.Po
/usr/local/cuda/bin/nvcc -O3 -arch=compute_10 --maxrregcount=124 --ptxas-options=-v -o salsa_kernel.o -c salsa_kernel.cu
mv -f .deps/cudaminer-util.Tpo .deps/cudaminer-util.Po
/usr/local/cuda/bin/nvcc -O3 -Xptxas "-abi=no -v" -arch=compute_30 --maxrregcount=63 -o spinlock_kernel.o -c spinlock_kernel.cu
mv -f .deps/cudaminer-sha2.Tpo .deps/cudaminer-sha2.Po
/usr/local/cuda/bin/nvcc -O3 -arch=compute_10 --maxrregcount=124 --ptxas-options=-v -o legacy_kernel.o -c legacy_kernel.cu
mv -f .deps/cudaminer-scrypt.Tpo .deps/cudaminer-scrypt.Po
/usr/local/cuda/bin/nvcc -O3 -Xptxas "-abi=no -v" -arch=compute_20 --maxrregcount=63 -o fermi_kernel.o -c fermi_kernel.cu
./legacy_kernel.cu(310): Warning: Cannot tell what pointer points to, assuming global memory space
................ a lot of pointer warning .................
./legacy_kernel.cu(274): Warning: Cannot tell what pointer points to, assuming global memory space
/usr/local/cuda/bin/nvcc -O3 -Xptxas "-abi=no -v" -arch=compute_35 --maxrregcount=64 -o test_kernel.o -c test_kernel.cu
/usr/local/cuda/bin/nvcc -O3 -Xptxas "-abi=no -v" -arch=compute_35 --maxrregcount=64 -o titan_kernel.o -c titan_kernel.cu
UNREACHABLE executed!
Stack dump:
0. Running pass 'NVPTX DAG->DAG Pattern Instruction Selection' on function '@_Z28spinlock_scrypt_core_kernelBILi3EEvPj'
Aborted
make[2]: *** [spinlock_kernel.o] Error 134
make[2]: *** Waiting for unfinished jobs....
btw can you upload it to github (for example), every time I download I have to dos2unix all files

Oh and the output of autgen.sh
./autogen.sh: line 1: aclocal: command not found