On 26.04.2012 15:04, Stephan Bergmann wrote:
[I accidentally sent this response to David only...]

-------- Original Message --------
Subject: Re: make check problem in libtest_smoketest building master
Date: Thu, 26 Apr 2012 08:10:19 +0200
From: Stephan Bergmann <sberg...@redhat.com>
To: David Ostrovsky <david.ostrov...@gmx.de>

On 04/25/2012 11:00 PM, David Ostrovsky wrote:
> Now we have a test, how do we solve the broken make check on Ubuntu anyway?
> I would prefer a small/quick hack in place to repaire the broken make
> check on Ubuntu.
> Then we have time to refactor the hack and make it the right way...

For a hack, wouldn't the easiest thing be to unconditionally sneak a
--no-as-needed into the relevant platforms' linker command lines in
solenv/gbuild/ and solenv/inc/?


With this ugly (work-in-progress) hack (needed only in gbuild-part) make check command pass now on Ubuntu 11.10 (with default --as-needed linker option)
I'm not sure, if this is the best place to do it.
Note:
I did it unconditionally: the production code would link with this option too (still have to test it with clean build). This is because the linking take place in smoketest/Library_smoketest.mk with normal function:
$(eval $(call gb_Library_Library,smoketest)

Ideas on this?

David

PS: with this patch the full command is:

[ build LNK ] CppunitTest/libtest_smoketest.so
S=/home/david/projects/libreoffice-core/git/libo && O=$S/solver/unxlngx6.pro && W=$S/workdir/unxlngx6.pro && mkdir -p $W/LinkTarget/CppunitTest/ && /usr/bin/ccache g++ -shared -Wl,-z,noexecstack -Wl,-z,defs -Wl,-rpath-link,/lib:/usr/lib -Wl,-z,combreloc -L$S/solenv/unxlngx6/lib -L$O/lib -L$S/solenv/unxlngx6/lib -L/usr/lib/x86_64-linux-gnu -Wl,--hash-style=gnu -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo -Wl,-Bsymbolic-functions -Wl,--start-group -Wl,--end-group -Wl,--no-as-needed -lcppunit -lsmoketest -o $W/LinkTarget/CppunitTest/libtest_smoketest.so

>From a61ff76b56cd4fec60b624b867683db9f3e3d264 Mon Sep 17 00:00:00 2001
From: David Ostrovsky <david.ostrov...@gmx.de>
Date: Sat, 28 Apr 2012 20:57:54 +0200
Subject: [PATCH] add --not-as-needed linker option on unxgcc platform

Change-Id: I88fc79766ffb4a4ca8ead05bb9033c686120cf2c
---
 solenv/gbuild/platform/unxgcc.mk |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index d288d63..89665d6 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -213,6 +213,7 @@ $(call gb_Helper_abbreviate_dirs,\
 		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
 		$(foreach extraobjectlist,$(EXTRAOBJECTLISTS),`cat $(extraobjectlist)`) \
 		-Wl$(COMMA)--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) -Wl$(COMMA)--end-group \
+		-Wl$(COMMA)--no-as-needed \
 		$(LIBS) \
 		$(patsubst lib%.a,-l%,$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))))) \
 		-o $(if $(SOVERSION),$(1).$(SOVERSION),$(1)))
-- 
1.7.5.4

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

Reply via email to