From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8445692864124608351==" MIME-Version: 1.0 From: Vicente Olivert Riera To: elfutils-devel@lists.fedorahosted.org Subject: Re: make the shared library optional Date: Wed, 05 Nov 2014 13:32:21 +0000 Message-ID: <545A26E5.4080603@imgtec.com> In-Reply-To: m2r3xiaohv.fsf@redhat.com --===============8445692864124608351== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Dear Petr Machata, On 11/04/2014 05:01 PM, Petr Machata wrote: > Vicente Olivert Riera writes: > = >> I'm having a failure when doing a static build of elfutils because it >> tries to build a shared library (.so). Could it be possible to add a >> configure option to disable the shared library so only the static one >> (.a) would be built? > = > Note that fully static builds are problematic. elfutils uses dlopen to > open the EBL backends (the CPU-specific support snippets), so even if > you link statically, the final binaries are still considerably dynamic. > = > One option (that we use in Red Hat Developer Toolset) is to statically > link in just the backends that you are interested in. There were some > problems with mutual dependencies between elfutils libraries, and I > ended up having to split the libraries into smaller parts and adding > linker scripts that brought the pieces together. > = > Mark and I have branches with this code--his is more recent, as he's > been doing that work lately. They are named {pmachata,mjw}/RH-DTS. > = > (Note that we still build the dynamic parts though, as eu-readelf > et.al. can still use the dynamism, it's just customer code that needs > the static bits. I'm not really sure what your bug is, just dropping my > two cents WRT lack of real static support in elfutils.) thank you very much for your reply and your detailed explanation. I have decided to send a patch to not allow elfutils to be built statically: http://patchwork.ozlabs.org/patch/406941/ Best regards, -- = Vicente Olivert Riera Graduate Software Engineer, MIPS Processor IP Imagination Technologies Limited t: +44 (0)113 2429814 www.imgtec.com --===============8445692864124608351==--