Skip to contentSkip to conversation

gd: fix static build with threads

PATCH New Baruch Siach 2 participants 2 messages Apr 10, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gd: fix static build with threads

Fixes:
http://autobuild.buildroot.net/results/4b4/4b4272876385cc21dd06ee946d658b8f9e225d78/

---
 package/gd/gd.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/gd/gd.mk +5 -0
index 60c1c514375c..146ad6f9fde9 100644
@@ -16,6 +16,11 @@ GD_LICENSE_FILES = COPYING
 GD_CONFIG_SCRIPTS = gdlib-config
 GD_CONF_OPT = --without-x --disable-rpath
 
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)$(BR2_PREFER_STATIC_LIB),yy)
+# add -pthread when linking executables statically
+GD_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -pthread"
+endif
+
 ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
 GD_DEPENDENCIES += fontconfig
 GD_CONF_OPT += --with-fontconfig
Signature · 1 line
1.9.1