[PATCH 2/2] Default to i586 on openSUSE.

İsmail Dönmez ismail at donmez.ws
Sat Jun 29 12:21:45 PDT 2013


This is also OK.


On Tue, Jun 25, 2013 at 6:05 PM, Johannes Obermayr
<johannesobermayr at gmx.de>wrote:

> ---
>
> https://build.opensuse.org/package/view_file?expand=1&file=default-to-i586.patch&package=llvm&project=devel:tools:compiler
> ---
>  lib/Driver/Tools.cpp | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
> index 6d468ab..4aeea6d 100644
> --- a/lib/Driver/Tools.cpp
> +++ b/lib/Driver/Tools.cpp
> @@ -1254,11 +1254,16 @@ static const char *getX86TargetCPU(const ArgList
> &Args,
>      return "i486";
>    if (Triple.getOSName().startswith("netbsd"))
>      return "i486";
> +
>    // All x86 devices running Android have core2 as their common
> -  // denominator. This makes a better choice than pentium4.
> +  // denominator. This makes a better choice than i586/pentium4.
>    if (Triple.getEnvironment() == llvm::Triple::Android)
>      return "core2";
>
> +  // Fallback to i586 on openSUSE.
> +  if (llvm::sys::fs::exists("/etc/SuSE-release"))
> +    return "i586";
> +
>    // Fallback to p4.
>    return "pentium4";
>  }
> --
> 1.8.1.4
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130629/4dddede6/attachment.html>


More information about the cfe-commits mailing list