Open phillipjohnston opened 4 years ago
Basically we assume that a given os has threads. We probably should do a check for pthreads instead of hard coding
Got it. In this particular case there is no OS :).
I'm assuming you're doing a cross build, what do you have for your host_machine
in the cross file?
I always set system
to none
for all of my microcontroller cross files. For example:
[host_machine]
system = 'none'
cpu_family = 'arm'
cpu = 'cortex-m4'
endian = 'little'
To check for the presence of POSIX threads, one can do getconf _POSIX_THREADS
. Perhaps this could be used?
I have the same problem using a cross compiler for AmigaOS4. -pthread is not supported. Is there a way to remove the flag and use -lpthread instead?
There's a lot of substantive discussion in https://github.com/mesonbuild/meson/pull/13124 too (and previously https://github.com/mesonbuild/meson/pull/7174).
Hello,
I'm checking for the
threads
dependency in the build:Meson says this is found:
But the compiler doesn't actually support
pthread
:My first question is - what logic is actually used to check for pthread support?