From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1REV1G-0005k4-Dx for garchives@archives.gentoo.org; Thu, 13 Oct 2011 23:48:58 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 832FA21C0E8; Thu, 13 Oct 2011 23:48:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 075D521C02A for ; Thu, 13 Oct 2011 23:48:00 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 470BB1B4016 for ; Thu, 13 Oct 2011 23:48:00 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] new helper: econf_build Date: Thu, 13 Oct 2011 19:48:00 -0400 User-Agent: KMail/1.13.7 (Linux/3.1.0-rc4; KDE/4.6.5; x86_64; ; ) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart59943536.Peurk8Nx3B"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201110131948.00897.vapier@gentoo.org> X-Archives-Salt: X-Archives-Hash: 66509d36cf454e05be93318939902dac --nextPart59943536.Peurk8Nx3B Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable i've found myself a few times having to implement logic like so: CFLAGS=3D${BUILD_CFLAGS:--O1 -pipe} \ CXXFLAGS=3D${BUILD_CXXFLAGS:--O1 -pipe} \ CPPFLAGS=3D${BUILD_CPPFLAGS} \ LDFLAGS=3D${BUILD_LDFLAGS} \ CC=3D$(tc-getBUILD_CC) \ LD=3D$(tc-getBUILD_LD) \ econf --host=3D${CBUILD} "$@" this is to deal with packages that build up not insignificant (let's call t= hem=20 "nificant") binaries which are then used at build time. when cross-compili= ng,=20 you can't execute those binaries, and things fail. python is a good example. it builds up the local python interpreter (which= is=20 all written in C/etc...), and then uses that to parse local python scripts= =20 which take care of building everything else. so a while ago we added code = so=20 that it'd build two python binaries when cross-compiling: a local ${CBUILD}= =20 version which is then used to parse the python build files to compile for=20 ${CHOST}. using host python won't work if it's newer/older/insane/afk. ncurses compiles its local term database by first creating a tic helper and= =20 then parsing its local files. we can't use the build system's tic because = if=20 the installed ncurses is a different version, we run into fun things like=20 crashes/infinite loops/etc... the latest thing i hit was elfutils where it creates a local binary to=20 generate a database of headers which it then compiles into the target code. so rather than continuing to copy & paste this logic everywhere, i'm going = to=20 add it to toolchain-funcs.eclass as "econf_build". any feedback before i d= o ? =2Dmike --nextPart59943536.Peurk8Nx3B Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJOl3iwAAoJEEFjO5/oN/WBUWkQAKL8uULf4jNbhAoEjfoyNQBM 9uDL2TjhmArLbcFVMa/u9niusD322NjI1GxdTqq3m9NtTvriR6yufOhrFJykWb5z HiLlaqu050wMV0Zo4vZ1JbK0pQUn9PFp6J61ltUkHDt14nDCZmdq8IzZKS3PIU/G FliHnRIvG7yngCq5zax/JTMxGUbc6/nVKDi5ZZ/2mu3nf8k8RNP+pOJbml1i6hVw j3N2Q100EGhpsryR8zJO4WgOBsceih8R7D0VOFufcNnd4DR01x5Sg5K95YqJhesA K3UalORJEUQu4Or35OqMMrurjqRId3yM7Vyf6gDYnTQCkNd4JxUyLKWYBYLLr3Tx vFJ7UCQeUigHC8kDzvDwS3zko/lmrcmK6dbklLxh4BAvF+snNsXzmupsal69zOUA 1imjRxgjR+sRzRcUwsEouwBV1gfQMy38L7HmHY4V6PjnDape+HV774XYQ/v9VVGM n7PZHZQHWdi/X3KNeUXM31ibvjDwsihOymSIn2tsz2XcRkZ13PsZYVNukM7Ud7nr +2/7aOKUEtGv9iH9+SdRPO8tXO4epBvrnaRisUAJB9/XKhSs70E6pgdXQVUj9K8E v2NUOXZPNFpEc6tWh9WEXzVC8UDatXGWXIrazWxZHVC5S+vHheeu8Hj7Xacs2Tjy HO4HjWvdBIaLX2U3062H =UZAA -----END PGP SIGNATURE----- --nextPart59943536.Peurk8Nx3B--