cross-mipsel-softfloat-linux-gnu: use host gmp/mpfr/mpc libs; update toolchain.
This commit is contained in:
parent
b2d7cf9f41
commit
15b29f2b53
|
@ -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
|
||||
|
|
@ -1,20 +1,18 @@
|
|||
# Template build file for 'cross-mipsel-softfloat-linux-gnu'
|
||||
#
|
||||
_binutils_version=2.23.1
|
||||
_gcc_version=4.7.2
|
||||
_glibc_version=2.17
|
||||
_gmp_version=5.0.5
|
||||
_mpfr_version=3.1.1
|
||||
_mpc_version=0.9
|
||||
_linux_version=3.7.1
|
||||
_binutils_version=2.24
|
||||
_gcc_version=4.7.3
|
||||
_glibc_version=2.18
|
||||
_linux_version=3.10.6
|
||||
|
||||
_triplet=mipsel-softfloat-linux-gnu
|
||||
_fpuflags="--with-float=soft --without-fp"
|
||||
_archflags="-mtune=mips32r2 -mabi=32 -msoft-float"
|
||||
_CROSS_SYSROOT="/usr/${_triplet}"
|
||||
|
||||
pkgname=cross-${_triplet}
|
||||
version=0.5
|
||||
revision=2
|
||||
version=0.6
|
||||
revision=1
|
||||
short_desc="GNU Cross toolchain for the ${_triplet} LE target (binutils/gcc/glibc)"
|
||||
maintainer="pancake <pancake@nopcode.org>"
|
||||
homepage="http://www.voidlinux.eu"
|
||||
|
@ -23,27 +21,27 @@ distfiles="
|
|||
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/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"
|
||||
checksum="
|
||||
2ab2e5b03e086d12c6295f831adad46b3e1410a3a234933a2e8fac66cb2e7a19
|
||||
8a9283d7010fb9fe5ece3ca507e0af5c19412626384f8a5e9434251ae100b084
|
||||
6914e337401e0e0ade23694e1b2c52a5f09e4eda3270c67e7c3ba93a89b5b23e
|
||||
1f588aaccc41bb9aed946f9fe38521c26d8b290d003c5df807f65690f2aadec9
|
||||
7b66c3f13dc8385f08264c805853f3e1a8eedab8071d582f3e661971c9acd5fd
|
||||
fd3efe422f0d454592059e80f2c00d1a2e381bf2beda424c5094abd4deb049ac
|
||||
e1ca8b8376ebdf797357f5f1734ed6eed3cadc16c32d280a780f150372de7255"
|
||||
e5e8c5be9664e7f7f96e0d09919110ab5ad597794f5b1809871177a0f0f14137
|
||||
2f7c37eb4fc14422ff2358a9ef59c974a75ab41204ef0e49fc34ab1d8981a9c3
|
||||
2cb4e1e381928f1e5e55e71ab1ba8e0ea7ede75ff9709770435bfd018ea257a3
|
||||
ed4dfd9f56b7c82e9c71331bbf8d2ea01ddfddc1b6209bd3f3c8640aa24065cf"
|
||||
|
||||
create_wrksrc=yes
|
||||
disable_debug=yes
|
||||
makedepends="perl flex"
|
||||
hostmakedepends="perl flex"
|
||||
makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel"
|
||||
depends="${pkgname}-libc-${version}_${revision}"
|
||||
nostrip_files="libgcc.a libgcov.a libgcc_eh.a"
|
||||
|
||||
_CROSS_TARGET=${_triplet}
|
||||
_CROSS_SYSROOT="/usr/${_CROSS_TARGET}"
|
||||
_apply_patch() {
|
||||
local pname="$(basename $1)"
|
||||
|
||||
if [ ! -f ".${pname}_done" ]; then
|
||||
patch -Np1 -i ${1}
|
||||
touch .${pname}_done
|
||||
fi
|
||||
}
|
||||
|
||||
_linux_headers() {
|
||||
[ -f ${wrksrc}/.linux_build_done ] && return 0
|
||||
|
@ -54,7 +52,7 @@ _linux_headers() {
|
|||
cd linux-${_linux_version}
|
||||
|
||||
make ARCH=mips headers_check
|
||||
make ARCH=mips INSTALL_HDR_PATH=/usr/${_CROSS_TARGET}/usr headers_install
|
||||
make ARCH=mips INSTALL_HDR_PATH=/usr/${_triplet}/usr headers_install
|
||||
|
||||
touch ${wrksrc}/.linux_build_done
|
||||
}
|
||||
|
@ -68,7 +66,7 @@ _binutils_bootstrap() {
|
|||
cd binutils-build
|
||||
|
||||
../binutils-${_binutils_version}/configure \
|
||||
--prefix=/usr --target=${_CROSS_TARGET} \
|
||||
--prefix=/usr --target=${_triplet} \
|
||||
--with-sysroot=${_CROSS_SYSROOT} --disable-nls --disable-shared \
|
||||
--disable-multilib --disable-werror
|
||||
|
||||
|
@ -89,18 +87,8 @@ _gcc_bootstrap() {
|
|||
[ ! -d ../gcc-bootstrap ] && mkdir ../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 \
|
||||
--target=${_CROSS_TARGET} --without-headers \
|
||||
--target=${_triplet} --without-headers \
|
||||
--disable-nls --disable-shared --without-headers \
|
||||
--disable-decimal-float --disable-libgomp --disable-libmudflap \
|
||||
--disable-libssp --disable-threads --enable-languages=c \
|
||||
|
@ -116,6 +104,9 @@ _gcc_bootstrap() {
|
|||
_glibc_headers() {
|
||||
[ -f ${wrksrc}/.glibc_headers_done ] && return 0
|
||||
|
||||
cd ${wrksrc}/glibc-${_glibc_version}
|
||||
_apply_patch ${FILESDIR}/glibc-2.18-make-4.patch
|
||||
|
||||
cd ${wrksrc}
|
||||
msg_normal "Building cross glibc headers\n"
|
||||
|
||||
|
@ -125,11 +116,11 @@ _glibc_headers() {
|
|||
echo "libc_cv_forced_unwind=yes" > config.cache
|
||||
echo "libc_cv_c_cleanup=yes" >> config.cache
|
||||
|
||||
export CC="${_CROSS_TARGET}-gcc" LD="${_CROSS_TARGET}-ld" AS="${_CROSS_TARGET}-as"
|
||||
export CC="${_triplet}-gcc" LD="${_triplet}-ld" AS="${_triplet}-as"
|
||||
|
||||
../glibc-${_glibc_version}/configure \
|
||||
--host=${_CROSS_TARGET} --prefix=/usr \
|
||||
--with-headers=/usr/${_CROSS_TARGET}/usr/include \
|
||||
--host=${_triplet} --prefix=/usr \
|
||||
--with-headers=/usr/${_triplet}/usr/include \
|
||||
--config-cache --enable-add-ons=nptl,ports \
|
||||
--enable-obsolete-rpc \
|
||||
--enable-kernel=2.6.27 ${_fpuflags}
|
||||
|
@ -152,12 +143,12 @@ _glibc_build() {
|
|||
echo "libc_cv_forced_unwind=yes" > config.cache
|
||||
echo "libc_cv_c_cleanup=yes" >> config.cache
|
||||
|
||||
export CC="${_CROSS_TARGET}-gcc" LD="${_CROSS_TARGET}-ld" AS="${_CROSS_TARGET}-as"
|
||||
export CC="${_triplet}-gcc" LD="${_triplet}-ld" AS="${_triplet}-as"
|
||||
export CFLAGS="-Os -pipe ${_archflags}"
|
||||
|
||||
../glibc-${_glibc_version}/configure \
|
||||
--host=${_CROSS_TARGET} --prefix=/usr \
|
||||
--with-headers=/usr/${_CROSS_TARGET}/usr/include \
|
||||
--host=${_triplet} --prefix=/usr \
|
||||
--with-headers=/usr/${_triplet}/usr/include \
|
||||
--config-cache --enable-add-ons=nptl,ports \
|
||||
--enable-obsolete-rpc --disable-profile \
|
||||
--enable-kernel=2.6.27 ${_fpuflags}
|
||||
|
@ -188,13 +179,13 @@ _gcc_build() {
|
|||
fi
|
||||
|
||||
../gcc-${_gcc_version}/configure \
|
||||
--target=${_CROSS_TARGET} --prefix=/usr \
|
||||
--with-sysroot=${_CROSS_SYSROOT} --enable-languages=c,c++ \
|
||||
--target=${_triplet} --prefix=/usr \
|
||||
--with-sysroot=${_CROSS_SYSROOT} --enable-languages=c,c++,lto \
|
||||
--with-gnu-as --with-gnu-ld --disable-multilib \
|
||||
--disable-nls --disable-sjlj-exceptions \
|
||||
--enable-threads=posix --enable-long-longx \
|
||||
--enable-shared --disable-libquadmath \
|
||||
--disable-libstdcxx-pch ${_fpuflags}
|
||||
--disable-libstdcxx-pch --enable-lto ${_fpuflags}
|
||||
|
||||
make ${makejobs}
|
||||
|
||||
|
@ -234,21 +225,22 @@ do_install() {
|
|||
done
|
||||
|
||||
# install cross binutils
|
||||
cd ${wrksrc}/binutils-build && make DESTDIR=${DESTDIR} install
|
||||
cd ${wrksrc}/binutils-build
|
||||
make DESTDIR=${DESTDIR} install
|
||||
|
||||
# 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
|
||||
cd ${wrksrc}/linux-${_linux_version} && \
|
||||
make ARCH=mips INSTALL_HDR_PATH=${DESTDIR}/usr/${_CROSS_TARGET}/usr \
|
||||
headers_install
|
||||
rm -f $(find ${DESTDIR}/usr/${_CROSS_TARGET}/usr/include -name .install -or -name ..install.cmd)
|
||||
rm -rf ${DESTDIR}/usr/${_CROSS_TARGET}/usr/include/drm
|
||||
cd ${wrksrc}/linux-${_linux_version}
|
||||
make ARCH=mips INSTALL_HDR_PATH=${DESTDIR}/usr/${_triplet}/usr headers_install
|
||||
rm -f $(find ${DESTDIR}/usr/${_triplet}/usr/include -name .install -or -name ..install.cmd)
|
||||
rm -rf ${DESTDIR}/usr/${_triplet}/usr/include/drm
|
||||
|
||||
# install glibc for target
|
||||
cd ${wrksrc}/glibc-build && \
|
||||
make install_root=${DESTDIR}/usr/${_CROSS_TARGET} install install-headers
|
||||
cd ${wrksrc}/glibc-build
|
||||
make install_root=${DESTDIR}/usr/${_triplet} install install-headers
|
||||
|
||||
# Remove unnecessary stuff
|
||||
rm -f ${DESTDIR}/usr/lib*/libiberty.a
|
||||
|
@ -268,17 +260,17 @@ do_install() {
|
|||
do_clean() {
|
||||
# Remove temporary stuff from masterdir
|
||||
rm -rf ${_CROSS_SYSROOT}
|
||||
rm -f /usr/bin/${_CROSS_TARGET}*
|
||||
rm -rf /usr/lib/gcc/${_CROSS_TARGET}
|
||||
rm -rf /usr/libexec/gcc/${_CROSS_TARGET}
|
||||
rm -f /usr/bin/${_triplet}*
|
||||
rm -rf /usr/lib/gcc/${_triplet}
|
||||
rm -rf /usr/libexec/gcc/${_triplet}
|
||||
}
|
||||
|
||||
cross-mipsel-softfloat-linux-gnu-libc_package() {
|
||||
short_desc="${short_desc} -- glibc files"
|
||||
short_desc+=" - libc files"
|
||||
noarch=yes
|
||||
nostrip=yes
|
||||
noverifydeps=yes
|
||||
pkg_install() {
|
||||
vmove usr/${_CROSS_TARGET}
|
||||
vmove usr/${_triplet}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue