gmp has a configure script that follows the non-convention of using a CC_FOR_BUILD variable instead determining it automatically by either a --build= parameter or a CBUILD environment variable. This patch has fixed that issue: --- gmp-4.2.1-r1.ebuild.old 2007-09-12 13:15:26.000000000 -0400 +++ gmp-4.2.1-r1.ebuild 2007-09-12 13:16:17.000000000 -0400 @@ -50,6 +50,10 @@ [ "${ABI}" = "n32" ] && export GMPABI=n32 fi + tc-is-cross-compiler && \ + export CC_FOR_BUILD="${CBUILD}-gcc" && \ + export CC="${CHOST}-gcc" + econf \ --localstatedir=/var/state/gmp \ --disable-mpfr \ Reproducible: Always
use the toolchain-funcs eclass really though, the configure script should be fixed
You're very right, i just started doing that... The patch should be: --- gmp-4.2.1-r1.ebuild.old 2007-09-12 13:15:26.000000000 -0400 +++ gmp-4.2.1-r1.ebuild 2007-09-12 13:16:17.000000000 -0400 @@ -50,6 +50,10 @@ [ "${ABI}" = "n32" ] && export GMPABI=n32 fi + tc-is-cross-compiler && \ + export CC_FOR_BUILD="$(tc-getBUILD_CC)" && \ + export CC="$(tc-getCC)" + econf \ --localstatedir=/var/state/gmp \ --disable-mpfr \ (In reply to comment #1) > use the toolchain-funcs eclass > > really though, the configure script should be fixed >
usually using those funcs are only when executing another command ... if you're just exporting, use: tc-export CC also, no point in quoting: foo=$(moo)
gmp-4.2.1 cross-compiles just fine for me, and reading the GMP_PROG_CC_FOR_BUILD macro in acinclude.m4 looks like it does the right thing