Add "-lc -lpthread" by CMAKE_*_LINKER_FLAGS to unbreak the gcc build. OK kmos (Thanks for testing in a sparc64 bulk build)