[Rpm-maint] [rpm-software-management/rpm] elfdeps: Introduce --add-arch (#1660)

susematz notifications at github.com
Tue Apr 27 14:40:18 UTC 2021


this adds a facility that helps with cross compilation and automatic
ELF dependencies by extending the existing mechanism to specially mark
generated ELF deps with "(lib64)" suffixes to alternatively or
additionally include an architecture name.  This is enabled with
the --add-arch option.

Additionally it's possible to disable generation of unsuffixed deps
with --no-nonarch, so that the old names can gradually be phased out
(by leaving them in the generated Provides, but remove them from
the Requires).  Some examples with random libs I happen to have lying
around:

% ./elfdeps --requires --add-arch --no-nonarch /matz/debian/root.riscv64/lib/riscv64-linux-gnu/libreadline.so.7
ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(riscv64)
libtinfo.so.6(NCURSES6_TINFO_5.0.19991023)(riscv64)
libc.so.6(GLIBC_2.27)(riscv64)
libtinfo.so.6()(riscv64)
libc.so.6()(riscv64)
ld-linux-riscv64-lp64d.so.1()(riscv64)
rtld(GNU_HASH)

Note how the "(lib64)" markers are not generated here (--no-nonarch), but ...

% ./elfdeps --provides --add-arch /matz/debian/root.riscv64/lib/riscv64-linux-gnu/libreadline.so.7
libreadline.so.7()(64bit)
libreadline.so.7()(riscv64)

... are generated here.  Further (mixing several arch libs):

% ./elfdeps --requires --add-arch --no-nonarch /matz/debian/root.arm64/lib/libxtables.so.10 /lib64/libutil.so.1 /lib/libreadline.so.8
ld-linux-aarch64.so.1(GLIBC_2.17)(aarch64)
libdl.so.2(GLIBC_2.17)(aarch64)
libc.so.6(GLIBC_2.17)(aarch64)
libdl.so.2()(aarch64)
libc.so.6()(aarch64)
ld-linux-aarch64.so.1()(aarch64)
rtld(GNU_HASH)
libc.so.6(GLIBC_2.4)(x86_64)
libc.so.6(GLIBC_PRIVATE)(x86_64)
libc.so.6(GLIBC_2.2.5)(x86_64)
libc.so.6()(x86_64)
libtinfo.so.6(NCURSES6_TINFO_5.0.19991023)(i386)
libc.so.6(GLIBC_2.28)(i386)
libc.so.6(GLIBC_2.11)(i386)
libc.so.6(GLIBC_2.2)(i386)
libc.so.6(GLIBC_2.1.3)(i386)
libc.so.6(GLIBC_2.2.3)(i386)
libc.so.6(GLIBC_2.15)(i386)
libc.so.6(GLIBC_2.4)(i386)
libc.so.6(GLIBC_2.1)(i386)
libc.so.6(GLIBC_2.3.4)(i386)
libc.so.6(GLIBC_2.0)(i386)
libc.so.6(GLIBC_2.3)(i386)
libtinfo.so.6()(i386)
libc.so.6()(i386)
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/1660

-- Commit Summary --

  * elfdeps: Introduce --add-arch

-- File Changes --

    M tools/elfdeps.c (101)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/1660.patch
https://github.com/rpm-software-management/rpm/pull/1660.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1660
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210427/47e1f5e3/attachment.html>


More information about the Rpm-maint mailing list