[116291] trunk/dports/_resources/port1.0/group/debug-1.0.tcl

Sean Farley sean at macports.org
Fri Jan 24 10:12:45 PST 2014


raimue at macports.org writes:

> On 2014-01-24 18:24, Sean Farley wrote:
>> 
>> raimue at macports.org writes:
>> 
>>> On 2014-01-24 17:51, Sean Farley wrote:
>>>>
>>>> egall at gwmail.gwu.edu writes:
>>>>
>>>>> Just so it can remove it with the `+debug` variant that it adds, it looks
>>>>> like...
>>>>
>>>> Eric is correct. In hindsight, I am now doubting adding
>>>> -mtune=native. Maybe just the -O3 -Ofast etc.?
>>>
>>> For a debug target, I would expect the contrary. Optimization may
>>> reorder code, causing your debugger to jump in weird ways in your
>>> high-level code when stepping. Also it will inline code when possible,
>>> removing function calls and the corresponding symbols, so you can't
>>> break on them anymore.
>> 
>> So, one of the confusing things about this portgroup is that it adds
>> optimization flags by default and then removes them if the +debug
>> variant is selected.
>
> Ah, I completely misunderstood this. Now I actually looked at the code.
> Sorry, should have checked that earlier.
>
> But why do you want to add optimizations in this port group by default?

For no real reason besides wanting +debug to mean "add debug symbols and
maybe run dsymutil." I could completely remove the optimization or even
have a +opt (or some other meaningful name). Actually, maybe that's
better. I could envision wanting +opt+debug to try to debug a certain
case.


More information about the macports-dev mailing list