cross-armv7l-linux-gnueabihf: clean up libdir handling
This commit is contained in:
parent
b3e4014adc
commit
e6fea56007
1 changed files with 14 additions and 3 deletions
|
@ -195,6 +195,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
|
||||
|
||||
|
@ -203,6 +205,7 @@ _glibc_build() {
|
|||
export CFLAGS="-Os -pipe ${_archflags}"
|
||||
|
||||
_args="--prefix=/usr"
|
||||
_args+=" --libdir=/usr/lib32"
|
||||
_args+=" --host=${_triplet}"
|
||||
_args+=" --with-headers=${_sysroot}/usr/include"
|
||||
_args+=" --config-cache"
|
||||
|
@ -238,7 +241,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
|
||||
-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
|
||||
|
||||
|
@ -283,7 +288,7 @@ _gcc_build() {
|
|||
}
|
||||
|
||||
do_build() {
|
||||
for f in include lib bin; do
|
||||
for f in include lib libexec bin sbin; do
|
||||
if [ ! -d ${_sysroot}/usr/${f} ]; then
|
||||
mkdir -p ${_sysroot}/usr/${f}
|
||||
fi
|
||||
|
@ -291,6 +296,9 @@ do_build() {
|
|||
ln -sfr ${_sysroot}/usr/${f} ${_sysroot}/${f}
|
||||
fi
|
||||
done
|
||||
ln -sf lib ${_sysroot}/usr/lib32
|
||||
ln -sf usr/lib ${_sysroot}/lib32
|
||||
|
||||
# Ensure we use sane environment
|
||||
unset CC CXX CPP LD AS AR RANLIB OBJDUMP READELF NM
|
||||
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
|
||||
|
@ -305,7 +313,7 @@ do_build() {
|
|||
}
|
||||
|
||||
do_install() {
|
||||
for f in include lib bin; do
|
||||
for f in include lib libexec bin sbin; do
|
||||
if [ ! -d ${DESTDIR}/${_sysroot}/usr/${f} ]; then
|
||||
mkdir -p ${DESTDIR}/${_sysroot}/usr/${f}
|
||||
fi
|
||||
|
@ -314,6 +322,9 @@ do_install() {
|
|||
${DESTDIR}/${_sysroot}/${f}
|
||||
fi
|
||||
done
|
||||
ln -sf lib ${DESTDIR}/${_sysroot}/usr/lib32
|
||||
ln -sf usr/lib ${DESTDIR}/${_sysroot}/lib32
|
||||
|
||||
# install cross binutils
|
||||
cd ${wrksrc}/binutils-build
|
||||
make DESTDIR=${DESTDIR} install
|
||||
|
|
Loading…
Reference in a new issue