PERFORCE change 179429 for review

Andrius Morkūnas hinokind at gmail.com
Fri Jun 11 09:19:49 UTC 2010


On Fri, 11 Jun 2010 03:47:31 +0300, b. f. <bf1783 at googlemail.com> 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


More information about the p4-projects mailing list