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

Allan McRae allan at archlinux.org
Wed May 5 08:05:53 CEST 2010


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.

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.

Allan


More information about the pacman-dev mailing list