summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/snappy/snappy.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/package/snappy/snappy.mk b/package/snappy/snappy.mk
index b00dddf6cf..6f89cf11cb 100644
--- a/package/snappy/snappy.mk
+++ b/package/snappy/snappy.mk
@@ -16,4 +16,13 @@ SNAPPY_INSTALL_STAGING = YES
# Disable tests
SNAPPY_CONF_OPTS = --disable-gtest
+# libsnappy links with libstdc++. Some libstdc++/arch variants use
+# pthread symbols for internal locking if built with thead
+# support. libstdc++ does not have a .pc file, and its .la file does
+# not mention -pthread. So, static linkig to libstdc++ will fail if
+# -pthread is not explicity linked to. Only do that for static builds.
+ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
+SNAPPY_CONF_OPTS += LIBS=-pthread
+endif
+
$(eval $(autotools-package))
OpenPOWER on IntegriCloud