Skip to content

build/seamless-clone: Declare libm dependency

Jan Tojnar requested to merge wip/jtojnar/explicit-math into master

When using poly2tri-c from the subproject, -lm flag will be inherited due to some Meson impurity but this is not the case when using poly2tri-c from system:

ld: seamless-clone/libgegl-sc-0.4.so.p/sc-sample.c.o: in function `gegl_sc_compute_sample_list_part':
sc-sample.c:(.text+0x511): undefined reference to `sqrt'

Previously, the distributor could just pass -lm globally when building GEGL but since 2348b571, it is no longer possible because it breaks cc.has_header_symbol() on Clang:

clang-11: error: -lm: 'linker' input unused [-Werror,-Wunused-command-line-argument]

Let’s declare the dependency explicitly.

Merge request reports