aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-05-18 19:26:28 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2014-05-18 23:32:43 +0200
commitb8242149e48d78a5b62f2d9743dfa421bc1b8c65 (patch)
tree0721ad669192d7666ba508f06f0a3e47f8f16b90
parent6a4fa3fccaecb5d5c524453fcb8e6ad2edcbfef7 (diff)
downloadbuildroot-b8242149e48d78a5b62f2d9743dfa421bc1b8c65.tar.gz
buildroot-b8242149e48d78a5b62f2d9743dfa421bc1b8c65.tar.bz2
fbgrab: fix static linking
Fixes: http://autobuild.buildroot.org/results/9e0/9e079632a6c0556c96ec8ed7564286aa84044bf7/ http://autobuild.buildroot.org/results/401/401105b5e120176e78c2e5fcabe54ab0bde1bf40/ and more Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--package/fbgrab/fbgrab-01-fix-static-build.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/package/fbgrab/fbgrab-01-fix-static-build.patch b/package/fbgrab/fbgrab-01-fix-static-build.patch
new file mode 100644
index 0000000000..fe5ae2cab1
--- /dev/null
+++ b/package/fbgrab/fbgrab-01-fix-static-build.patch
@@ -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) $< > $@