On 1 September 2015 at 16:04, Christophe Lyon
<christophe.l...@linaro.org> wrote:
> On 25 August 2015 at 17:31, Mike Stump <mikest...@comcast.net> wrote:
>> On Aug 25, 2015, at 1:14 AM, Christophe Lyon <christophe.l...@linaro.org> 
>> wrote:
>>> Some subsets of the tests override ALWAYS_CXXFLAGS or
>>> TEST_ALWAYS_FLAGS and perform effective_target support tests using
>>> these modified flags.
>>
>>> This patch adds a new function 'clear_effective_target_cache', which
>>> is called at the end of every .exp file which overrides
>>> ALWAYS_CXXFLAGS or TEST_ALWAYS_FLAGS.
>>
>> So, a simple English directive somewhere that says, if one changes 
>> ALWAYS_CXXFLAGS or TEST_ALWAYS_FLAGS then they should do a 
>> clear_effective_target_cache at the end as the target cache can make 
>> decisions based upon the flags, and those decisions need to be redone when 
>> the flags change would be nice.
>>
>> I do wonder, do we need to reexamine when setting the flags?  I’m thinking 
>> of a sequence like: non-thumb default, is_thumb, set flags (thumb), 
>> is_thumb.  Anyway, safe to punt this until someone discovers it or is 
>> reasonable sure it happens.
>>
>> Anyway, all looks good.  Ok.
>>
> Here is what I have committed (r227372).

Hmmm, in fact this was r227401.

>
> I updated the comment before clear_effective_target_cache, and copied
> the directive you suggested above.
> I also added a test to check if $et_prop_list exists before clearing
> (there were error messages otherwise).
>
> Christophe.
>
>>> However, I noticed that lib/g++.exp changes ALWAYS_CXXFLAGS, but does
>>> not appear to restore it. In doubt, I didn't change it.
>>
>> Yeah, I examined it.  It seems like it might not matter, as anyone setting 
>> and unsetting would come in cleared, and if they didn’t, it should be 
>> roughly the same exact state, meaning, no clearing necessary.  I think it is 
>> safe to punt this until someone finds a bug or can see a way that it would 
>> matter.  I also don’t think it would hurt to clear, if someone wanted to 
>> refactor the code a bit and make the clearing and the cleanup a little more 
>> automatic.  I’m thinking of a RAII style code in which the dtor runs the 
>> clear.  Not sure if that is even possible in tcl.  [ checking ] Nope, maybe 
>> not.  Oh well.

Reply via email to