[cfe-dev] Patch to quiet some options

David Chisnall csdavec at swansea.ac.uk
Tue Sep 1 05:59:41 PDT 2009


On 1 Sep 2009, at 06:54, Daniel Dunbar wrote:

> On Mon, Aug 31, 2009 at 4:01 PM, David  
> Chisnall<csdavec at swansea.ac.uk> wrote:
>> On 18 Aug 2009, at 06:59, Daniel Dunbar wrote:
>>
>>> I think the right fix is to pass -pthread to clang-cc since it may
>>> change the language (depending on the target?). This will have the
>>> side effect of silencing the warning.
>>
>> The attached diff passes -pthread on to clang-cc, which then  
>> ignores it.
>>  When someone comes to add support for platforms like HP-UX where it
>> actually does something there is now a place for them to do so.  On
>> platforms where it is silently ignored by GCC (I think that includes
>> everything we support so far), it now doesn't issue an unrecognised  
>> argument
>> warning.
>
> Ok, but, might as well add the language option and preprocessor define
> while we are at it?

Well, the problem with this is that I have no idea what they are  
because I don't seem to have access to any platforms where -pthread  
does anything other than imply -lpthread while linking.  Apparently on  
some platforms it defines a preamble to the executable, on some it  
defines macros (but I don't know what they are) and (I think) it also  
alters the behaviour of OpenMP on some platforms (but we don't yet  
support OpenMP), so it seemed more sensible to just leave the option  
there and let people define sensible language options when they add a  
target or feature that uses this flag, rather than for me to add some  
based on guesses that would sit unused and then be replaced later.

David



More information about the cfe-dev mailing list