From owner-p4-projects@FreeBSD.ORG Fri Jun 11 09:19:49 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BD28106566C; Fri, 11 Jun 2010 09:19:49 +0000 (UTC) (envelope-from hinokind@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5E89D8FC1B; Fri, 11 Jun 2010 09:19:47 +0000 (UTC) Received: by wyb33 with SMTP id 33so765398wyb.13 for ; Fri, 11 Jun 2010 02:19:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:to:cc:subject :references:date:mime-version:content-transfer-encoding:from :message-id:in-reply-to:user-agent; bh=6akOL0aVQzVairm6zEVg7IgVLiHoDQejIvFB+QYATE4=; b=j2pPqh9sLAM9z6W2haS9sqb7D3+bJd45dJaAEYBe9KZ86Dhz6zC3/CYj8cruX8+Z8v rP8UgcOiVjCaaidNT72vDktvqjg6IuPAof01ciFpjnUsYz2ERB8boIHL0iVTfhRblEA2 P+H5Hllzqc7/bn9wUlB7xEYhAQDZnBYbIZ5Ss= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:to:cc:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; b=FE2lZYpjb+CVw9afjXbR47833QMGqMUXd/fJ9kFThhFw2FXppggcbUT2deTy3Y39a1 hgXcL73opSxzlXRAmGPJ4hJJ52GHmQu9uZWKaNcsmzzkPRO9OSjA8LvXx/ArkPvmXrcR h3NZ2UqlYdljR0OjbENlb1wdHKWunrs3auDdA= Received: by 10.227.128.9 with SMTP id i9mr1440220wbs.203.1276246387821; Fri, 11 Jun 2010 01:53:07 -0700 (PDT) Received: from klevas (hst-17-80.splius.lt [77.79.17.80]) by mx.google.com with ESMTPS id u36sm7520327wbv.18.2010.06.11.01.53.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 11 Jun 2010 01:53:06 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "b. f." , bf1783@gmail.com References: Date: Fri, 11 Jun 2010 11:53:03 +0300 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: =?utf-8?B?QW5kcml1cyBNb3JrxatuYXM=?= Message-ID: In-Reply-To: User-Agent: Opera Mail/10.60 (FreeBSD) Cc: itetcu@freebsd.org, p4-projects@freebsd.org Subject: Re: PERFORCE change 179429 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2010 09:19:49 -0000 On Fri, 11 Jun 2010 03:47:31 +0300, b. f. wrote: >> http://p4web.freebsd.org/@@179429?ac=10 >> >> Change 179429 by andrius at klevas on 2010/06/10 18:32:41 >> >> Add support for newer GCC versions. >> >> PORTS_CC should now be able to handle newer GCC versions like gcc44. > > If you intend to use USE_GCC in the sense that it is used now, for a > larger number of ports; or to allow the wide use of some other > compiler from ports, then you must consider how to deal with the new > circular dependencies that may be introduced. For example, right now, > if you build any of: > > lang/perl5.10 > devel/binutils > devel/gmake > devel/bison > math/gmp > math/mpfr > converters/libiconv > devel/m4 > devel/libtool22 > > with USE_GCC=4.4+, you will introduce circular dependencies that will > wreak havoc in the current Ports infrastructure. Unless some of these > ports are added to the base system, or only base system compilers are > used, you will probably have to devise an alternative method for > determining the dependencies of compilers and toolchains. > > Regards, > b. I'm aware of the problem, which would exist *if* I used USE_GCC for "a larger number of ports". Currently I don't use it any more than normal ports tree does. The problem with 3rd party compiler for ports is that ports simply don't have the infrastructure to tell that they need certain compiler. Right now it just uses cc/c++ from base, which is always there, and there's no way to do something like "I want to use gcc44 as my ports compiler, so pull it in if it's not installed". Ports simply assume that the compiler is installed, because it was always like this. I'm not sure how to properly tell ports tree to install selected compiler, USE_GCC (or my new USE_CC) is not the way to do it. The code may be a bit confusing, but what it does right now is this: PORTS_CC can be set to one of these: "gcc gcc34 gcc42 gcc43 gcc44 gcc45 gcc46 clang" (Actually it can be set to anything, but these will be handled properly). Then, if there's USE_GCC defined it checks if compiler in PORTS_CC is suitable. If it is, then it overrides USE_GCC with compiler from PORTS_CC. It doesn't add new USE_GCC anywhere, only modifies existing ones as needed. USE_GCC ignores "PORTS_CC=clang", that's why ports that can be compiled with both gcc and clang, should have something like: USE_CC="gcc4.4+ clang" If you have ideas how to properly install compiler without adding circular dependencies, I'm listening :) -- Andrius