Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3828

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/28/3828/1

gbuild: unxgcc: link with C compiler if no C++ files

In 5589c72b88e502bfca045ae38af16c854afdd401 a problem due to linking
pyuno_wrapper with g++ was fixed: the library should not have a
dependency on libstdc++.  It's possible to implement this in gbuild
directly by checking whether there are any C++ input files.

(apparently g++ implicitly links in libm too...)

Change-Id: I04dce06f796e20047ce7f5eab65e6110c0244445
---
M desktop/Executable_oosplash.mk
M solenv/gbuild/platform/unxgcc.mk
2 files changed, 8 insertions(+), 1 deletion(-)



diff --git a/desktop/Executable_oosplash.mk b/desktop/Executable_oosplash.mk
index 51657fe..1e75f64 100644
--- a/desktop/Executable_oosplash.mk
+++ b/desktop/Executable_oosplash.mk
@@ -55,6 +55,12 @@
 
 endif
 
+ifeq ($(OS),LINUX)
+$(eval $(call gb_Executable_add_libs,oosplash,\
+    -lm \
+))
+endif
+
 ifeq ($(OS),SOLARIS)
 
 $(eval $(call gb_Executable_add_libs,oosplash,\
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index bbfe168..57a078d 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -182,10 +182,11 @@
 
 # note that `cat $(extraobjectlist)` is needed to build with older gcc 
versions, e.g. 4.1.2 on SLED10
 # we want to use @$(extraobjectlist) in the long run
+# link with C compiler if there are no C++ files (pyuno_wrapper depends on 
this)
 define gb_LinkTarget__command_dynamiclink
 $(call gb_Helper_abbreviate_dirs,\
        mkdir -p $(dir $(1)) && \
-       $(gb_CXX) \
+       $(if 
$(CXXOBJECTS)$(GENCXXOBJECTS)$(EXTRAOBJECTLISTS),$(gb_CXX),$(gb_CC)) \
                $(if $(filter Library 
CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
                $(if $(filter-out $(foreach lib,frm scfilt wpftdraw,$(call 
gb_Library_get_linktargetname,$(lib))),$*),$(gb_LTOFLAGS)) \
                $(if $(SOVERSION),-Wl$(COMMA)--soname=$(notdir 
$(1)).$(SOVERSION)) \

-- 
To view, visit https://gerrit.libreoffice.org/3828
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I04dce06f796e20047ce7f5eab65e6110c0244445
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Michael Stahl <mst...@redhat.com>

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to