core/gcc: move patch application to prepare()

Fixes #567
This commit is contained in:
Travis Cline 2013-09-17 20:12:26 -05:00
parent 64107f36bc
commit a865dfdaa1

View file

@ -53,6 +53,12 @@ prepare() {
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57653 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57653
patch -p0 -i ${srcdir}/gcc-4.8-filename-output.patch patch -p0 -i ${srcdir}/gcc-4.8-filename-output.patch
# ALARM: Specify build host types, triplet patch
[[ $CARCH == "arm" ]] && CONFIGFLAG="--host=armv5tel-unknown-linux-gnueabi --build=armv5tel-unknown-linux-gnueabi"
[[ $CARCH == "armv6h" ]] && CONFIGFLAG="--host=armv6l-unknown-linux-gnueabihf --build=armv6l-unknown-linux-gnueabihf --with-arch=armv6 --with-float=hard --with-fpu=vfp"
[[ $CARCH == "armv7h" ]] && CONFIGFLAG="--host=armv7l-unknown-linux-gnueabihf --build=armv7l-unknown-linux-gnueabihf --with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16"
[[ $CARCH == "armv6h" || $CARCH == "armv7h" ]] && patch -p1 -i "${srcdir}/armhf-triplet-trunk.diff"
mkdir ${srcdir}/gcc-build mkdir ${srcdir}/gcc-build
} }
@ -64,12 +70,6 @@ build() {
CFLAGS=${CFLAGS/-pipe/} CFLAGS=${CFLAGS/-pipe/}
CXXFLAGS=${CXXFLAGS/-pipe/} CXXFLAGS=${CXXFLAGS/-pipe/}
# ALARM: Specify build host types, triplet patch
[[ $CARCH == "arm" ]] && CONFIGFLAG="--host=armv5tel-unknown-linux-gnueabi --build=armv5tel-unknown-linux-gnueabi"
[[ $CARCH == "armv6h" ]] && CONFIGFLAG="--host=armv6l-unknown-linux-gnueabihf --build=armv6l-unknown-linux-gnueabihf --with-arch=armv6 --with-float=hard --with-fpu=vfp"
[[ $CARCH == "armv7h" ]] && CONFIGFLAG="--host=armv7l-unknown-linux-gnueabihf --build=armv7l-unknown-linux-gnueabihf --with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16"
[[ $CARCH == "armv6h" || $CARCH == "armv7h" ]] && patch -p1 -i "${srcdir}/armhf-triplet-trunk.diff"
${srcdir}/${_basedir}/configure --prefix=/usr \ ${srcdir}/${_basedir}/configure --prefix=/usr \
--libdir=/usr/lib --libexecdir=/usr/lib \ --libdir=/usr/lib --libexecdir=/usr/lib \
--mandir=/usr/share/man --infodir=/usr/share/info \ --mandir=/usr/share/man --infodir=/usr/share/info \