From 53b9daacabbe0345502692797d26ddb907c8d20c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 18 Jan 2014 08:34:09 +0100 Subject: [PATCH] gcc: armv7 support; misc tweaks. --- srcpkgs/gcc/template | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/srcpkgs/gcc/template b/srcpkgs/gcc/template index 057c6a1fcb9..caf496ea03c 100644 --- a/srcpkgs/gcc/template +++ b/srcpkgs/gcc/template @@ -20,9 +20,12 @@ if [ -z "$CROSS_BUILD" ]; then fi case "$XBPS_TARGET_MACHINE" in - i?86) _triplet="${XBPS_TARGET_MACHINE}-pc-linux-gnu";; - x86_64) _triplet="${XBPS_MACHINE}-unknown-linux-gnu";; - armv6l) _triplet="arm-linux-gnueabihf";; + i686) _triplet="i686-pc-linux-gnu";; + i686-musl) _triplet="i686-pc-linux-musl";; + x86_64) _triplet="x86_64-unknown-linux-gnu";; + x86_64-musl) _triplet="x86_64-unknown-linux-musl";; + armv[678]l) _triplet="arm-linux-gnueabihf";; + armv[678]l-musl) _triplet="arm-linux-musleabi";; esac do_configure() { @@ -33,19 +36,18 @@ do_configure() { # Do not run fixincludes sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in + case "$XBPS_TARGET_MACHINE" in + armv6l*) _args+=" --with-arch=armv6 --with-fpu=vfp --with-float=hard";; + armv7l*) _args+=" --with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard";; + esac + if [ "$CROSS_BUILD" ]; then export CC_FOR_TARGET="$CC" export GCC_FOR_TARGET="$CC" export CXX_FOR_TARGET="$CXX" _langs="c,c++,lto" - _args="--disable-multilib" - if [ "$XBPS_TARGET_MACHINE" = "armv6l" ]; then - _args+=" --with-arch=armv6 --with-fpu=vfp --with-float=hard" - elif [ "$XBPS_TARGET_MACHINE" = "armv7l" ]; then - _args+=" --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard" - fi - _args+=" --host=$XBPS_CROSS_TRIPLET" + _args+=" --disable-multilib --host=$XBPS_CROSS_TRIPLET" else _langs="c,c++,objc,obj-c++,fortran,go,lto,java" _args+=" --enable-java-gc=boehm --enable-fast-character"