[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - connectivity/Library_mysqlc.mk connectivity/Library_postgresql-sdbc-impl.mk desktop/CppunitTest_desktop_app.mk desktop/CppunitTest_desktop_lokinit.mk desktop/Library_crashreport.mk desktop/Library_sofficeapp.mk external/clucene external/pdfium jurt/Library_jpipe.mk libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk libreofficekit/Executable_gtktiledviewer.mk libreofficekit/Executable_tilebench.mk onlineupdate/Executable_test_updater_dialog.mk onlineupdate/Executable_updater.mk sal/Library_sal.mk sc/CppunitTest_sc_ucalc.mk sc/Library_sc.mk smoketest/Executable_libtest.mk solenv/gbuild svl/Library_svl.mk svx/Executable_gengal.mk vcl/Executable_icontest.mk vcl/Executable_lo_kde5filepicker.mk vcl/Executable_mtfdemo.mk vcl/Executable_ui-previewer.mk vcl/Executable_vcldemo.mk vcl/Executable_visualbackendtest.mk vcl/Library_desktop_detector.mk vcl/Library_vcl.mk vcl/Library_vclplug_gen.mk vcl/Library_vclplug_gtk3_kde5.mk vcl/Lib rary_vclplug_gtk3.mk vcl/Library_vclplug_gtk.mk vcl/Library_vclplug_kde5.mk vcl/Library_vclplug_qt5.mk vcl/StaticLibrary_glxtest.mk

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri May 1 21:33:13 UTC 2020


 connectivity/Library_mysqlc.mk                              |    2 +-
 connectivity/Library_postgresql-sdbc-impl.mk                |    1 -
 desktop/CppunitTest_desktop_app.mk                          |    1 -
 desktop/CppunitTest_desktop_lokinit.mk                      |    1 -
 desktop/Library_crashreport.mk                              |    1 -
 desktop/Library_sofficeapp.mk                               |    3 ---
 external/clucene/Library_clucene.mk                         |    1 -
 external/pdfium/Library_pdfium.mk                           |    1 -
 jurt/Library_jpipe.mk                                       |    4 ----
 libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk |    1 -
 libreofficekit/Executable_gtktiledviewer.mk                 |    1 -
 libreofficekit/Executable_tilebench.mk                      |    1 -
 onlineupdate/Executable_test_updater_dialog.mk              |    1 -
 onlineupdate/Executable_updater.mk                          |    1 -
 sal/Library_sal.mk                                          |    3 ---
 sc/CppunitTest_sc_ucalc.mk                                  |    6 ------
 sc/Library_sc.mk                                            |    6 ------
 smoketest/Executable_libtest.mk                             |    1 -
 solenv/gbuild/platform/linux.mk                             |    2 +-
 solenv/gbuild/platform/unxgcc.mk                            |   10 +++++++++-
 svl/Library_svl.mk                                          |    5 -----
 svx/Executable_gengal.mk                                    |    2 --
 vcl/Executable_icontest.mk                                  |    1 -
 vcl/Executable_lo_kde5filepicker.mk                         |    1 -
 vcl/Executable_mtfdemo.mk                                   |    1 -
 vcl/Executable_ui-previewer.mk                              |    1 -
 vcl/Executable_vcldemo.mk                                   |    1 -
 vcl/Executable_visualbackendtest.mk                         |    1 -
 vcl/Library_desktop_detector.mk                             |    1 -
 vcl/Library_vcl.mk                                          |    6 ------
 vcl/Library_vclplug_gen.mk                                  |    1 -
 vcl/Library_vclplug_gtk.mk                                  |    1 -
 vcl/Library_vclplug_gtk3.mk                                 |    1 -
 vcl/Library_vclplug_gtk3_kde5.mk                            |    1 -
 vcl/Library_vclplug_kde5.mk                                 |    1 -
 vcl/Library_vclplug_qt5.mk                                  |    1 -
 vcl/StaticLibrary_glxtest.mk                                |    1 -
 37 files changed, 11 insertions(+), 64 deletions(-)

New commits:
commit 3f51807aed5f97eae4bddea01173d138658463c5
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Apr 25 11:48:39 2019 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Fri May 1 23:32:41 2020 +0200

    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 at redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93206
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

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
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/CppunitTest_desktop_lokinit.mk b/desktop/CppunitTest_desktop_lokinit.mk
index 502f0807075b..1f648a1ecc83 100644
--- a/desktop/CppunitTest_desktop_lokinit.mk
+++ b/desktop/CppunitTest_desktop_lokinit.mk
@@ -40,7 +40,6 @@ ifeq ($(OS),LINUX)
 $(eval $(call gb_CppunitTest_add_libs,desktop_lok_init,\
     -lm \
     -ldl \
-    -lpthread \
 ))
 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 5f6686b5ab64..acfe21a105db 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 \
     ) \
 ))
 
@@ -135,7 +134,6 @@ $(eval $(call gb_Library_add_exception_objects,sofficeapp,\
 ifeq ($(DISABLE_GUI),TRUE)
 $(eval $(call gb_Library_add_libs,sofficeapp,\
 	-lm $(DLOPEN_LIBS) \
-	-lpthread \
 ))
 else
 ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
@@ -147,7 +145,6 @@ endif
 
 $(eval $(call gb_Library_add_libs,sofficeapp,\
 	-lm $(DLOPEN_LIBS) \
-	-lpthread \
     -lX11 \
 ))
 endif
diff --git a/external/clucene/Library_clucene.mk b/external/clucene/Library_clucene.mk
index abc14d903f46..f04961398797 100644
--- a/external/clucene/Library_clucene.mk
+++ b/external/clucene/Library_clucene.mk
@@ -48,7 +48,6 @@ ifeq ($(OS),LINUX)
 $(eval $(call gb_Library_add_libs,clucene,\
 	-lm \
 	-ldl \
-	-lpthread \
 ))
 endif
 
diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk
index f9a62bf75b46..8283f6dd0aa1 100644
--- a/external/pdfium/Library_pdfium.mk
+++ b/external/pdfium/Library_pdfium.mk
@@ -565,7 +565,6 @@ ifneq (,$(filter LINUX ANDROID,$(OS)))
 $(eval $(call gb_Library_add_libs,pdfium,\
     -ldl \
     -lrt \
-    -lpthread \
 ))
 
 $(eval $(call gb_Library_use_external,pdfium,freetype))
diff --git a/jurt/Library_jpipe.mk b/jurt/Library_jpipe.mk
index 5759baed5175..204da654c553 100644
--- a/jurt/Library_jpipe.mk
+++ b/jurt/Library_jpipe.mk
@@ -74,10 +74,6 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,jpipe, \
 ))
 endif
 
-$(eval $(call gb_Library_add_libs,jpipe, \
-    $(if $(filter-out $(OS),ANDROID),-lpthread) \
-))
-
 $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,jpipe)): \
     gb_CC := $(filter-out -fsanitize%,$(gb_CC))
 $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,jpipe)): \
diff --git a/libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk b/libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk
index d58923f45194..da3be044e853 100644
--- a/libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk
+++ b/libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk
@@ -28,7 +28,6 @@ ifeq ($(OS),LINUX)
 $(eval $(call gb_CppunitTest_add_libs,libreofficekit_tiledrendering,\
     -lm \
     -ldl \
-    -lpthread \
 ))
 endif
 
diff --git a/libreofficekit/Executable_gtktiledviewer.mk b/libreofficekit/Executable_gtktiledviewer.mk
index 5dd89e6065f6..99ef51af8975 100644
--- a/libreofficekit/Executable_gtktiledviewer.mk
+++ b/libreofficekit/Executable_gtktiledviewer.mk
@@ -43,7 +43,6 @@ $(eval $(call gb_Executable_use_libraries,gtktiledviewer,\
 ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
 $(eval $(call gb_Executable_add_libs,gtktiledviewer,\
     -lm $(DLOPEN_LIBS) \
-    -lpthread \
 ))
 endif
 
diff --git a/libreofficekit/Executable_tilebench.mk b/libreofficekit/Executable_tilebench.mk
index 9977a93351ed..ae0a3b1f099b 100644
--- a/libreofficekit/Executable_tilebench.mk
+++ b/libreofficekit/Executable_tilebench.mk
@@ -24,7 +24,6 @@ $(eval $(call gb_Executable_use_libraries,tilebench,\
 
 $(eval $(call gb_Executable_add_libs,tilebench,\
     -lm $(DLOPEN_LIBS) \
-    -lpthread \
 ))
 
 $(eval $(call gb_Executable_add_exception_objects,tilebench,\
diff --git a/onlineupdate/Executable_test_updater_dialog.mk b/onlineupdate/Executable_test_updater_dialog.mk
index 92e70dfae337..cae8e02df141 100644
--- a/onlineupdate/Executable_test_updater_dialog.mk
+++ b/onlineupdate/Executable_test_updater_dialog.mk
@@ -61,7 +61,6 @@ $(eval $(call gb_Executable_add_libs,test_updater_dialog,\
 	-lXrender \
 	-lSM \
 	-lICE \
-	-lpthread \
 ))
 endif
 
diff --git a/onlineupdate/Executable_updater.mk b/onlineupdate/Executable_updater.mk
index a4ceacee6bc1..5f83c13eb9ec 100644
--- a/onlineupdate/Executable_updater.mk
+++ b/onlineupdate/Executable_updater.mk
@@ -71,7 +71,6 @@ $(eval $(call gb_Executable_add_libs,updater,\
 	-lXrender \
 	-lSM \
 	-lICE \
-	-lpthread \
 ))
 endif
 
diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index 47f02c85eae6..b40233acfdf3 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -54,9 +54,6 @@ $(eval $(call gb_Library_use_system_win32_libs,sal,\
 ))
 
 $(eval $(call gb_Library_add_libs,sal,\
-	$(if $(filter-out ANDROID HAIKU WNT,$(OS)), \
-		-lpthread \
-	) \
 	$(if $(filter LINUX,$(OS)), \
 		-ldl \
 		-lrt \
diff --git a/sc/CppunitTest_sc_ucalc.mk b/sc/CppunitTest_sc_ucalc.mk
index 0258d9117814..8822fbc8dead 100644
--- a/sc/CppunitTest_sc_ucalc.mk
+++ b/sc/CppunitTest_sc_ucalc.mk
@@ -118,12 +118,6 @@ $(eval $(call gb_CppunitTest_add_libs,sc_ucalc,\
 ))
 endif
 
-ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
-$(eval $(call gb_CppunitTest_add_libs,sc_ucalc,\
-    -lpthread \
-))
-endif
-
 $(eval $(call gb_CppunitTest_use_configuration,sc_ucalc))
 
 # vim: set noet sw=4 ts=4:
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 82bd3ba17691..231179dbb81b 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -717,12 +717,6 @@ $(eval $(call gb_Library_add_libs,sc,\
 ))
 endif
 
-ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
-$(eval $(call gb_Library_add_libs,sc,\
-    -lpthread \
-))
-endif
-
 $(eval $(call gb_SdiTarget_SdiTarget,sc/sdi/scslots,sc/sdi/scalc))
 
 $(eval $(call gb_SdiTarget_set_include,sc/sdi/scslots,\
diff --git a/smoketest/Executable_libtest.mk b/smoketest/Executable_libtest.mk
index e16c95073976..c1e33d35e10e 100644
--- a/smoketest/Executable_libtest.mk
+++ b/smoketest/Executable_libtest.mk
@@ -16,7 +16,6 @@ $(eval $(call gb_Executable_set_include,libtest,\
 ifeq ($(OS),LINUX)
 $(eval $(call gb_Executable_add_libs,libtest,\
 	-ldl \
-	-pthread \
 ))
 endif
 
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index 727418b8ea61..77d4dbe679e8 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -18,7 +18,7 @@ gb_LinkTarget_LDFLAGS += $(gb__LinkTarget_LDFLAGS_zdefs)
 include $(GBUILDDIR)/platform/unxgcc.mk
 
 ifeq ($(DISABLE_DYNLOADING),TRUE)
-gb_STDLIBS := -lpthread -ldl
+gb_STDLIBS := -ldl
 endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index a84c095721ff..098339ba6796 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -42,12 +42,20 @@ gb_CFLAGS := \
 	-Wdeclaration-after-statement \
 	-Wshadow \
 
+# At least libstdc++ (which is approximated here with !HAVE_LIBCXX) needs -pthread when including
+# various C++ headers like <thread>, see <https://gcc.gnu.org/onlinedocs/gcc-8.3.0/libstdc++/manual/
+# manual/using.html#manual.intro.using.flags>:
+ifeq ($(HAVE_LIBCXX),)
+gb_CXX_LINKFLAGS := -pthread
+endif
+
 gb_CXXFLAGS := \
 	$(gb_CXXFLAGS_COMMON) \
 	-fPIC \
 	-Wshadow \
 	-Woverloaded-virtual \
 	$(CXXFLAGS_CXX11) \
+	$(gb_CXX_LINKFLAGS) \
 
 
 # enable debug STL
@@ -121,7 +129,7 @@ gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
 # contains .c sources:
 define gb_LinkTarget__command_dynamiclink
 $(call gb_Helper_abbreviate_dirs,\
-	$(if $(CXXOBJECTS)$(GENCXXOBJECTS)$(EXTRAOBJECTLISTS)$(filter-out XTRUE,X$(ENABLE_RUNTIME_OPTIMIZATIONS)),$(gb_CXX),$(gb_CC)) \
+	$(if $(CXXOBJECTS)$(GENCXXOBJECTS)$(EXTRAOBJECTLISTS)$(filter-out XTRUE,X$(ENABLE_RUNTIME_OPTIMIZATIONS)),$(gb_CXX) $(gb_CXX_LINKFLAGS),$(gb_CC)) \
 		$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
 		$(gb_LTOFLAGS) \
 		$(if $(SOVERSIONSCRIPT),-Wl$(COMMA)--soname=$(notdir $(1)) \
diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk
index 4dad7be2a929..7d268905b720 100644
--- a/svl/Library_svl.mk
+++ b/svl/Library_svl.mk
@@ -111,11 +111,6 @@ $(eval $(call gb_Library_use_externals,svl,\
     nss3 \
     plc4 \
 ))
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Library_add_libs,svl, \
-    -lpthread \
-))
-endif
 endif # BUILD_TYPE=DESKTOP
 endif
 
diff --git a/svx/Executable_gengal.mk b/svx/Executable_gengal.mk
index e4c73928711b..f505e9e5c7f0 100644
--- a/svx/Executable_gengal.mk
+++ b/svx/Executable_gengal.mk
@@ -64,13 +64,11 @@ endif
 ifeq ($(DISABLE_GUI),TRUE)
 $(eval $(call gb_Executable_add_libs,gengal,\
 	$(DLOPEN_LIBS) \
-	-lpthread \
 ))
 else
 ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
 $(eval $(call gb_Executable_add_libs,gengal,\
 	$(DLOPEN_LIBS) \
-	-lpthread \
     -lX11 \
 ))
 
diff --git a/vcl/Executable_icontest.mk b/vcl/Executable_icontest.mk
index b162800e72fd..6faf33703aa1 100644
--- a/vcl/Executable_icontest.mk
+++ b/vcl/Executable_icontest.mk
@@ -37,7 +37,6 @@ $(eval $(call gb_Executable_use_static_libraries,icontest,\
 ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
 $(eval $(call gb_Executable_add_libs,icontest,\
 	-lm $(DLOPEN_LIBS) \
-	-lpthread \
     -lX11 \
 ))
 
diff --git a/vcl/Executable_lo_kde5filepicker.mk b/vcl/Executable_lo_kde5filepicker.mk
index 2eee2cd8711b..f3e940953601 100644
--- a/vcl/Executable_lo_kde5filepicker.mk
+++ b/vcl/Executable_lo_kde5filepicker.mk
@@ -92,7 +92,6 @@ ifeq ($(OS),LINUX)
 $(eval $(call gb_Executable_add_libs,lo_kde5filepicker,\
 	-lm \
 	-ldl \
-	-lpthread \
 ))
 endif
 
diff --git a/vcl/Executable_mtfdemo.mk b/vcl/Executable_mtfdemo.mk
index d637439a17ba..5c4c45165535 100644
--- a/vcl/Executable_mtfdemo.mk
+++ b/vcl/Executable_mtfdemo.mk
@@ -43,7 +43,6 @@ $(eval $(call gb_Executable_use_static_libraries,mtfdemo,\
 ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
 $(eval $(call gb_Executable_add_libs,mtfdemo,\
 	-lm $(DLOPEN_LIBS) \
-	-lpthread \
     -lX11 \
 ))
 
diff --git a/vcl/Executable_ui-previewer.mk b/vcl/Executable_ui-previewer.mk
index 0925e575ee67..cf6a2d3de6c7 100644
--- a/vcl/Executable_ui-previewer.mk
+++ b/vcl/Executable_ui-previewer.mk
@@ -37,7 +37,6 @@ $(eval $(call gb_Executable_add_exception_objects,ui-previewer,\
 ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
 $(eval $(call gb_Executable_add_libs,ui-previewer,\
 	-lm $(DLOPEN_LIBS) \
-	-lpthread \
     -lX11 \
 ))
 
diff --git a/vcl/Executable_vcldemo.mk b/vcl/Executable_vcldemo.mk
index 125a151dec99..55848b280339 100644
--- a/vcl/Executable_vcldemo.mk
+++ b/vcl/Executable_vcldemo.mk
@@ -53,7 +53,6 @@ $(eval $(call gb_Executable_use_static_libraries,vcldemo,\
 ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
 $(eval $(call gb_Executable_add_libs,vcldemo,\
 	-lm $(DLOPEN_LIBS) \
-	-lpthread \
     -lX11 \
 ))
 
diff --git a/vcl/Executable_visualbackendtest.mk b/vcl/Executable_visualbackendtest.mk
index 87044535f03e..41c641a5ff14 100644
--- a/vcl/Executable_visualbackendtest.mk
+++ b/vcl/Executable_visualbackendtest.mk
@@ -45,7 +45,6 @@ ifeq ($(OS),LINUX)
 $(eval $(call gb_Executable_add_libs,visualbackendtest,\
 	-lm \
 	-ldl \
-	-lpthread \
     -lX11 \
 ))
 
diff --git a/vcl/Library_desktop_detector.mk b/vcl/Library_desktop_detector.mk
index 3edd0015e243..f28ff9078e64 100644
--- a/vcl/Library_desktop_detector.mk
+++ b/vcl/Library_desktop_detector.mk
@@ -66,7 +66,6 @@ $(eval $(call gb_Library_add_exception_objects,desktop_detector,\
 ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
 $(eval $(call gb_Library_add_libs,desktop_detector,\
 	-lm $(DLOPEN_LIBS) \
-	-lpthread \
 ))
 endif
 
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index b08e2e8fc729..732c4b3514b5 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -540,11 +540,6 @@ $(eval $(call gb_Library_use_externals,vcl,\
     freetype \
     fontconfig \
 ))
-ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
-$(eval $(call gb_Library_add_libs,vcl,\
-    -lpthread \
-))
-endif
 
 else # ! DISABLE_GUI
 
@@ -566,7 +561,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
 $(eval $(call gb_Library_add_libs,vcl,\
     -lm $(DLOPEN_LIBS) \
-    -lpthread \
     -lX11 \
     -lXext \
 ))
diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index 328b259bf05a..4d45bd89ebe9 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -146,7 +146,6 @@ ifeq ($(OS),LINUX)
 $(eval $(call gb_Library_add_libs,vclplug_gen,\
 	-lm \
 	-ldl \
-	-lpthread \
 ))
 endif
 
diff --git a/vcl/Library_vclplug_gtk.mk b/vcl/Library_vclplug_gtk.mk
index 67d405d4c8fa..360eabf46020 100644
--- a/vcl/Library_vclplug_gtk.mk
+++ b/vcl/Library_vclplug_gtk.mk
@@ -126,7 +126,6 @@ ifeq ($(OS),LINUX)
 $(eval $(call gb_Library_add_libs,vclplug_gtk,\
 	-lm \
 	-ldl \
-	-lpthread \
 ))
 endif
 
diff --git a/vcl/Library_vclplug_gtk3.mk b/vcl/Library_vclplug_gtk3.mk
index 999eac743a9e..933e67082cc4 100644
--- a/vcl/Library_vclplug_gtk3.mk
+++ b/vcl/Library_vclplug_gtk3.mk
@@ -120,7 +120,6 @@ ifeq ($(OS),LINUX)
 $(eval $(call gb_Library_add_libs,vclplug_gtk3,\
 	-lm \
 	-ldl \
-	-lpthread \
 ))
 endif
 
diff --git a/vcl/Library_vclplug_gtk3_kde5.mk b/vcl/Library_vclplug_gtk3_kde5.mk
index 6c5e79c60f00..d7f9b9d11107 100644
--- a/vcl/Library_vclplug_gtk3_kde5.mk
+++ b/vcl/Library_vclplug_gtk3_kde5.mk
@@ -125,7 +125,6 @@ ifeq ($(OS),LINUX)
 $(eval $(call gb_Library_add_libs,vclplug_gtk3_kde5,\
 	-lm \
 	-ldl \
-	-lpthread \
 	$(KF5_LIBS) \
 ))
 endif
diff --git a/vcl/Library_vclplug_kde5.mk b/vcl/Library_vclplug_kde5.mk
index 4d134d0fbf8b..d9e18677359e 100644
--- a/vcl/Library_vclplug_kde5.mk
+++ b/vcl/Library_vclplug_kde5.mk
@@ -90,7 +90,6 @@ ifeq ($(OS),LINUX)
 $(eval $(call gb_Library_add_libs,vclplug_kde5,\
 	-lm \
 	-ldl \
-	-lpthread \
 ))
 endif
 
diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk
index 6e23c0d496da..06c02ed6ad76 100644
--- a/vcl/Library_vclplug_qt5.mk
+++ b/vcl/Library_vclplug_qt5.mk
@@ -116,7 +116,6 @@ ifeq ($(OS),LINUX)
 $(eval $(call gb_Library_add_libs,vclplug_qt5,\
 	-lm \
 	-ldl \
-	-lpthread \
 ))
 endif
 
diff --git a/vcl/StaticLibrary_glxtest.mk b/vcl/StaticLibrary_glxtest.mk
index 227cbaa574c1..1a285875c828 100644
--- a/vcl/StaticLibrary_glxtest.mk
+++ b/vcl/StaticLibrary_glxtest.mk
@@ -31,7 +31,6 @@ $(eval $(call gb_StaticLibrary_use_api,glxtest,\
 
 $(eval $(call gb_StaticLibrary_add_libs,glxtest,\
 	-lm $(DLOPEN_LIBS) \
-	-lpthread \
     -lX11 \
 ))
 


More information about the Libreoffice-commits mailing list