diff --git a/base/musl/musl.conf b/base/musl/musl.conf index 70cfb62e8..78fe9bd0a 100644 --- a/base/musl/musl.conf +++ b/base/musl/musl.conf @@ -16,8 +16,7 @@ musl_arch="$( echo $arch | arch2uname )" if [ $prefix_auto == 1 ]; then - slibdir="/lib" - libdir="$slibdir" + syslibdir="/lib" fi if atstage toolchain; then @@ -30,14 +29,20 @@ if atstage toolchain; then fi musl_postinstall() { + 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 + # 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 + ln -vsf $( relative_path $root$syslibdir/$LIBCSO $root$libdir/libc.so ) \ + $root$libdir/libc.so - # create a symlink from ld-musl-$musl_arch.so to ldd # if the dynlinker + # 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 ) \ + ln -vsf $( relative_path $root$syslibdir/$LDSO $root$bindir/ldd ) \ $root$bindir/ldd }