First of all, the toolchain is fine and I regularly build other executables by it. I've added the latest libusb 1.0.20 (with udev support disabled because by what I've understood it is only meant to support hotplug which I'm not interested in) to satisfy what it seems to be the only prerequisite according to the site (but I could be completely wrong). I've built it fine and I've then passed to usb-modeswitch but when I give the make command I get this error:
mips-linux-gcc -o usb_modeswitch usb_modeswitch.c -I/opt/toolchains/uclibc-crosstools/include -Wall `pkg-config --libs --cflags libusb-1.0` -L/opt/toolchains/uclibc-crosstools/lib
/opt/toolchains/uclibc-crosstools/lib/libusb-1.0.so: undefined reference to `pthread_create'
/opt/toolchains/uclibc-crosstools/lib/libusb-1.0.so: undefined reference to `pthread_mutexattr_destroy'
/opt/toolchains/uclibc-crosstools/lib/libusb-1.0.so: undefined reference to `pthread_mutexattr_settype'
/opt/toolchains/uclibc-crosstools/lib/libusb-1.0.so: undefined reference to `pthread_mutexattr_init'
/opt/toolchains/uclibc-crosstools/lib/libusb-1.0.so: undefined reference to `pthread_mutex_trylock'
/opt/toolchains/uclibc-crosstools/lib/libusb-1.0.so: undefined reference to `pthread_join'
collect2: ld returned 1 exit status
It seems it has something to do with libpthread which I haven't added to the toolchain. Could this be the problem? It isn't reported to be a dependecy for libusb (only doxigen is reported to be but optional though the information I've found could be wrong too). I'm rather new to sources compilation and cross-compilation so please forgive me should my post here result dumb and useless but so far I've compiled quite a lot of stuff and dependencies for my router and I haven't ever faced this kind of issue.
Thanks in advance to everyone.