mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-08 16:13:50 +02:00
cross-arm-linux-gnueabihf: clean up libdir handling
This commit is contained in:
parent
771851b89a
commit
b3e4014adc
1 changed files with 14 additions and 3 deletions
|
@ -195,6 +195,8 @@ _glibc_build() {
|
||||||
[ ! -d glibc-build ] && mkdir glibc-build
|
[ ! -d glibc-build ] && mkdir glibc-build
|
||||||
cd glibc-build
|
cd glibc-build
|
||||||
|
|
||||||
|
echo "slibdir=/usr/lib32" > configparms
|
||||||
|
|
||||||
echo "libc_cv_forced_unwind=yes" > config.cache
|
echo "libc_cv_forced_unwind=yes" > config.cache
|
||||||
echo "libc_cv_c_cleanup=yes" >> config.cache
|
echo "libc_cv_c_cleanup=yes" >> config.cache
|
||||||
|
|
||||||
|
@ -203,6 +205,7 @@ _glibc_build() {
|
||||||
export CFLAGS="-Os -pipe ${_archflags}"
|
export CFLAGS="-Os -pipe ${_archflags}"
|
||||||
|
|
||||||
_args="--prefix=/usr"
|
_args="--prefix=/usr"
|
||||||
|
_args+=" --libdir=/usr/lib32"
|
||||||
_args+=" --host=${_triplet}"
|
_args+=" --host=${_triplet}"
|
||||||
_args+=" --with-headers=${_sysroot}/usr/include"
|
_args+=" --with-headers=${_sysroot}/usr/include"
|
||||||
_args+=" --config-cache"
|
_args+=" --config-cache"
|
||||||
|
@ -238,7 +241,9 @@ _gcc_build() {
|
||||||
# Make this link to target libs.
|
# Make this link to target libs.
|
||||||
if [ ! -f .sed_subst_done ]; then
|
if [ ! -f .sed_subst_done ]; then
|
||||||
sed -e "s, /lib/, ${_sysroot}/lib/,g;s, /usr/lib/, ${_sysroot}/usr/lib/,g" \
|
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
|
touch .sed_subst_done
|
||||||
fi
|
fi
|
||||||
_args="--prefix=/usr"
|
_args="--prefix=/usr"
|
||||||
|
@ -282,7 +287,7 @@ _gcc_build() {
|
||||||
}
|
}
|
||||||
|
|
||||||
do_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
|
if [ ! -d ${_sysroot}/usr/${f} ]; then
|
||||||
mkdir -p ${_sysroot}/usr/${f}
|
mkdir -p ${_sysroot}/usr/${f}
|
||||||
fi
|
fi
|
||||||
|
@ -290,6 +295,9 @@ do_build() {
|
||||||
ln -sfr ${_sysroot}/usr/${f} ${_sysroot}/${f}
|
ln -sfr ${_sysroot}/usr/${f} ${_sysroot}/${f}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
ln -sf lib ${_sysroot}/usr/lib32
|
||||||
|
ln -sf usr/lib ${_sysroot}/lib32
|
||||||
|
|
||||||
# Ensure we use sane environment
|
# Ensure we use sane environment
|
||||||
unset CC CXX CPP LD AS AR RANLIB OBJDUMP READELF NM
|
unset CC CXX CPP LD AS AR RANLIB OBJDUMP READELF NM
|
||||||
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
|
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
|
||||||
|
@ -304,7 +312,7 @@ do_build() {
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
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
|
if [ ! -d ${DESTDIR}/${_sysroot}/usr/${f} ]; then
|
||||||
mkdir -p ${DESTDIR}/${_sysroot}/usr/${f}
|
mkdir -p ${DESTDIR}/${_sysroot}/usr/${f}
|
||||||
fi
|
fi
|
||||||
|
@ -313,6 +321,9 @@ do_install() {
|
||||||
${DESTDIR}/${_sysroot}/${f}
|
${DESTDIR}/${_sysroot}/${f}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
ln -sf lib ${DESTDIR}/${_sysroot}/usr/lib32
|
||||||
|
ln -sf usr/lib ${DESTDIR}/${_sysroot}/lib32
|
||||||
|
|
||||||
# install cross binutils
|
# install cross binutils
|
||||||
cd ${wrksrc}/binutils-build
|
cd ${wrksrc}/binutils-build
|
||||||
make DESTDIR=${DESTDIR} install
|
make DESTDIR=${DESTDIR} install
|
||||||
|
|
Loading…
Add table
Reference in a new issue