I am by no means an expert but I'll to help.
Your BSP (board support package, if you have one) or your toolchain should provide a compiled pthreads library.
IIRC, POSIX threads have been integrated into gcc a long long time ago. You should try linking to the rt (realtime, AFAIK) library i.e. by adding an "-lrt" in your command line or Makefile.