The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / fbgrab / 0001-fix-static-build.patch
diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/fbgrab/0001-fix-static-build.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/fbgrab/0001-fix-static-build.patch
new file mode 100644 (file)
index 0000000..fe5ae2c
--- /dev/null
@@ -0,0 +1,21 @@
+Fix static build
+
+fbgrab links against libpng, which depends on libm. For shared library
+builds, there is nothing special to do about this, but for static
+library builds, it is necessary to pass -lm when linking fbgrab.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/Makefile
+===================================================================
+--- a/Makefile
++++ b/Makefile
+@@ -12,7 +12,7 @@
+ all: fbgrab fbgrab.1.gz
+ fbgrab: fbgrab.c
+-      $(CC) -g -Wall $(CFLAGS) $(LDFLAGS) $< -lpng -lz -o $@
++      $(CC) -g -Wall $(CFLAGS) $(LDFLAGS) $< -lpng -lz -lm -o $@
+ fbgrab.1.gz: fbgrab.1.man
+       $(GZIP) $(GZIPFLAGS) $< > $@