[pacman-dev] [PATCH] Add "-Wl,--as-needed" to libalpm LDFLAGS.
Lukas Fleischer
archlinux at cryptocrack.de
Sun Mar 20 14:51:12 EDT 2011
On Sun, Mar 20, 2011 at 11:29:32AM -0500, Dan McGee wrote:
> Applied this but still seeing problems...hmm.
>
> /bin/sh ../../libtool --tag=CC --mode=link gcc -std=gnu99 -pedantic
> -D_GNU_SOURCE -fvisibility=internal -fgnu89-inline -march=x86-64
> -mtune=generic -O2 -pipe -fstack-protector-all -D_FORTIFY_SOURCE=2 -g
> -Wall -Werror -no-undefined -version-info 6:0:0 -Wl,--hash-style=gnu
> -Wl,--as-needed -o libalpm.la -rpath /usr/lib add.lo alpm.lo
> alpm_list.lo backup.lo be_local.lo be_package.lo be_sync.lo
> conflict.lo db.lo delta.lo deps.lo diskspace.lo dload.lo error.lo
> group.lo handle.lo log.lo package.lo pkghash.lo remove.lo sync.lo
> trans.lo util.lo version.lo -lfetch -lssl -larchive -lssp
> libtool: link: gcc -std=gnu99 -shared -fPIC -DPIC .libs/add.o
> .libs/alpm.o .libs/alpm_list.o .libs/backup.o .libs/be_local.o
> .libs/be_package.o .libs/be_sync.o .libs/conflict.o .libs/db.o
> .libs/delta.o .libs/deps.o .libs/diskspace.o .libs/dload.o
> .libs/error.o .libs/group.o .libs/handle.o .libs/log.o .libs/package.o
> .libs/pkghash.o .libs/remove.o .libs/sync.o .libs/trans.o .libs/util.o
> .libs/version.o -Wl,--as-needed -lfetch -lssl /usr/lib/libarchive.so
> -lacl -lattr -lexpat -llzma -lbz2 -lz -lcrypto -lssp -march=x86-64
> -mtune=generic -O2 -Wl,--hash-style=gnu -Wl,-soname -Wl,libalpm.so.6
> -o .libs/libalpm.so.6.0.0
> libtool: link: (cd ".libs" && rm -f "libalpm.so.6" && ln -s
> "libalpm.so.6.0.0" "libalpm.so.6")
> libtool: link: (cd ".libs" && rm -f "libalpm.so" && ln -s
> "libalpm.so.6.0.0" "libalpm.so")
> libtool: link: ar cru .libs/libalpm.a add.o alpm.o alpm_list.o
> backup.o be_local.o be_package.o be_sync.o conflict.o db.o delta.o
> deps.o diskspace.o dload.o error.o group.o handle.o log.o package.o
> pkghash.o remove.o sync.o trans.o util.o version.o
> libtool: link: ranlib .libs/libalpm.a
> libtool: link: ( cd ".libs" && rm -f "libalpm.la" && ln -s
> "../libalpm.la" "libalpm.la" )
>
>
> dmcgee at galway ~/projects/pacman-maint (maint)
> $ ldd lib/libalpm/.libs/libalpm.so
> linux-vdso.so.1 => (0x00007fff38dff000)
> libfetch.so => /usr/lib/libfetch.so (0x00007faf13b0e000)
> libarchive.so.2 => /usr/lib/libarchive.so.2 (0x00007faf138cb000)
> libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x00007faf1350e000)
> libssp.so.0 => /usr/lib/libssp.so.0 (0x00007faf1330c000)
> libc.so.6 => /lib/libc.so.6 (0x00007faf12fab000)
> libssl.so.1.0.0 => /usr/lib/libssl.so.1.0.0 (0x00007faf12d4e000)
> libacl.so.1 => /lib/libacl.so.1 (0x00007faf12b47000)
> libattr.so.1 => /lib/libattr.so.1 (0x00007faf12943000)
> libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007faf12719000)
> liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007faf124f7000)
> libbz2.so.1.0 => /lib/libbz2.so.1.0 (0x00007faf122e7000)
> libz.so.1 => /usr/lib/libz.so.1 (0x00007faf120ce000)
> libdl.so.2 => /lib/libdl.so.2 (0x00007faf11eca000)
> /lib/ld-linux-x86-64.so.2 (0x00007faf13f76000)
> libpthread.so.0 => /lib/libpthread.so.0 (0x00007faf11cac000)
>
ldd(1) lists dependencies recursively - so this one includes indirect
dependencies as well. Use `readelf -d` instead.
More information about the pacman-dev
mailing list