I am trying to build vendor specific RIL using android lollipop source code. My RIL using run time port access. To build run time port access file using one flag
LOCAL_LDLIBS += -lpthread
in theAndroid.mk
When trying to build with mm command getting error as per below logs.
target SharedLib: libruntime-ril-port (out/target/product/shamu/obj/SHARED_LIBRARIES/libruntime-ril-port_intermediates/LINKED/libruntime-ril-port.so)
/media/sda1/01bcd1a8-9343-4a7a-9bac-8b0811cefb0a/AOSP_TREE/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lpthread
collect2: error: ld returned 1 exit status
make: *** [out/target/product/shamu/obj/SHARED_LIBRARIES/libruntime-ril-port_intermediates/LINKED/libruntime-ril-port.so] Error 1
make: Leaving directory `/media/sda1/01bcd1a8-9343-4a7a-9bac-8b0811cefb0a/AOSP_TREE'
#### make failed to build some targets (3 seconds) ####
Please suggest me how to solve this.