Building gnuradio using meta-sdr gives missing pthread lib functions

I have a problem trying to compile gnuradio using meta-sdr layer, I get compile error while building gnuradio

…/lib/libgnuradio-runtime-3.7.9.1.so.0.0.0: error: undefined reference to ‘pthread_setaffinity_np’
…/lib/libgnuradio-runtime-3.7.9.1.so.0.0.0: error: undefined reference to ‘pthread_sigmask’

What could be wrong?

After some inspections I have found that lpthread is not defined when linking. Adding that to some link.txt files after inspecting errors, gnuradio builds successfully.

It would be nice to find a fix that pthread would be defined automatically when linking.

Edit:

Adding LDFLAGS += " -lpthread" to gnuradio recipe fixes problem.

But finding the root cause would be nice.