[PATCH] D89696: [OpenMP] Fixing OpenMP/driver.c failing on 32-bit hosts

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 21 08:42:01 PDT 2020


jhuber6 added a comment.

In D89696#2344753 <https://reviews.llvm.org/D89696#2344753>, @daltenty wrote:

> In D89696#2344508 <https://reviews.llvm.org/D89696#2344508>, @jhuber6 wrote:
>
>> @daltenty Do you think this will fix the problem on AIX?
>
> It's not just AIX that will have this problem I suspect. If you configure any cross-compiling build with a 64-bit host, targeting a 32-bit arch, your going to run into the problem. I think checking against a list of known 64-bit arches is good enough for the purposes here, but the check still needs to be against the target, not the host.
>
> Also, the frontend diagnostic looks like it is off for the same reason:
>
>   else if (getArchPtrSize(T) != getArchPtrSize(TT))
>     Diags.Report(diag::err_drv_incompatible_omp_arch)
>
> T seems to be the target triple, not the host, but the diagnostic reads: `pointer size is incompatible with host`.

TT is the target triple, otherwise the error message would be backwards, x86 is the OpenMP target architecture and PPC is the host architecture. I'm not sure what you mean by checking the target rather than the host. The target is set explicitly by `-fopenmp-targets=<triple>`, since it's being set in the test file we try to make sure that the host matches it. If this was just a frontend test we could just specify the host Triple and be done with it. Maybe we could add some CMake options for which offloading libraries were built?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89696/new/

https://reviews.llvm.org/D89696



More information about the cfe-commits mailing list