[HEADSUP] FYI: patch to ports that do not build with clang has been committed

matt sendtomatt at gmail.com
Sat Oct 13 00:42:37 UTC 2012


On 10/12/12 00:54, Claude Buisson wrote:
> On 10/12/2012 05:00, matt wrote:
>>
>>>>
>>>> I have made changes to ports/Mk/bsd.gcc.mk that allow the addition of
>>>> "USE_GCC=any" to a port's Makefile, and then committed that change to
>>>> various ports.  In most (but not all!) cases this will tell the port
>>>> "build with gcc instead of clang" (*) .
>>>>
>>>
>>> Why not USE_GCC ?= any for the poor guys like me who build (some)
>>> ports with
>>> USE_GCC=4.6 ?
>>>
>>>> For those users with CC installed as gcc (including -stable), this
>>>> patch should have no effect.  Variations of combinations have been
>>>> heavily tested on pointyhat-west.  If there are any regressions, 
>>>> please
>>>> contact me.
>>>>
>>>
>>>
>>
>> Does  this override setting CC explicitly in make.conf?
>> Sorry if it's a dumb question, not sure exactly the hierarchy of USE_GCC
>> vs CC in the make system.
>>
>
> Dumb as I am, I also wonder when I see that in multimedia/x264:
>
> ...
> USE_GCC=    any
> ...
> .if ${PORT_OPTIONS:MGCC44}
> USE_GCC?=    4.4+
> .endif
> ...
>
> which seems to deny the intent of the GCC44 option
>
> Sorry but I can not make the test at this present time
>
>>  Matt
>
> Claude Buisson
>
I tested, and can confirm two things. CC is overpowered by USE_GCC=any, 
which means that I end up with no sse4a and limited support for my arch 
(Opteron 4xxx) because I can't set a better -march/cputype than 
opteron-sse3. As far as I know base gcc doesn't even support sse4a. This 
is really perhaps an issue with me setting CC in make.conf moreso than 
ports, however this was the approved method of using clang by default as 
well as the approved method of using ports gcc in the ports system. Is 
there a new approved method?

M. Buisson's test case also fails, with base gcc being used even though 
the gcc44 option is chosen. This may not break as many ports as it 
might, but it will certainly create low performing editions of many 
multimedia ports given the CPU features supported by either later clang 
or gcc. Some will probably break?

If I missed something, please let me know, or if my testing is somehow 
compromised. I removed make.conf (as mine is customized) for Claude's 
test case, but it's possible something else may have affected my test 
results. USE_GCC=any was manually added to the ports makefiles (test 
case was editors/nano and multimedia/x264).

Matt




More information about the freebsd-ports mailing list