diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-04-25 11:48:39 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2020-06-04 14:04:23 +0200 |
commit | fda7f14cb5e4d5f93b2ee706b7ec6ad35a988ae5 (patch) | |
tree | c0b8d5f26c2c855ad8bca02d41a422fd14afedf5 /desktop | |
parent | 968fbfb4c987c1366c8a2ad435e5fdd9e281d397 (diff) |
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).
Reviewed-on: https://gerrit.libreoffice.org/71291
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit b1141fa61073b3f24e1a3574afa55a954e5a153d)
Change-Id: I936e082839cb9a434bd273ce5a1f187a4245dfa1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95130
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/CppunitTest_desktop_app.mk | 1 | ||||
-rw-r--r-- | desktop/Library_crashreport.mk | 1 | ||||
-rw-r--r-- | desktop/Library_sofficeapp.mk | 3 |
3 files changed, 0 insertions, 5 deletions
diff --git a/desktop/CppunitTest_desktop_app.mk b/desktop/CppunitTest_desktop_app.mk index cd698aceee5e..adb57add6e7a 100644 --- a/desktop/CppunitTest_desktop_app.mk +++ b/desktop/CppunitTest_desktop_app.mk @@ -66,7 +66,6 @@ endif $(eval $(call gb_CppunitTest_add_libs,desktop_app,\ -lm $(DLOPEN_LIBS) \ - -lpthread \ -lX11 \ )) endif diff --git a/desktop/Library_crashreport.mk b/desktop/Library_crashreport.mk index 3b9d6dd34fdc..a2cef785f370 100644 --- a/desktop/Library_crashreport.mk +++ b/desktop/Library_crashreport.mk @@ -26,7 +26,6 @@ $(eval $(call gb_Library_add_defs,crashreport,\ $(eval $(call gb_Library_add_libs,crashreport,\ $(if $(filter LINUX %BSD SOLARIS, $(OS)), \ $(DLOPEN_LIBS) \ - -lpthread \ ) \ )) diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk index 288e26d47726..29deeb707e3a 100644 --- a/desktop/Library_sofficeapp.mk +++ b/desktop/Library_sofficeapp.mk @@ -19,7 +19,6 @@ $(eval $(call gb_Library_set_include,sofficeapp,\ $(eval $(call gb_Library_add_libs,sofficeapp,\ $(if $(filter LINUX %BSD SOLARIS, $(OS)), \ $(DLOPEN_LIBS) \ - -lpthread \ ) \ )) @@ -126,7 +125,6 @@ $(eval $(call gb_Library_add_exception_objects,sofficeapp,\ ifeq ($(ENABLE_HEADLESS),TRUE) $(eval $(call gb_Library_add_libs,sofficeapp,\ -lm $(DLOPEN_LIBS) \ - -lpthread \ )) else ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS))) @@ -138,7 +136,6 @@ endif $(eval $(call gb_Library_add_libs,sofficeapp,\ -lm $(DLOPEN_LIBS) \ - -lpthread \ -lX11 \ )) endif |