cross-arm-linux-gnueabihf: use host gmp/mpfr/mpc libs; update binutils to 2.24.

This commit is contained in:
Juan RP 2014-01-07 11:02:16 +01:00
parent a3b6293949
commit 169c0306ef
2 changed files with 75 additions and 42 deletions

View File

@ -0,0 +1,45 @@
From dc76f0c32dae689a08aa21a1d206d4cd62adb278 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Thu, 10 Oct 2013 14:26:12 +0900
Subject: [PATCH] configure: allow building with GNU Make 4
Currently, configure errors telling make 4 is too old
since it does not match our regexp.
configure.in: allow GNU Make 4.*
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
configure | 2 +-
configure.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 5e2f4d0..e139bf0 100755
--- configure
+++ configure
@@ -4761,7 +4761,7 @@ $as_echo_n "checking version of $MAKE... " >&6; }
ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 3.79* | 3.[89]*)
+ 3.79* | 3.[89]* | 4.*)
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
diff --git a/configure.in b/configure.in
index a7f9881..95c36b6 100644
--- configure.in
+++ configure.in
@@ -984,7 +984,7 @@ AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v,
critic_missing="$critic_missing gcc")
AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
[GNU Make[^0-9]*\([0-9][0-9.]*\)],
- [3.79* | 3.[89]*], critic_missing="$critic_missing make")
+ [3.79* | 3.[89]* | 4.*], critic_missing="$critic_missing make")
AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version,
[GNU gettext.* \([0-9]*\.[0-9.]*\)],
--
1.8.4.1

View File

@ -11,6 +11,7 @@ _linux_version=3.10.6
_triplet=arm-linux-gnueabihf _triplet=arm-linux-gnueabihf
_fpuflags="--with-arch=armv6 --with-fpu=vfp --with-float=hard" _fpuflags="--with-arch=armv6 --with-fpu=vfp --with-float=hard"
_archflags="-march=armv6 -mfpu=vfp -mfloat-abi=hard" _archflags="-march=armv6 -mfpu=vfp -mfloat-abi=hard"
_CROSS_SYSROOT="/usr/${_triplet}"
pkgname=cross-${_triplet} pkgname=cross-${_triplet}
version=0.14 version=0.14
@ -23,27 +24,20 @@ distfiles="
http://ftp.gnu.org/pub/gnu/binutils/binutils-${_binutils_version}.tar.bz2 http://ftp.gnu.org/pub/gnu/binutils/binutils-${_binutils_version}.tar.bz2
http://ftp.gnu.org/pub/gnu/gcc/gcc-${_gcc_version}/gcc-${_gcc_version}.tar.bz2 http://ftp.gnu.org/pub/gnu/gcc/gcc-${_gcc_version}/gcc-${_gcc_version}.tar.bz2
http://ftp.gnu.org/gnu/glibc/glibc-${_glibc_version}.tar.xz http://ftp.gnu.org/gnu/glibc/glibc-${_glibc_version}.tar.xz
http://mirrors.kernel.org/gnu/gmp/gmp-${_gmp_version}.tar.bz2
http://www.mpfr.org/mpfr-current/mpfr-${_mpfr_version}.tar.bz2
http://www.multiprecision.org/mpc/download/mpc-${_mpc_version}.tar.gz
http://www.kernel.org/pub/linux/kernel/v3.x/linux-${_linux_version}.tar.xz" http://www.kernel.org/pub/linux/kernel/v3.x/linux-${_linux_version}.tar.xz"
checksum=" checksum="
e5e8c5be9664e7f7f96e0d09919110ab5ad597794f5b1809871177a0f0f14137 e5e8c5be9664e7f7f96e0d09919110ab5ad597794f5b1809871177a0f0f14137
2f7c37eb4fc14422ff2358a9ef59c974a75ab41204ef0e49fc34ab1d8981a9c3 2f7c37eb4fc14422ff2358a9ef59c974a75ab41204ef0e49fc34ab1d8981a9c3
2cb4e1e381928f1e5e55e71ab1ba8e0ea7ede75ff9709770435bfd018ea257a3 2cb4e1e381928f1e5e55e71ab1ba8e0ea7ede75ff9709770435bfd018ea257a3
1f588aaccc41bb9aed946f9fe38521c26d8b290d003c5df807f65690f2aadec9
79c73f60af010a30a5c27a955a1d2d01ba095b72537dab0ecaad57f5a7bb1b6b
fd3efe422f0d454592059e80f2c00d1a2e381bf2beda424c5094abd4deb049ac
ed4dfd9f56b7c82e9c71331bbf8d2ea01ddfddc1b6209bd3f3c8640aa24065cf" ed4dfd9f56b7c82e9c71331bbf8d2ea01ddfddc1b6209bd3f3c8640aa24065cf"
create_wrksrc=yes create_wrksrc=yes
makedepends="perl flex" hostmakedepends="perl flex"
makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel"
depends="${pkgname}-libc-${version}_${revision}" depends="${pkgname}-libc-${version}_${revision}"
nostrip_files="libgcc.a libgcov.a libgcc_eh.a" nostrip_files="libgcc.a libgcov.a libgcc_eh.a"
only_for_archs="i686 x86_64" only_for_archs="i686 x86_64"
_CROSS_TARGET=${_triplet}
_CROSS_SYSROOT="/usr/${_CROSS_TARGET}"
_apply_patch() { _apply_patch() {
local pname="$(basename $1)" local pname="$(basename $1)"
@ -77,7 +71,7 @@ _binutils_build() {
cd binutils-build cd binutils-build
../binutils-${_binutils_version}/configure \ ../binutils-${_binutils_version}/configure \
--prefix=/usr --target=${_CROSS_TARGET} \ --prefix=/usr --target=${_triplet} \
--with-sysroot=${_CROSS_SYSROOT} --disable-nls --disable-shared \ --with-sysroot=${_CROSS_SYSROOT} --disable-nls --disable-shared \
--disable-multilib --disable-werror --disable-multilib --disable-werror
@ -98,18 +92,8 @@ _gcc_bootstrap() {
[ ! -d ../gcc-bootstrap ] && mkdir ../gcc-bootstrap [ ! -d ../gcc-bootstrap ] && mkdir ../gcc-bootstrap
cd ../gcc-bootstrap cd ../gcc-bootstrap
if [ ! -d ${wrksrc}/gcc-${_gcc_version}/gmp ]; then
mv ${wrksrc}/gmp-${_gmp_version} ${wrksrc}/gcc-${_gcc_version}/gmp
fi
if [ ! -d ${wrksrc}/gcc-${_gcc_version}/mpfr ]; then
mv ${wrksrc}/mpfr-${_mpfr_version} ${wrksrc}/gcc-${_gcc_version}/mpfr
fi
if [ ! -d ${wrksrc}/gcc-${_gcc_version}/mpc ]; then
mv ${wrksrc}/mpc-${_mpc_version} ${wrksrc}/gcc-${_gcc_version}/mpc
fi
../gcc-${_gcc_version}/configure --prefix=/usr \ ../gcc-${_gcc_version}/configure --prefix=/usr \
--target=${_CROSS_TARGET} --without-headers \ --target=${_triplet} --without-headers \
--disable-nls --disable-shared --disable-libquadmath \ --disable-nls --disable-shared --disable-libquadmath \
--disable-decimal-float --disable-libgomp --disable-libmudflap \ --disable-decimal-float --disable-libgomp --disable-libmudflap \
--disable-libssp --disable-threads --enable-languages=c \ --disable-libssp --disable-threads --enable-languages=c \
@ -125,6 +109,9 @@ _gcc_bootstrap() {
_glibc_headers() { _glibc_headers() {
[ -f ${wrksrc}/.glibc_headers_done ] && return 0 [ -f ${wrksrc}/.glibc_headers_done ] && return 0
cd ${wrksrc}/glibc-${_glibc_version}
_apply_patch ${FILESDIR}/glibc-2.18-make-4.patch
cd ${wrksrc} cd ${wrksrc}
msg_normal "Building cross glibc headers\n" msg_normal "Building cross glibc headers\n"
@ -134,11 +121,11 @@ _glibc_headers() {
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
export CC="${_CROSS_TARGET}-gcc" LD="${_CROSS_TARGET}-ld" \ export CC="${_triplet}-gcc" LD="${_triplet}-ld" \
AS="${_CROSS_TARGET}-as" CPP="${_CROSS_TARGET}-cpp" AS="${_triplet}-as" CPP="${_triplet}-cpp"
../glibc-${_glibc_version}/configure \ ../glibc-${_glibc_version}/configure \
--host=${_CROSS_TARGET} --prefix=/usr \ --host=${_triplet} --prefix=/usr \
--with-headers=${_CROSS_SYSROOT}/usr/include \ --with-headers=${_CROSS_SYSROOT}/usr/include \
--config-cache --enable-add-ons=nptl,ports \ --config-cache --enable-add-ons=nptl,ports \
--enable-obsolete-rpc \ --enable-obsolete-rpc \
@ -162,12 +149,12 @@ _glibc_build() {
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
export CC="${_CROSS_TARGET}-gcc" LD="${_CROSS_TARGET}-ld" \ export CC="${_triplet}-gcc" LD="${_triplet}-ld" \
AS="${_CROSS_TARGET}-as" CPP="${_CROSS_TARGET}-cpp" AS="${_triplet}-as" CPP="${_triplet}-cpp"
export CFLAGS="-Os -pipe ${_archflags}" export CFLAGS="-Os -pipe ${_archflags}"
../glibc-${_glibc_version}/configure \ ../glibc-${_glibc_version}/configure \
--host=${_CROSS_TARGET} --prefix=/usr \ --host=${_triplet} --prefix=/usr \
--with-headers=${_CROSS_SYSROOT}/usr/include \ --with-headers=${_CROSS_SYSROOT}/usr/include \
--config-cache --enable-add-ons=nptl,ports \ --config-cache --enable-add-ons=nptl,ports \
--enable-obsolete-rpc --disable-profile \ --enable-obsolete-rpc --disable-profile \
@ -199,7 +186,7 @@ _gcc_build() {
fi fi
../gcc-${_gcc_version}/configure \ ../gcc-${_gcc_version}/configure \
--target=${_CROSS_TARGET} --prefix=/usr \ --target=${_triplet} --prefix=/usr \
--with-sysroot=${_CROSS_SYSROOT} --enable-languages=c,c++,lto \ --with-sysroot=${_CROSS_SYSROOT} --enable-languages=c,c++,lto \
--with-gnu-as --with-gnu-ld --disable-multilib \ --with-gnu-as --with-gnu-ld --disable-multilib \
--disable-nls --disable-sjlj-exceptions \ --disable-nls --disable-sjlj-exceptions \
@ -245,21 +232,22 @@ do_install() {
done done
# install cross binutils # install cross binutils
cd ${wrksrc}/binutils-build && make DESTDIR=${DESTDIR} install cd ${wrksrc}/binutils-build
make DESTDIR=${DESTDIR} install
# install cross gcc # install cross gcc
cd ${wrksrc}/gcc-build && make DESTDIR=${DESTDIR} install cd ${wrksrc}/gcc-build
make DESTDIR=${DESTDIR} install
# install linux API headers for MIPS # install linux API headers for MIPS
cd ${wrksrc}/linux-${_linux_version} && \ cd ${wrksrc}/linux-${_linux_version}
make ARCH=arm INSTALL_HDR_PATH=${DESTDIR}/${_CROSS_SYSROOT}/usr \ make ARCH=arm INSTALL_HDR_PATH=${DESTDIR}/${_CROSS_SYSROOT}/usr headers_install
headers_install
rm -f $(find ${DESTDIR}/${_CROSS_SYSROOT}/usr/include -name .install -or -name ..install.cmd) rm -f $(find ${DESTDIR}/${_CROSS_SYSROOT}/usr/include -name .install -or -name ..install.cmd)
rm -rf ${DESTDIR}/${_CROSS_SYSROOT}/usr/include/drm rm -rf ${DESTDIR}/${_CROSS_SYSROOT}/usr/include/drm
# install glibc for target # install glibc for target
cd ${wrksrc}/glibc-build && \ cd ${wrksrc}/glibc-build
make install_root=${DESTDIR}/${_CROSS_SYSROOT} install install-headers make install_root=${DESTDIR}/${_CROSS_SYSROOT} install install-headers
# XXX hard-float only toolchain. # XXX hard-float only toolchain.
ln -sfr ${DESTDIR}/${_CROSS_SYSROOT}/usr/include/gnu/stubs-hard.h \ ln -sfr ${DESTDIR}/${_CROSS_SYSROOT}/usr/include/gnu/stubs-hard.h \
@ -286,9 +274,9 @@ do_install() {
do_clean() { do_clean() {
# Remove temporary stuff from masterdir # Remove temporary stuff from masterdir
rm -rf ${_CROSS_SYSROOT} rm -rf ${_CROSS_SYSROOT}
rm -f /usr/bin/${_CROSS_TARGET}* rm -f /usr/bin/${_triplet}*
rm -rf /usr/lib/gcc/${_CROSS_TARGET} rm -rf /usr/lib/gcc/${_triplet}
rm -rf /usr/libexec/gcc/${_CROSS_TARGET} rm -rf /usr/libexec/gcc/${_triplet}
} }
cross-arm-linux-gnueabihf-libc_package() { cross-arm-linux-gnueabihf-libc_package() {
@ -298,9 +286,9 @@ cross-arm-linux-gnueabihf-libc_package() {
noverifyrdeps=yes noverifyrdeps=yes
pkg_install() { pkg_install() {
vmove usr/${_CROSS_TARGET} vmove usr/${_triplet}
mkdir -p ${DESTDIR}/usr/${_CROSS_TARGET}/usr/ mkdir -p ${DESTDIR}/usr/${_triplet}/usr/
mv ${PKGDESTDIR}/usr/${_CROSS_TARGET}/usr/bin \ mv ${PKGDESTDIR}/usr/${_triplet}/usr/bin \
${DESTDIR}/usr/${_CROSS_TARGET}/usr ${DESTDIR}/usr/${_triplet}/usr
} }
} }