[pacman-dev] [PATCH 3/4] Build vercmp without needing link to libalpm

Dan McGee dpmcgee at gmail.com
Wed May 5 14:55:25 CEST 2010


On Wed, May 5, 2010 at 1:05 AM, Allan McRae <allan at archlinux.org> wrote:
> On 05/05/10 14:45, Dan McGee wrote:
>>
>> Include the object file directly from the libalpm version comparison code
>> as
>> it is the only thing we need. This drops the dependency of vercmp on
>> libalpm and all of the stuff we know it drags in.
>>
>> Signed-off-by: Dan McGee<dan at archlinux.org>
>> ---
>
> <snip>
>
> After applying the four patches from this patchset:
>
>> readelf -d src/util/vercmp
>
> Dynamic section at offset 0xdfc contains 21 entries:
>  Tag        Type                         Name/Value
>  0x00000001 (NEEDED)                     Shared library: [libssp.so.0]
>  0x00000001 (NEEDED)                     Shared library: [libc.so.6]
> ...
>
> libssp is part of gcc(-libs), so linking to that is probably not a disaster.
>  But is it still not needed for the current Arch vercmp so may be worth
> looking into.

The ssp comes from here:
http://projects.archlinux.org/pacman.git/tree/configure.ac#n291

See the GCC_STACK_PROTECT_* macros listed there, which are turned on
in debug builds (and for now not in production builds, although there
is a feature request in Arch in general to add that).

> This was of course using -Wl,--as-needed.  The list of linked libraries is
> very long if that is not used (I discovered I had an unaltered
> makepkg-git.conf...).  Maybe we should consider adding --as-needed by
> default (when supported).  Almost ever system that can build pacman will
> support --as-needed.

Yeah, sorry I sent these late or I would have noted you needed to use
--as-needed. I think for now that is a reasonable compromise, and you
might be right about saying we could add that as default.

Thanks for testing!

-Dan


More information about the pacman-dev mailing list