[Mesa-dev] [PATCH] meson: Add Haiku platform support v3
dylan at pnwbakers.com
Fri Feb 16 22:12:51 UTC 2018
Quoting Emil Velikov (2018-02-16 13:55:06)
> On 16 February 2018 at 19:28, Dylan Baker <dylan at pnwbakers.com> wrote:
> > Quoting Alexander von Gluck IV (2018-02-16 11:08:33)
> >> February 16, 2018 11:49 AM, "Emil Velikov" <emil.l.velikov at gmail.com> wrote:
> >> > Hi Alexander,
> >> >
> >> > Did you drop the ball on the autotools patches? I could re-spin them
> >> > but have no way to test.
> >> I've been focused on meson since it's the future.
> >> Feel free to re-spin them if you have the bandwidth.
> >> > There's a couple of comments inline, but nothing major.
> >> >
> >> > On 16 February 2018 at 00:32, Alexander von Gluck IV
> >> > <kallisti5 at unixzen.com> wrote:
> >> >
> >> >> --- a/meson.build
> >> >> +++ b/meson.build
> >> >>
> >> >> gl_priv_libs = 
> >> >> -if dep_thread.found()
> >> >> +if dep_thread.found() and host_machine.system() != 'haiku'
> >> >> gl_priv_libs += ['-lpthread', '-pthread']
> >> >> endif
> >> >
> >> > There's a bug report/fix in Meson for this one right?
> >> > Please mention the ticket number of Meson version where the fix
> >> > landed. Thus way one can drop this when we bump the Meson requirement.
> >> I did a bump of Meson on my Haiku build system and still saw the same
> >> incorrect searching for -lpthread issues. I think there are places where
> >> -lpthread -pthread were specified without looking at dep_thread.found()
> >> though which could be at play. (see below)
> > dep_pthread.found() returns true on anything that has pthreads, so for us that
> > means anything except windows (non-cygwin windows). I think this is the right
> > way to handle this, haiku does have pthreads, they're just not a separate
> > library. macOS has some weird pthreads stuff too, and this is how we handle
> > macOS.
> Could swear I read your reply somewhere which said that we can as
> Meson to provide the correct flags - be that -lpthread or others.
> Yet we're doing the completely opposite thing here.
> Did I misunderstand you or ?
What I said was that adding `dependency('threads')` to a target, ala
mylib = library(
dependencies : dependency('threads'),
Will always (as of 0.44 when I fixed Haiku) do the right thing.
The problem is that haiku *does* have pthreads, it just doesn't have a pthreads
library. So the dep returns found because there are pthreads, it just doesn't
add any -l, -L, or -I arguments because none are necessary.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 228 bytes
More information about the mesa-dev