cross-arm-linux-musl: install linux API headers before musl to DESTDIR.

... otherwise some musl provided headers (scsi/sg.h) might be removed
by this without any apparent reason.

And disable libssp as was done to other cross-*-musl toolchains.
This commit is contained in:
Juan RP 2014-02-10 15:58:47 +01:00
parent f75780a5f1
commit e8f29158f4

View file

@ -11,7 +11,7 @@ _archflags="-march=armv6 -mfpu=vfp -mfloat-abi=hard"
_sysroot="/usr/${_triplet}"
pkgname=cross-${_triplet}
version=0.4
version=0.5
revision=1
short_desc="Cross toolchain for the ${_triplet} LE Hard Float target"
maintainer="Juan RP <xtraeme@gmail.org>"
@ -131,7 +131,7 @@ _gcc_build() {
--disable-multilib --disable-nls --disable-libquadmath \
--disable-libmudflap --enable-c99 --enable-shared \
--enable-long-long --enable-threads=posix \
--disable-libstdcxx-pch ${_fpuflags}
--disable-libssp --disable-libstdcxx-pch ${_fpuflags}
make ${makejobs}
@ -171,6 +171,12 @@ do_install() {
fi
done
# install linux API headers
cd ${wrksrc}/linux-${_linux_version}
make ARCH=arm INSTALL_HDR_PATH=${DESTDIR}/${_sysroot}/usr headers_install
rm -f $(find ${DESTDIR}/${_sysroot}/usr/include -name .install -or -name ..install.cmd)
rm -rf ${DESTDIR}/${_sysroot}/usr/include/drm
# install cross binutils
cd ${wrksrc}/binutils-build
make DESTDIR=${DESTDIR} install
@ -191,12 +197,6 @@ do_install() {
cd ${DESTDIR}/${_sysroot}/usr/lib
ln -sf libc.so ld-musl-arm.so.1
# install linux API headers
cd ${wrksrc}/linux-${_linux_version}
make ARCH=arm INSTALL_HDR_PATH=${DESTDIR}/${_sysroot}/usr headers_install
rm -f $(find ${DESTDIR}/${_sysroot}/usr/include -name .install -or -name ..install.cmd)
rm -rf ${DESTDIR}/${_sysroot}/usr/include/drm
# Remove unnecessary stuff
rm -f ${DESTDIR}/usr/lib*/libiberty.a
rm -rf ${DESTDIR}/usr/share