[cfe-commits] [PATCH] Correction for Driver Tools support for OpenBSD
    Brad Smith 
    brad at comstyle.com
       
    Tue Sep  4 16:57:28 PDT 2012
    
    
  
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?
> 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.
    
    
More information about the cfe-commits
mailing list