cross-aarch64-linux-gnu: clean up libdir handling

This commit is contained in:
q66 2020-12-23 23:15:55 +01:00
parent c1ff68e8a8
commit fd08f5044a

View file

@ -193,6 +193,8 @@ _glibc_build() {
[ ! -d glibc-build ] && mkdir glibc-build
cd glibc-build
echo "slibdir=/usr/lib64" > configparms
echo "libc_cv_forced_unwind=yes" > config.cache
echo "libc_cv_c_cleanup=yes" >> config.cache
@ -202,7 +204,7 @@ _glibc_build() {
export CFLAGS="-O1 -pipe ${_archflags}"
_args="--prefix=/usr"
_args+=" --libdir=/usr/lib"
_args+=" --libdir=/usr/lib64"
_args+=" --host=${_triplet}"
_args+=" --with-headers=${_sysroot}/usr/include"
_args+=" --config-cache"
@ -292,6 +294,8 @@ do_build() {
ln -sfr ${_sysroot}/usr/${f} ${_sysroot}/${f}
fi
done
ln -sf lib ${_sysroot}/usr/lib64
ln -sf usr/lib ${_sysroot}/lib64
_binutils_build
_gcc_bootstrap
@ -302,7 +306,7 @@ do_build() {
}
do_install() {
for f in include libexec bin sbin; do
for f in include lib libexec bin sbin; do
if [ ! -d ${DESTDIR}/${_sysroot}/usr/${f} ]; then
mkdir -p ${DESTDIR}/${_sysroot}/usr/${f}
fi
@ -311,10 +315,8 @@ do_install() {
${DESTDIR}/${_sysroot}/${f}
fi
done
mkdir -p ${DESTDIR}/${_sysroot}/usr/lib
ln -sf lib ${DESTDIR}/${_sysroot}/usr/lib64
ln -sf usr/lib ${DESTDIR}/${_sysroot}/lib64
ln -sf usr/lib ${DESTDIR}/${_sysroot}/lib
# install cross binutils
cd ${wrksrc}/binutils-build