[PATCH] D118450: [RuntimeDyld] Handle SPARC

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 5 05:21:50 PDT 2022


ro added a comment.

In D118450#3628904 <https://reviews.llvm.org/D118450#3628904>, @lhames wrote:

> In D118450#3304545 <https://reviews.llvm.org/D118450#3304545>, @brad wrote:
>
>> In D118450#3304109 <https://reviews.llvm.org/D118450#3304109>, @ro wrote:
>>
>>> ... which suggests that maybe `HaveJIT` should be set to `false` in `SparcTargetInfo.cpp` until this patch is resolved?
>>
>> No, that something other than the tests uses the MCJIT support.
>
> Lots of things use MCJIT, but MCJIT/Sparc can't have been be used anywhere, since this is the patch that introduces support.

True for unmodified upstream LLVM.  However, this patch as referenced in the submission has lived in the Solaris userland repo on github.com for almost 6 years now.  Given that not many people build LLVM from source themselves, it will well have been in use by those using `clang` from the Solaris repo.

Besides, the patch states:

  gnome-shell cores dump on sparc when mesa is build with llvm without this.
  (to be submitted to upstream).
  
  ------------  lwp# 1 / thread# 1  ---------------
   00000000e7a01a84 fail (e7a017d8, 21, e7a017b0, 1d, f71a7cee, 0) + 108 (ssp.c:16
  9)
   00000000e7a01ad8 __stack_chk_fail (ff000000, ff000000, ff000000, 0, f3e29970, f
  3e33d44) + 28
   00000000ea6c6328 llvm::RuntimeDyldELF::resolveRelocation(const llvm::SectionEnt
  ry&,unsigned long,unsignedlong,unsigned,long,unsigned long,unsigned) (3cd2e10, 3
  cd2ee8, 20, f30a6000, 6, 0) + 1c0
   00000000ea6c639c llvm::RuntimeDyldELF::resolveRelocation(const llvm::Relocation
  Entry&,unsigned long) (3cd2e10, 3ee67d8, f30a6000, 0, 0, e7b04430) + 64
   00000000ea6ab3e0 llvm::RuntimeDyldImpl::resolveRelocationList(const llvm::Small
  Vector<llvm::RelocationEntry, (unsigned)64>&,unsigned long) (3cd2e10, 3ee67c0, f
  30a6000, e7b04430, 0, 38) + e0
   00000000ea6af60c llvm::RuntimeDyldImpl::resolveRelocations() (3cd2e10, 6, 1, e7
  b04430, 3cd42d0, 3ee67b0) + 2dc
   00000000ea6af888 llvm::RuntimeDyld::resolveRelocations() (3e13038, 3d801a0, 3fa
  49a0, 3fa49b0, e7b04430, e7b04430) + 30 

explaining the need for it.

> Setting `HaveJIT` to false is a good interim solution.

I could give this a try (at least for the benefit of the Solaris/sparcv9 buildbot), but I vaguely recall having tried it and still getting quite a number of `MCJIT`-related failures.

> @ro Any interest in adapting this as a JITLink backend? Do you have access to a Sparc box to test on, or are you just trying to silence failures on Sparc bots?

Given my current backlog, it's unlikely to get to that anytime soon.  I do in fact have a SPARC box, which also hosts the Solaris/sparcv9 buildbot.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118450



More information about the llvm-commits mailing list