summaryrefslogtreecommitdiffstats
path: root/package/gd
diff options
context:
space:
mode:
authorPeter Korsgaard <peter@korsgaard.com>2014-10-27 00:52:45 +0100
committerPeter Korsgaard <peter@korsgaard.com>2014-10-27 00:54:01 +0100
commite6debc2e078d06e0ac177a882d9f4268f5b37077 (patch)
tree04d73d4704286e257d35a3fa47db35ef1f4d5a07 /package/gd
parentf3026e3850a2dda48f4cb17559152e3b3cceaaa1 (diff)
gd: fix pthread related static linking issue for utilities
gd forgets to link utilities with -pthread even though it uses pthreads, causing linking errors with static linking. Fixes http://autobuild.buildroot.net/results/156/1564b8de7785c1a756bead1a4160a2b6e2a2243e/ Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/gd')
-rw-r--r--package/gd/gd.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/package/gd/gd.mk b/package/gd/gd.mk
index 906c333d4..927dfb296 100644
--- a/package/gd/gd.mk
+++ b/package/gd/gd.mk
@@ -14,6 +14,12 @@ GD_LICENSE_FILES = COPYING
GD_CONFIG_SCRIPTS = gdlib-config
GD_CONF_OPTS = --without-x --disable-rpath
+# gd forgets to link utilities with -pthread even though it uses
+# pthreads, causing linking errors with static linking
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+GD_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -pthread"
+endif
+
ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
GD_DEPENDENCIES += fontconfig
GD_CONF_OPTS += --with-fontconfig