summaryrefslogtreecommitdiffstats
path: root/connectivity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-04-25 11:48:39 +0200
committerTor Lillqvist <tml@collabora.com>2020-05-01 23:32:41 +0200
commit3f51807aed5f97eae4bddea01173d138658463c5 (patch)
treea85a60ce2c8765f6770ea0d1a0fd4bc9bfe07a6e /connectivity
parentAdd --with-latest-c++ to explicitly opt in for -std=c++20/-std:c++latest (diff)
downloadcore-3f51807aed5f97eae4bddea01173d138658463c5.tar.gz
core-3f51807aed5f97eae4bddea01173d138658463c5.zip
Cut down on -pthread/-lpthread proliferation
Building against libstdc++ effectively always requires -pthread anyway (as various standard C++ headers require it, see the comment added to solenv/gbuild/platform/unxgcc.mk), so many explicit uses of -pthread/-lpthread can be removed. Doing a (partial) test build on Linux with Clang -stdlib=libc++ suggests that libc++ indeed doesn't need -pthread as libstdc++ does. The remaining uses of -pthread/-lpthread are mostly in configure.ac for the various BSDs (which somebody else might want to clean up now), and related to external projects. I tried to be careful to remove -pthread/-lpthread from makefiles only when C++ object files are involved (so -pthread will now be included on the link command line by default). Change-Id: I936e082839cb9a434bd273ce5a1f187a4245dfa1 Reviewed-on: https://gerrit.libreoffice.org/71291 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93206 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/Library_mysqlc.mk2
-rw-r--r--connectivity/Library_postgresql-sdbc-impl.mk1
2 files changed, 1 insertions, 2 deletions
diff --git a/connectivity/Library_mysqlc.mk b/connectivity/Library_mysqlc.mk
index 455f9b2224df..0999b46d3eec 100644
--- a/connectivity/Library_mysqlc.mk
+++ b/connectivity/Library_mysqlc.mk
@@ -24,7 +24,7 @@ $(eval $(call gb_Library_set_include,mysqlc,\
$(eval $(call gb_Library_add_libs,mysqlc,\
$(if $(filter-out WNT,$(OS)),$(if $(filter HAIKU MACOSX SOLARIS,$(OS)),\
-lz -lm,-rdynamic -lz -lcrypt -lm)) \
- $(if $(filter LINUX,$(OS)),-lpthread -ldl,) \
+ $(if $(filter LINUX,$(OS)),-ldl,) \
))
$(eval $(call gb_Library_use_sdk_api,mysqlc))
diff --git a/connectivity/Library_postgresql-sdbc-impl.mk b/connectivity/Library_postgresql-sdbc-impl.mk
index 53cebd01a242..80c746f802dc 100644
--- a/connectivity/Library_postgresql-sdbc-impl.mk
+++ b/connectivity/Library_postgresql-sdbc-impl.mk
@@ -61,7 +61,6 @@ $(eval $(call gb_Library_add_libs,postgresql-sdbc-impl,\
$(if $(WITH_GSSAPI),$(GSSAPI_LIBS)) \
$(if $(WITH_KRB5),$(KRB5_LIBS)) \
$(if $(filter-out MACOSX,$(OS)),-ldl) \
- $(if $(filter-out MACOSX,$(OS)),-lpthread) \
))
endif