gcc: fix cross builds to not set default cross sysroot.
This commit is contained in:
parent
45d554ef09
commit
493121ef10
|
@ -2,9 +2,7 @@
|
||||||
pkgname=gcc
|
pkgname=gcc
|
||||||
_majorver=4.7
|
_majorver=4.7
|
||||||
version=${_majorver}.3
|
version=${_majorver}.3
|
||||||
revision=1
|
revision=2
|
||||||
hostmakedepends="perl flex"
|
|
||||||
makedepends="zlib-devel gmp-devel mpfr-devel mpc-devel ppl-devel>=1.0 cloog-devel"
|
|
||||||
short_desc="The GNU C Compiler"
|
short_desc="The GNU C Compiler"
|
||||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
homepage="http://gcc.gnu.org"
|
homepage="http://gcc.gnu.org"
|
||||||
|
@ -12,6 +10,9 @@ license="GFDL-1.2, GPL-3, LGPL-2.1"
|
||||||
distfiles="http://ftp.gnu.org/pub/gnu/gcc/gcc-$version/gcc-$version.tar.bz2"
|
distfiles="http://ftp.gnu.org/pub/gnu/gcc/gcc-$version/gcc-$version.tar.bz2"
|
||||||
checksum=2f7c37eb4fc14422ff2358a9ef59c974a75ab41204ef0e49fc34ab1d8981a9c3
|
checksum=2f7c37eb4fc14422ff2358a9ef59c974a75ab41204ef0e49fc34ab1d8981a9c3
|
||||||
|
|
||||||
|
hostmakedepends="perl flex"
|
||||||
|
makedepends="zlib-devel gmp-devel mpfr-devel mpc-devel ppl-devel>=1.0 cloog-devel"
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
||||||
# Required stuff for multilib packages.
|
# Required stuff for multilib packages.
|
||||||
_triplet="${XBPS_MACHINE}-unknown-linux-gnu"
|
_triplet="${XBPS_MACHINE}-unknown-linux-gnu"
|
||||||
|
@ -27,27 +28,30 @@ if [ "$CROSS_BUILD" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
|
local _langs _args
|
||||||
|
|
||||||
# As specified in the LFS book, disable installing libiberty.
|
# As specified in the LFS book, disable installing libiberty.
|
||||||
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
|
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
|
||||||
# Do not run fixincludes
|
# Do not run fixincludes
|
||||||
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
|
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
|
||||||
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
export CC="$XBPS_CROSS_TRIPLET-gcc --sysroot=$XBPS_CROSS_BASE"
|
|
||||||
export CC_FOR_TARGET="$CC"
|
export CC_FOR_TARGET="$CC"
|
||||||
export GCC="$CC"
|
|
||||||
export GCC_FOR_TARGET="$CC"
|
export GCC_FOR_TARGET="$CC"
|
||||||
export CXX="$XBPS_CROSS_TRIPLET-g++ --sysroot=$XBPS_CROSS_BASE"
|
|
||||||
export CXX_FOR_TARGET="$CXX"
|
export CXX_FOR_TARGET="$CXX"
|
||||||
export CFLAGS="$XBPS_CROSS_CFLAGS"
|
|
||||||
export CXXFLAGS="$CFLAGS"
|
|
||||||
_args="--disable-multilib --with-float=hard"
|
|
||||||
_langs="c,c++,lto"
|
_langs="c,c++,lto"
|
||||||
|
_args="--disable-multilib"
|
||||||
|
if [ "$XBPS_TARGET_MACHINE" = "armv6l" ]; then
|
||||||
|
_args+=" --with-float=hard"
|
||||||
|
fi
|
||||||
|
_args+=" --host=$XBPS_CROSS_TRIPLET"
|
||||||
else
|
else
|
||||||
_langs="c,c++,objc,obj-c++,fortran,go,lto"
|
_langs="c,c++,objc,obj-c++,fortran,go,lto"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./configure ${CONFIGURE_SHARED_ARGS} --libexecdir=/usr/lib \
|
./configure --prefix=/usr --mandir=/usr/share/man \
|
||||||
|
--infodir=/usr/share/info --libexecdir=/usr/lib \
|
||||||
--enable-clocale=gnu --disable-bootstrap --libdir=/usr/lib \
|
--enable-clocale=gnu --disable-bootstrap --libdir=/usr/lib \
|
||||||
--enable-threads=posix --enable-__cxa_atexit --enable-multilib \
|
--enable-threads=posix --enable-__cxa_atexit --enable-multilib \
|
||||||
--disable-rpath --with-system-zlib --enable-shared --enable-lto \
|
--disable-rpath --with-system-zlib --enable-shared --enable-lto \
|
||||||
|
|
Loading…
Reference in a new issue