[Buildroot] [PATCH v3 1/1] package/tvheadend: Fix static build

Bernd Kuhls bernd.kuhls at t-online.de
Sat Aug 29 11:55:33 UTC 2015


Fixes
http://autobuild.buildroot.net/results/f1c/f1c40ac9dda5ceeb5665d021333058eb29828d62/
http://autobuild.buildroot.net/results/bd0/bd0e8619df7cd8f21da96ae470691b1ebb2f156c/
http://autobuild.buildroot.net/results/f1c/f1c40ac9dda5ceeb5665d021333058eb29828d62/

Signed-off-by: Bernd Kuhls <bernd.kuhls at t-online.de>
---
v3: Changed patch to fix Makefile instead (Thomas)
v2: Put everything in the if-static_libs-then clause (Jerzy)

 package/tvheadend/0003-fix-static-build.patch | 43 +++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 package/tvheadend/0003-fix-static-build.patch

diff --git a/package/tvheadend/0003-fix-static-build.patch b/package/tvheadend/0003-fix-static-build.patch
new file mode 100644
index 0000000..fef7e59
--- /dev/null
+++ b/package/tvheadend/0003-fix-static-build.patch
@@ -0,0 +1,43 @@
+Patch sent upstream: https://github.com/tvheadend/tvheadend/pull/705
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls at t-online.de>
+
+
+From 61b077fd48b1494205dbfd10d2dfcec0150f6b7a Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd.kuhls at t-online.de>
+Date: Sat, 29 Aug 2015 13:03:26 +0200
+Subject: [PATCH] Remove -ldl to fix static build
+
+-ldl was added in 2010: "Link with libdl (for dladdr())"
+https://github.com/tvheadend/tvheadend/commit/0fca6020008c0964155a18e23093e136333ad9ef
+
+The only trace of dladdr() can be found currently in src/trap.c in line
+192, encapsulated in #if ENABLE_EXECINFO. The buildsystem does not
+contain any trace of ENABLE_EXECINFO so I suppose -ldl is not needed
+anymore. Unconditionally adding "-ldl" breaks static builds in buildroot
+however:
+http://autobuild.buildroot.net/results/f1c/f1c40ac9dda5ceeb5665d021333058eb29828d62/build-end.log
+
+This patch, written by Thomas Petazzoni, fixes the problem.
+He gave me written consent to send this patch upstream in his name:
+http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/125500
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 037e2fa..1b28c8d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -38,9 +38,9 @@ CFLAGS  += -fms-extensions -funsigned-char -fno-strict-aliasing
+ CFLAGS  += -D_FILE_OFFSET_BITS=64
+ CFLAGS  += -I${BUILDDIR} -I${ROOTDIR}/src -I${ROOTDIR}
+ ifeq ($(CONFIG_ANDROID),yes)
+-LDFLAGS += -ldl -lm
++LDFLAGS += -lm
+ else
+-LDFLAGS += -ldl -lpthread -lm
++LDFLAGS += -lpthread -lm
+ endif
+ ifeq ($(CONFIG_LIBICONV),yes)
+ LDFLAGS += -liconv
-- 
2.1.4



More information about the buildroot mailing list