chroot-gcc: fix cross builds to not set default cross sysroot.

This commit is contained in:
Juan RP
2013-04-17 08:26:16 +02:00
parent 493121ef10
commit fd34606fc2

View File

@@ -7,7 +7,7 @@ _mpc_ver=0.8.2
pkgname=chroot-gcc pkgname=chroot-gcc
version=${_majorver}.3 version=${_majorver}.3
revision=1 revision=2
wrksrc="gcc-${version}" wrksrc="gcc-${version}"
homepage="http://gcc.gnu.org" homepage="http://gcc.gnu.org"
short_desc="The GNU C Compiler suite -- for xbps-src use" short_desc="The GNU C Compiler suite -- for xbps-src use"
@@ -105,6 +105,10 @@ _mpc_build() {
do_configure() { do_configure() {
local _floatabi _args local _floatabi _args
if [ "$CROSS_BUILD" ]; then
_args="--host=$XBPS_CROSS_TRIPLET"
fi
if [ "$XBPS_TARGET_MACHINE" = "armv6l" ]; then if [ "$XBPS_TARGET_MACHINE" = "armv6l" ]; then
_floatabi="--with-float=hard" _floatabi="--with-float=hard"
elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
@@ -132,7 +136,8 @@ do_configure() {
cd gcc-build cd gcc-build
CONFIG_SHELL=/bin/bash \ CONFIG_SHELL=/bin/bash \
../gcc-${version}/configure ${CONFIGURE_SHARED_ARGS} \ ../gcc-${version}/configure --prefix=/usr \
--mandir=/usr/share/man --infodir=/usr/share/info \
--libdir=/usr/lib --libexecdir=/usr/lib \ --libdir=/usr/lib --libexecdir=/usr/lib \
--enable-clocale=gnu --enable-shared \ --enable-clocale=gnu --enable-shared \
--enable-threads=posix --enable-__cxa_atexit \ --enable-threads=posix --enable-__cxa_atexit \
@@ -145,7 +150,7 @@ do_configure() {
--without-cloog --without-ppl --disable-libstdcxx-pch \ --without-cloog --without-ppl --disable-libstdcxx-pch \
--disable-libquadmath --disable-libquadmath-support \ --disable-libquadmath --disable-libquadmath-support \
--disable-libgomp --disable-libssp --disable-libitm \ --disable-libgomp --disable-libssp --disable-libitm \
${_floatabi} ${_args} ${_floatabi}
} }
do_build() { do_build() {