diff --git a/base/musl/musl.conf b/base/musl/musl.conf index 03da979e6..70cfb62e8 100644 --- a/base/musl/musl.conf +++ b/base/musl/musl.conf @@ -29,20 +29,25 @@ if atstage toolchain; then makeinstopt="ARCH=$musl_arch" fi +musl_postinstall() { + # create a libc.so symlink to avoid libtool's attempt linking shared + # libs against libc.a in certain cases + ln -vsf $( relative_path $root$slibdir/libc.so $root/$prefix$libdir/libc.so ) \ + $root/$prefix$libdir/libc.so + + # create a symlink from ld-musl-$musl_arch.so to ldd # if the dynlinker + # was started as "ldd" it will print DSO information + ln -vsf $( relative_path $root$slibdir/ld-musl-$musl_arch.so.1 $root$bindir/ldd ) \ + $root$bindir/ldd +} + # if musl is default libc if [ "$SDECFG_LIBC" == "musl" ]; then # disable gcc wrapper script var_append extraconfopt ' ' "--disable-gcc-wrapper" if ! atstage toolchain; then - # create a libc.so symlink to avoid libtool's attempt linking - # shared libs against libc.a in certain cases - hook_add postinstall 5 'ln -vsf $( relative_path $root$slibdir/libc.so $root/$prefix$libdir/libc.so ) $root/$prefix$libdir/libc.so' - - # create a symlink from ld-musl-$musl_arch.so to ldd - # if the dynlinker was started as "ldd" it will print - # DSO information - hook_add postinstall 5 'ln -vsf $( relative_path $root$slibdir/ld-musl-$musl_arch.so.1 $root$bindir/ldd ) $root$bindir/ldd' + hook_add postinstall 5 'musl_postinstall' fi fi