cross-arm-linux-gnueabihf: remove obsolete conditionals; use XBPS_CROSS_CFLAGS.

This commit is contained in:
Juan RP 2013-02-28 10:33:40 +01:00
parent 49c9561179
commit 7f876b8ae1

View file

@ -58,10 +58,10 @@ _binutils_bootstrap() {
../binutils-${_binutils_version}/configure \
--prefix=${_CROSS_DIR} --target=${_CROSS_TARGET} \
--with-sysroot=${_CROSS_SYSROOT} --disable-nls --disable-shared \
--disable-multilib --disable-werror || return 1
--disable-multilib --disable-werror
make configure-host && make ${makejobs} || return 1
make install || return 1
make configure-host && make ${makejobs}
make install
touch ${wrksrc}/.binutils_bootstrap_done
}
@ -86,8 +86,8 @@ _gcc_bootstrap() {
--disable-sjlj-exceptions --disable-multilib \
--with-gnu-ld --with-gnu-as --with-float=hard
make ${makejobs} all-gcc all-target-libgcc || return 1
make install-gcc install-target-libgcc || return 1
make ${makejobs} all-gcc all-target-libgcc
make install-gcc install-target-libgcc
ln -sfr ${_CROSS_DIR}/lib/gcc/${_CROSS_TARGET}/${_gcc_version}/libgcc.a \
${_CROSS_DIR}/lib/gcc/${_CROSS_TARGET}/${_gcc_version}/libgcc_sh.a
@ -115,10 +115,10 @@ _glibc_headers() {
--with-headers=/usr/${_CROSS_TARGET}/usr/include \
--config-cache --enable-add-ons=nptl,ports \
--enable-obsolete-rpc \
--enable-kernel=2.6.27 --with-float=hard || return 1
--enable-kernel=2.6.27 --with-float=hard
make -k install-headers cross_compiling=yes \
install_root=${_CROSS_SYSROOT} || return 1
install_root=${_CROSS_SYSROOT}
touch ${wrksrc}/.glibc_headers_done
}
@ -136,7 +136,7 @@ _glibc_build() {
echo "libc_cv_c_cleanup=yes" >> config.cache
export CC="${_CROSS_TARGET}-gcc" LD="${_CROSS_TARGET}-ld" AS="${_CROSS_TARGET}-as"
export CFLAGS="-Os -pipe -mfloat-abi=hard -mfpu=vfp -march=armv6"
export CFLAGS="-Os -pipe $XBPS_CROSS_CFLAGS"
../glibc-${_glibc_version}/configure \
--host=${_CROSS_TARGET} --prefix=/usr \
@ -145,8 +145,8 @@ _glibc_build() {
--enable-obsolete-rpc --disable-profile \
--with-float=hard --enable-kernel=2.6.27
make ${makejobs} || return 1
make install_root=${_CROSS_SYSROOT} install || return 1
make ${makejobs}
make install_root=${_CROSS_SYSROOT} install
touch ${wrksrc}/.glibc_build_done
}
@ -171,10 +171,10 @@ _gcc_static() {
--with-sysroot=${_CROSS_SYSROOT} --enable-languages=c \
--with-gnu-as --with-gnu-ld --disable-multilib \
--with-float=hard --disable-sjlj-exceptions --disable-nls \
--enable-threads=posix --enable-long-longx || return 1
--enable-threads=posix --enable-long-longx
make ${makejobs} all-gcc || return 1
make install-gcc || return 1
make ${makejobs} all-gcc
make install-gcc
ln -sfr ${_CROSS_DIR}/lib/gcc/${_CROSS_TARGET}/${_gcc_version}/libgcc.a \
${_CROSS_DIR}/lib/gcc/${_CROSS_TARGET}/${_gcc_version}/libgcc_eh.a
@ -192,14 +192,14 @@ _gmp_static() {
cd gmp-static
export CC="${_CROSS_TARGET}-gcc" LD="${_CROSS_TARGET}-ld" AS="${_CROSS_TARGET}-as"
export CFLAGS="-Os -pipe -mfloat-abi=hard -mfpu=vfp -march=armv6 -static"
export CFLAGS="-Os -pipe $XBPS_CROSS_CFLAGS -static"
../gmp-${_gmp_version}/configure \
--host=${_CROSS_TARGET} --prefix=${_CROSS_SYSROOT} \
--disable-shared || return 1
--disable-shared
make ${makejobs} || return 1
make install || return 1
make ${makejobs}
make install
touch ${wrksrc}/.gmp_static_done
}
@ -214,14 +214,14 @@ _mpfr_build() {
cd mpfr-build
export CC="${_CROSS_TARGET}-gcc" LD="${_CROSS_TARGET}-ld" AS="${_CROSS_TARGET}-as"
export CFLAGS="-Os -pipe -mfloat-abi=hard -mfpu=vfp -march=armv6"
export CFLAGS="-Os -pipe $XBPS_CROSS_CFLAGS"
../mpfr-${_mpfr_version}/configure \
--host=${_CROSS_TARGET} --prefix=${_CROSS_SYSROOT} \
--with-gmp=${_CROSS_SYSROOT} || return 1
--with-gmp=${_CROSS_SYSROOT}
make ${makejobs} || return 1
make install || return 1
make ${makejobs}
make install
touch ${wrksrc}/.mpfr_build_done
}
@ -255,10 +255,10 @@ _gcc_final() {
--with-gnu-as --with-gnu-ld --disable-multilib \
--with-float=hard --disable-nls --disable-sjlj-exceptions \
--enable-threads=posix --enable-long-longx \
--enable-shared || return 1
--enable-shared
make ${makejobs} || return 1
make install || return 1
make ${makejobs}
make install
touch ${wrksrc}/.gcc_final_done
}
@ -276,7 +276,7 @@ _glibc_final() {
echo "libc_cv_c_cleanup=yes" >> config.cache
export CC="${_CROSS_TARGET}-gcc" LD="${_CROSS_TARGET}-ld" AS="${_CROSS_TARGET}-as"
export CFLAGS="-Os -pipe -mfloat-abi=hard -mfpu=vfp -march=armv6"
export CFLAGS="-Os -pipe $XBPS_CROSS_CFLAGS"
../glibc-${_glibc_version}/configure \
--host=${_CROSS_TARGET} --prefix=/usr \
@ -285,7 +285,7 @@ _glibc_final() {
--enable-obsolete-rpc --disable-profile \
--with-float=hard --enable-kernel=2.6.27
make ${makejobs} || return 1
make ${makejobs}
touch ${wrksrc}/.glibc_final_done
}
@ -303,15 +303,15 @@ do_build() {
fi
done
_binutils_bootstrap || return 1
_gcc_bootstrap || return 1
_glibc_headers || return 1
_glibc_build || return 1
_gcc_static || return 1
_gmp_static || return 1
_mpfr_build || return 1
_gcc_final || return 1
_glibc_final || return 1
_binutils_bootstrap
_gcc_bootstrap
_glibc_headers
_glibc_build
_gcc_static
_gmp_static
_mpfr_build
_gcc_final
_glibc_final
}
do_install() {
@ -327,15 +327,15 @@ do_install() {
# install cross binutils
cd ${wrksrc}/binutils-build &&
make DESTDIR=${DESTDIR} install || return 1
make DESTDIR=${DESTDIR} install
# install cross gcc
cd ${wrksrc}/gcc-final && \
make DESTDIR=${DESTDIR} install || return 1
make DESTDIR=${DESTDIR} install
# install glibc for target
cd ${wrksrc}/glibc-final && \
make install_root=${DESTDIR}/usr/${_CROSS_TARGET} install || return 1
make install_root=${DESTDIR}/usr/${_CROSS_TARGET} install
# hard-float only toolchain.
ln -sfr ${DESTDIR}/${_CROSS_SYSROOT}/usr/include/gnu/stubs-hard.h \