From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 11308138010 for ; Sat, 22 Sep 2012 15:18:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3B10D21C045; Sat, 22 Sep 2012 15:18:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 1EC8A21C03B for ; Sat, 22 Sep 2012 15:16:29 +0000 (UTC) Received: from [192.168.43.223] (unknown [94.164.108.201]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: lu_zero) by smtp.gentoo.org (Postfix) with ESMTPSA id 06EFB33C1EF for ; Sat, 22 Sep 2012 15:16:27 +0000 (UTC) Message-ID: <505DD648.8030401@gentoo.org> Date: Sat, 22 Sep 2012 17:16:24 +0200 From: Luca Barbato User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120801 Thunderbird/14.0 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 To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] RFC: method of checking for cross compilation from ebuild functions References: <505C90A2.90405@gentoo.org> In-Reply-To: <505C90A2.90405@gentoo.org> X-Enigmail-Version: 1.5a1pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: 1482991f-4ee4-4fc3-b5a7-24f866d054c4 X-Archives-Hash: 4eefd1939dc3ac7db04a1334bd69d5be On 09/21/2012 06:06 PM, Zac Medico wrote: > On 09/20/2012 10:34 AM, Ambroz Bizjak wrote: >> The question now is, how should this method for checking >> --crosscompile be implemented? In particular, we have two options: >> >> - Environment variable. If so, how to call it? Possible names are >> CROSSCOMPILE, GENTOO_CROSSCOMPILE, PORTAGE_CROSSCOMPILE, >> ECROSSCOMPILE... For more generic names (CROSSCOMPILE) it needs to be >> taken into account that they may inadvertently affect packages. >> However environment vars have the benefit that it's easy to pass them >> through programs and scripts. >> >> - Internal function, similar to "use". Probably "is_crosscompile". >> This may look nicer and reduces the risk of collisions. > > Since it's just a boolean flag, we could have a special "crosscompile" > USE flag for this, so that the use() function could be used like we > currently use it for the "test" USE flag. The flag would be forced on or > off based on your configuration, similar to the "test" flag [1], so > there wouldn't be any danger of the flag being accidentally enabled or > disabled. The flag could be bound to FEATURES=crosscompile, or some > other package manager configuration variable. Note that if we add a > --crosscompile option to emerge, then we'll also have to add it to the > ebuid(1) command, so maybe it's better to forgo the commandline option > and just toggle it with a configuration variable like > FEATURES=crosscompile. Also, it's conceivable that you could drop the > CROSS_HDEPEND variable, in favor of HDEPEND="crosscompile? ( foo )" > syntax (somewhat in alignment with Brian Harring's DEPENDENCIES proposal). > > [1] https://bugs.gentoo.org/show_bug.cgi?id=373209 > I like the idea. lu