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 1REWmk-0006vy-AZ for garchives@archives.gentoo.org; Fri, 14 Oct 2011 01:42:06 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CBE4721C310; Fri, 14 Oct 2011 01:41:51 +0000 (UTC) Received: from mail-vx0-f181.google.com (mail-vx0-f181.google.com [209.85.220.181]) by pigeon.gentoo.org (Postfix) with ESMTP id AC3FC21C303 for ; Fri, 14 Oct 2011 01:41:03 +0000 (UTC) Received: by vcbfk14 with SMTP id fk14so906353vcb.40 for ; Thu, 13 Oct 2011 18:41:03 -0700 (PDT) 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 Received: by 10.52.176.98 with SMTP id ch2mr6209336vdc.82.1318556463031; Thu, 13 Oct 2011 18:41:03 -0700 (PDT) Sender: antarus@scriptkitty.com Received: by 10.52.163.38 with HTTP; Thu, 13 Oct 2011 18:41:02 -0700 (PDT) In-Reply-To: <201110131948.00897.vapier@gentoo.org> References: <201110131948.00897.vapier@gentoo.org> Date: Thu, 13 Oct 2011 18:41:02 -0700 X-Google-Sender-Auth: lBYUkPfRkM86KBDlv74DXcxrk1c Message-ID: Subject: Re: [gentoo-dev] new helper: econf_build From: Alec Warner To: gentoo-dev@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 75ff884bc14ac1688dbe293800ba77e4 On Thu, Oct 13, 2011 at 4:48 PM, Mike Frysinger wrote: > i've found myself a few times having to implement logic like so: > =C2=A0 =C2=A0 =C2=A0 =C2=A0CFLAGS=3D${BUILD_CFLAGS:--O1 -pipe} \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0CXXFLAGS=3D${BUILD_CXXFLAGS:--O1 -pipe} \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0CPPFLAGS=3D${BUILD_CPPFLAGS} \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0LDFLAGS=3D${BUILD_LDFLAGS} \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0CC=3D$(tc-getBUILD_CC) \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0LD=3D$(tc-getBUILD_LD) \ > =C2=A0 =C2=A0 =C2=A0 =C2=A0econf --host=3D${CBUILD} "$@" I'm a newb, are BUILD_* expected to be set by users? -A > > this is to deal with packages that build up not insignificant (let's call= them > "nificant") binaries which are then used at build time. =C2=A0when cross-= compiling, > you can't execute those binaries, and things fail. > > python is a good example. =C2=A0it builds up the local python interpreter= (which is > all written in C/etc...), and then uses that to parse local python script= s > which take care of building everything else. =C2=A0so a while ago we adde= d code so > that it'd build two python binaries when cross-compiling: a local ${CBUIL= D} > version which is then used to parse the python build files to compile for > ${CHOST}. =C2=A0using host python won't work if it's newer/older/insane/a= fk. > > ncurses compiles its local term database by first creating a tic helper a= nd > then parsing its local files. =C2=A0we can't use the build system's tic b= ecause if > the installed ncurses is a different version, we run into fun things like > crashes/infinite loops/etc... > > the latest thing i hit was elfutils where it creates a local binary to > generate a database of headers which it then compiles into the target cod= e. > > so rather than continuing to copy & paste this logic everywhere, i'm goin= g to > add it to toolchain-funcs.eclass as "econf_build". =C2=A0any feedback bef= ore i do ? > -mike >