xref: /OK3568_Linux_fs/buildroot/package/dvblast/0001-missing-lm.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1dvblast: fix static linking
2
3dvblast links to -lev, wihch uses functions from the maths library,
4like floor().
5
6When linking to a shared libev.so, that dependency is automatically
7pulled in because libev as a DT_NEEDED ELF tag on libm.so.
8
9But when lnking to the static libev.a, since there is no way to express
10such dependencies in static libraries, libm is not pulled in, which
11leads to build failures such as;
12    http://autobuild.buildroot.org/results/1f0/1f02f84fb926839a1adbe3af457bb909fdc44433/build-end.log
13
14Fix that by always linking to -lm (which must come *after* -lev).
15
16Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
17
18diff -durN dvblast-3.0.orig/Makefile dvblast-3.0/Makefile
19--- dvblast-3.0.orig/Makefile	2015-10-05 17:51:14.000000000 +0200
20+++ dvblast-3.0/Makefile	2015-10-30 15:57:19.547123894 +0100
21@@ -28,7 +28,7 @@
22 LDLIBS += -lstreammaster
23 endif
24
25-LDLIBS_DVBLAST += -lpthread -lev
26+LDLIBS_DVBLAST += -lpthread -lev -lm
27
28 OBJ_DVBLAST = dvblast.o util.o dvb.o udp.o asi.o demux.o output.o en50221.o comm.o mrtg-cnt.o asi-deltacast.o
29 OBJ_DVBLASTCTL = util.o dvblastctl.o
30