[cfe-commits] [PATCH] Correction for Driver Tools support for OpenBSD

Eric Christopher echristo at apple.com
Tue Sep 4 23:01:48 PDT 2012


On Sep 4, 2012, at 4:57 PM, Brad Smith <brad at comstyle.com> wrote:

> On Mon, Aug 27, 2012 at 05:08:37PM -0400, Brad Smith wrote:
>> The attached diff corrects the Driver Tools support for OpenBSD
>> to properly link libpthread_p when using profiling.
> 
> Anyone?

Looks fine, a test case wouldn't go amiss.

Thanks!

-eric

> 
>> Index: lib/Driver/Tools.cpp
>> ===================================================================
>> --- lib/Driver/Tools.cpp	(revision 161724)
>> +++ lib/Driver/Tools.cpp	(working copy)
>> @@ -4937,14 +4937,21 @@
>>     // the default system libraries. Just mimic this for now.
>>     CmdArgs.push_back("-lgcc");
>> 
>> -    if (Args.hasArg(options::OPT_pthread))
>> -      CmdArgs.push_back("-lpthread");
>> +    if (Args.hasArg(options::OPT_pthread)) {
>> +      if (!Args.hasArg(options::OPT_shared) &&
>> +          Args.hasArg(options::OPT_pg))
>> +         CmdArgs.push_back("-lpthread_p");
>> +      else
>> +         CmdArgs.push_back("-lpthread");
>> +    }
>> +
>>     if (!Args.hasArg(options::OPT_shared)) {
>> -      if (Args.hasArg(options::OPT_pg)) 
>> +      if (Args.hasArg(options::OPT_pg))
>>          CmdArgs.push_back("-lc_p");
>>       else
>>          CmdArgs.push_back("-lc");
>>     }
>> +
>>     CmdArgs.push_back("-lgcc");
>>   }
>> 
> 
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list