diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2019-06-05 18:29:55 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-06-05 18:32:53 +0000 |
commit | d4a7955cc72b9395779c20755df88f983763c43b (patch) | |
tree | 4feca4cdc6a1196b0f66b8bc4e9aaa30ef691d29 /main/musl | |
parent | 1aeea0352fb5c89587af061a5c4248d8cfff285e (diff) | |
download | aports-d4a7955cc72b9395779c20755df88f983763c43b.tar.bz2 aports-d4a7955cc72b9395779c20755df88f983763c43b.tar.xz |
main/musl: fix ldd when used with libraries
From Bernhard Ehlers:
> BTW: The ldd program (in all alpine versions) creates invalid output
> in case you use it on a library, here an example:
>
> ~ # ldd /lib/libssl.so.1.1
> ldd (0x7ffb49916000)
> libcrypto.so.1.1 => /lib/libcrypto.so.1.1 (0x7ffb49618000)
> libc.musl-x86_64.so.1 => ldd (0x7ffb49916000)
>
> The loader ld-musl-x86_64.so.1 and libc.musl-x86_64.so.1 point to
> "ldd", what's totally wrong. That's why you have to copy the ldd
> binary to your current directory before using cx_freeze.
>
> Here my alternative ldd, it works much better with cx_freeze (and
> pyinstaller):
> #!!/bin/sh
> exec /lib/ld-musl-* --list -- "$@"
>
> Here an example, with more reasonable results:
> ~ # ldd.new /lib/libssl.so.1.1
> /lib/ld-musl-x86_64.so.1 (0x7fa671495000)
> libcrypto.so.1.1 => /lib/libcrypto.so.1.1 (0x7fa671197000)
> libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1
> (0x7fa671495000)
http://lists.alpinelinux.org/alpine-devel/6694.html
Diffstat (limited to 'main/musl')
-rw-r--r-- | main/musl/APKBUILD | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD index 85cca6e498..46aeb01835 100644 --- a/main/musl/APKBUILD +++ b/main/musl/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Timo Teräs <timo.teras@iki.fi> pkgname=musl pkgver=1.1.22 -pkgrel=0 +pkgrel=1 pkgdesc="the musl c library (libc) implementation" url="http://www.musl-libc.org/" arch="all" @@ -62,19 +62,19 @@ build() { package() { cd "$builddir" - if [ "$BOOTSTRAP" = "nocc" ]; then - case "$CARCH" in - aarch64*) ARCH="aarch64" ;; - arm*) ARCH="arm" ;; - x86) ARCH="i386" ;; - x86_64) ARCH="x86_64" ;; - ppc) ARCH="powerpc" ;; - ppc64*) ARCH="powerpc64" ;; - s390*) ARCH="s390x" ;; - mips64*) ARCH="mips64" ;; - mips*) ARCH="mips" ;; - esac + case "$CARCH" in + aarch64*) ARCH="aarch64" ;; + arm*) ARCH="arm" ;; + x86) ARCH="i386" ;; + x86_64) ARCH="x86_64" ;; + ppc) ARCH="powerpc" ;; + ppc64*) ARCH="powerpc64" ;; + s390*) ARCH="s390x" ;; + mips64*) ARCH="mips64" ;; + mips*) ARCH="mips" ;; + esac + if [ "$BOOTSTRAP" = "nocc" ]; then make ARCH="$ARCH" prefix=/usr DESTDIR="$pkgdir" install-headers else make DESTDIR="$pkgdir" install @@ -87,7 +87,12 @@ package() { ln -sf "$LDSO" "$pkgdir"/lib/libc.musl-${CARCH}.so.1 ln -sf ../../lib/"$LDSO" "$pkgdir"/usr/lib/libc.so mkdir -p "$pkgdir"/usr/bin - ln -sf ../../lib/"$LDSO" "$pkgdir"/usr/bin/ldd + + cat >>"$pkgdir"/usr/bin/ldd <<-EOF + #!/bin/sh + exec /lib/ld-musl-$ARCH.so.1 --list -- "\$@" + EOF + chmod 755 "$pkgdir"/usr/bin/ldd fi # remove libintl.h, currently we don't want by default any NLS |