> Date: Tue, 19 May 2020 23:36:23 +0200
> From: Patrick Wildt <[email protected]>
> 
> Hi,
> 
> drahn@ was complaining to me that his cross-compiler wasn't defining
> __OpenBSD__ or __ELF__, and I think the fix is pretty simple.  We're
> just missing a case in a switch-case.
> 
> The .cpp file itself still compiles, but I haven't built a full clang
> with it.  Please give it a go and report back.
> 
> I'll already ask for OKs though, but will only commit once I got
> positive feedback.  :)
> 
> ok?

Note sure if we'll ever use the little-endian variant, but I don't
think it hurts to add it.

ok kettenis@

> 
> Patrick
> 
> diff --git a/gnu/llvm/tools/clang/lib/Basic/Targets.cpp 
> b/gnu/llvm/tools/clang/lib/Basic/Targets.cpp
> index 3c139d72479..5bff08ad70d 100644
> --- a/gnu/llvm/tools/clang/lib/Basic/Targets.cpp
> +++ b/gnu/llvm/tools/clang/lib/Basic/Targets.cpp
> @@ -349,6 +349,8 @@ TargetInfo *AllocateTarget(const llvm::Triple &Triple,
>        return new FreeBSDTargetInfo<PPC64TargetInfo>(Triple, Opts);
>      case llvm::Triple::NetBSD:
>        return new NetBSDTargetInfo<PPC64TargetInfo>(Triple, Opts);
> +    case llvm::Triple::OpenBSD:
> +      return new OpenBSDTargetInfo<PPC64TargetInfo>(Triple, Opts);
>      default:
>        return new PPC64TargetInfo(Triple, Opts);
>      }
> @@ -359,6 +361,8 @@ TargetInfo *AllocateTarget(const llvm::Triple &Triple,
>        return new LinuxTargetInfo<PPC64TargetInfo>(Triple, Opts);
>      case llvm::Triple::NetBSD:
>        return new NetBSDTargetInfo<PPC64TargetInfo>(Triple, Opts);
> +    case llvm::Triple::OpenBSD:
> +      return new OpenBSDTargetInfo<PPC64TargetInfo>(Triple, Opts);
>      default:
>        return new PPC64TargetInfo(Triple, Opts);
>      }
> 
> 

Reply via email to