diff --git a/base/musl/musl.conf b/base/musl/musl.conf index b8aa488d2..2e4d066f6 100644 --- a/base/musl/musl.conf +++ b/base/musl/musl.conf @@ -18,7 +18,7 @@ musl_arch="$( echo $arch | arch2uname )" if [ $prefix_auto == 1 ]; then syslibdir="/lib" fi -var_append configprefix ' ' "LDFLAGS=\"$LDFLAGS -Wl,-soname,libc.musl-$arch.so.1\"" +var_append configprefix ' ' "LDFLAGS=\"$LDFLAGS -Wl,-soname,libc-musl-$musl_arch.so.1\"" if atstage toolchain; then @@ -30,15 +30,17 @@ if atstage toolchain; then fi musl_postinstall() { + # LDSO is the be the real file, and libc the symlink. + local LDSO=ld-musl-$musl_arch.so.1 local LIBCSO=libc-musl-$musl_arch.so.1 - mv $root$libdir/libc.so $root$syslibdir/$LIBCSO - ln -vsf $LIBCSO $root$syslibdir/$LDSO + mv $root$libdir/libc.so $root$syslibdir/$LDSO + ln -vsf $LDSO $root$syslibdir/$LIBCSO # create a libc.so symlink to avoid libtool's attempt linking shared # libs against libc.a in certain cases - ln -vsf $( relative_path $root$syslibdir/$LIBCSO $root$libdir/libc.so ) \ + ln -vsf $( relative_path $root$syslibdir/$LDSO $root$libdir/libc.so ) \ $root$libdir/libc.so # create a symlink from ld-musl-$musl_arch.so to ldd if the dynlinker @@ -48,7 +50,8 @@ musl_postinstall() { # make some compat links for various libraries for i in libc.so.6 libcrypt.so.1 libm.so.6 libpthread.so.0 librt.so.1 libutil.so.1; do - ln -sf $root$syslibdir/$LIBCSO $root$syslibdir/$i + ln -vsf $( relative_path $root$syslibdir/$LIBCSO $root$syslibdir/$i ) \ + $root$syslibdir/$i done }