cross-powerpc-linux-gnu: clean up libdir handling
This commit is contained in:
parent
364cd89e95
commit
bc3dee1578
1 changed files with 12 additions and 10 deletions
|
@ -5,7 +5,6 @@ _glibc_version=2.30
|
|||
_linux_version=4.19
|
||||
|
||||
_triplet=powerpc-linux-gnu
|
||||
_archflags="-mcpu=powerpc -msecure-plt"
|
||||
_sysroot="/usr/${_triplet}"
|
||||
|
||||
pkgname=cross-${_triplet}
|
||||
|
@ -190,15 +189,18 @@ _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
|
||||
|
||||
export CC="${_triplet}-gcc" CXX="${_triplet}-g++" LD="${_triplet}-ld" \
|
||||
AS="${_triplet}-as" CPP="${_triplet}-cpp" \
|
||||
NM="${_triplet}-nm"
|
||||
export CFLAGS="-O1 -pipe ${_archflags}"
|
||||
export CFLAGS="-O1 -pipe"
|
||||
|
||||
_args="--prefix=/usr"
|
||||
_args+=" --libdir=/usr/lib32"
|
||||
_args+=" --host=${_triplet}"
|
||||
_args+=" --with-headers=${_sysroot}/usr/include"
|
||||
_args+=" --config-cache"
|
||||
|
@ -233,9 +235,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 +291,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 +303,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 +312,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