[Pacemaker] Proposing patch for ld --as-needed

Ultrabug ultrabug at ultrabug.net
Tue Jul 20 15:35:01 UTC 2010


Hi,

This link explains the ld --as-needed flag better :
http://www.gentoo.org/proj/en/qa/asneeded.xml

As far as I know, Gentoo use the 'normal' ld GNU linker and those 
changes are required because some libs need symbols defined elsewhere.
For more information and to show the details behind this, I'm attaching 
the failing build log I get if I don't patch before using the ld 
--as-needed flag.

Regards

----- Original Message -----
From: Simon Horman <horms at verge.net.au>
To: The Pacemaker cluster resource manager <pacemaker at oss.clusterlabs.org>
Sent: Tue, 20 Jul 2010 05:10:32 +0200 (CEST)
Subject: Re: [Pacemaker] Proposing patch for ld --as-needed

On Sat, Jul 17, 2010 at 01:12:20PM +0200, Ultrabug wrote:
> Dear list,
>
> I would like to ask you about a possible upstream modification regarding the --
> as-needed ld flag for which we Gentoo users need to patch the pacemaker sources
> to get it compile.
>
> I'm attaching the patch which, as you can see, is relatively small and simple
> (looks to me at least). The question is whether or not you think this could be
> done upstream ?
>
> Thank you for your interest in this and all you work,

Out of interest, could you explain why this is needed?
Is it because gold is being used as the linker?

> --- pengine/Makefile.am
> +++ pengine/Makefile.am
> @@ -58,6 +58,7 @@
>  # -L$(top_builddir)/lib/pils -lpils -export-dynamic -module -avoid-version
>  libpengine_la_SOURCES	= pengine.c allocate.c utils.c constraints.c \
>  			native.c group.c clone.c master.c graph.c
> +libpengine_la_LIBADD    = $(top_builddir)/lib/pengine/libpe_status.la
>
>  pengine_SOURCES	= main.c
>  pengine_LDADD	= $(COMMONLIBS)	$(top_builddir)/lib/cib/libcib.la
> --- lib/pengine/Makefile.am
> +++ lib/pengine/Makefile.am
> @@ -34,7 +34,7 @@
>
>  libpe_status_la_LDFLAGS	= -version-info 2:0:0
>  libpe_status_la_SOURCES	=  $(rule_files) $(status_files)
> -libpe_status_la_LIBADD	= -llrm
> +libpe_status_la_LIBADD	= -llrm @CURSESLIBS@
>
>  clean-generic:
>  	rm -f *.log *.debug *~

> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker


_______________________________________________
Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: 
http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker


-------------- next part --------------
A non-text attachment was scrubbed...
Name: compile-with-no-as-needed.build.log
Type: application/octet-stream
Size: 124315 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20100720/ce4919cc/attachment-0004.obj>


More information about the Pacemaker mailing list