[Libreoffice-commits] .: Branch 'libreoffice-3-4' - configure.in solenv/gbuild
Robert Nagy
rnagy at kemper.freedesktop.org
Sun Apr 3 15:27:52 PDT 2011
configure.in | 2 +-
solenv/gbuild/platform/openbsd.mk | 15 +++++++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
New commits:
commit 0a072026bd18f8b124a632758276f6e285f1d936
Author: Robert Nagy <robert at openbsd.org>
Date: Mon Apr 4 00:26:22 2011 +0200
rework how pthread is handled on openbsd
- remove -pthread from PTHREAD_CFLAGS
- add pthread to gb_STDLIBS
- redefine gb_LinkTarget__command_dynamiclink so that we can
substitute -lpthread with -pthread in the list of libraries
that we link to
diff --git a/configure.in b/configure.in
index 80af57e..50ea5e1 100755
--- a/configure.in
+++ b/configure.in
@@ -1513,7 +1513,7 @@ case "$host_os" in
test_gtk=yes
test_kde=yes
test_freetype=yes
- PTHREAD_CFLAGS="-pthread -D_THREAD_SAFE"
+ PTHREAD_CFLAGS="-D_THREAD_SAFE"
PTHREAD_LIBS="-pthread"
_os=OpenBSD
;;
diff --git a/solenv/gbuild/platform/openbsd.mk b/solenv/gbuild/platform/openbsd.mk
index 9121ac7..7386eea 100755
--- a/solenv/gbuild/platform/openbsd.mk
+++ b/solenv/gbuild/platform/openbsd.mk
@@ -37,7 +37,22 @@ endif
gb_Library_DLLPOSTFIX := ob
gb_COMPILERDEFAULTOPTFLAGS := -O2
+gb_STDLIBS := pthread
include $(GBUILDDIR)/platform/unxgcc.mk
+define gb_LinkTarget__command_dynamiclink
+$(call gb_Helper_abbreviate_dirs,\
+ mkdir -p $(dir $(1)) && \
+ $(gb_CXX) \
+ $(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
+ $(subst \d,$$,$(RPATH)) $(LDFLAGS) \
+ $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
+ $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
+ $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
+ -Wl$(COMMA)--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) -Wl$(COMMA)--end-group \
+ $(subst -lpthread,$(PTHREAD_LIBS),$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))))) \
+ -o $(1))
+endef
+
# vim: set noet sw=4:
More information about the Libreoffice-commits
mailing list