cross-powerpcle-linux-gnu: clean up libdir handling
This commit is contained in:
parent
b445133b57
commit
1bfad41a25
1 changed files with 11 additions and 8 deletions
|
@ -190,6 +190,8 @@ _glibc_build() {
|
|||
[ ! -d glibc-build ] && mkdir glibc-build
|
||||
cd glibc-build
|
||||
|
||||
echo "slibdir=/usr/lib32" > configparms
|
||||
|
||||
echo "libc_cv_forced_unwind=yes" > config.cache
|
||||
echo "libc_cv_c_cleanup=yes" >> config.cache
|
||||
|
||||
|
@ -199,6 +201,7 @@ _glibc_build() {
|
|||
export CFLAGS="-O2 -pipe"
|
||||
|
||||
_args="--prefix=/usr"
|
||||
_args+=" --libdir=/usr/lib32"
|
||||
_args+=" --host=${_triplet}"
|
||||
_args+=" --with-headers=${_sysroot}/usr/include"
|
||||
_args+=" --config-cache"
|
||||
|
@ -233,9 +236,9 @@ _gcc_build() {
|
|||
# Make this link to target libs.
|
||||
if [ ! -f .sed_subst_done ]; then
|
||||
sed -e "s, /lib/, ${_sysroot}/lib/,g;s, /usr/lib/, ${_sysroot}/usr/lib/,g" \
|
||||
-i ${_sysroot}/lib/libc.so ${_sysroot}/lib/libpthread.so
|
||||
sed -e "s, /lib64/, ${_sysroot}/lib64/,g;s, /usr/lib/, ${_sysroot}/usr/lib/,g" \
|
||||
-i ${_sysroot}/lib/libc.so ${_sysroot}/lib/libpthread.so
|
||||
-i ${_sysroot}/lib/libc.so
|
||||
sed -e "s, /lib32/, ${_sysroot}/lib32/,g;s, /usr/lib32/, ${_sysroot}/usr/lib32/,g" \
|
||||
-i ${_sysroot}/lib/libc.so
|
||||
touch .sed_subst_done
|
||||
fi
|
||||
|
||||
|
@ -289,6 +292,8 @@ do_build() {
|
|||
ln -sfr ${_sysroot}/usr/${f} ${_sysroot}/${f}
|
||||
fi
|
||||
done
|
||||
ln -sf lib ${_sysroot}/usr/lib32
|
||||
ln -sf usr/lib ${_sysroot}/lib32
|
||||
|
||||
_binutils_build
|
||||
_gcc_bootstrap
|
||||
|
@ -299,7 +304,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
|
||||
|
@ -308,10 +313,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
|
||||
ln -sf lib ${DESTDIR}/${_sysroot}/usr/lib32
|
||||
ln -sf usr/lib ${DESTDIR}/${_sysroot}/lib32
|
||||
|
||||
# install cross binutils
|
||||
cd ${wrksrc}/binutils-build
|
||||
|
|
Loading…
Reference in a new issue