Can't compile app for device (compiles well for simulator and runs also). App is written on C and includes pthread.h and some file access functions (fread and etc).
Most of all I get such compilation errors:
undefined reference to `pthread_create' undefined reference to `_read'
I tried to add
-lpthread directly to arm-none-eabi-gcc but in the last linking step it gives an error:
arm-none-eabi/bin/ld: cannot find -lpthread
I would really appreciate your help! Ofc I could get rid of fread func, but I can't find suitable alternative for pthread so it's the main issue.
OS: macOS 12.5.1 AND 12.6
Host arch: both Intel and M1 Pro