While I am working on the WebKit project there is a need to port harfbuzz library (https://github.com/harfbuzz/harfbuzz)
This library is using meson to compile and what I did so far is create a meson cross-compile file that is used during the compilation. Unfortunately, when I try to compile it there is always -pthreads added automatically and I cannot find a way to remove it. You see meson finds that pthreads are available and adds it no matter what.
Unfortunately, this flag breaks the compilation because it is not recognised by our gcc.
My question is if anyone has worked on porting harfbuzz to OS4 in the past.
Does anyone have any experience with meson and have already ported stuff with it so can share some knowledge?
Thank you in advance for your help.
hafbuzz seems part in AmigaOS4.1FinalEditionUpdate1 archive, so if have access OS4 repository you can take a peek and see how its build.
if (NOT MSVC)
list(APPEND THIRD_PARTY_LIBS Threads::Threads)
list(APPEND PC_LIBS_PRIV -pthread)
maybe you can tweak to skip or just "remove" -pthreads switch (or chnage to -lpthread)
or in https://github.com/harfbuzz/harfbuzz/blob/main/meson.build:
thread_dep = null_dep
if host_machine.system() != 'windows'
thread_dep = dependency('threads', required: false)
PS: and as you can imagine/see I don't know nothing about how mason and/or CMakeLists "works".
Thank you so much for your reply and pointing those parts in the code.
I am thinking to set it to skip for OS4 and then manually add the -lpthreads but I am afraid it will skip also parts of the code.
I need to dig further I am afraid.