[llvm-dev] Error compiling libc++ for ARMv6

JF Bastien via llvm-dev llvm-dev at lists.llvm.org
Fri Sep 25 17:34:03 PDT 2015


In pre-v6 Linux you could use the kernel-provided helpers:

https://www.kernel.org/doc/Documentation/arm/kernel_user_helpers.txt


On Fri, Sep 25, 2015 at 5:18 PM, Ahmed Bougacha <ahmed.bougacha at gmail.com>
wrote:

> On Fri, Sep 25, 2015 at 2:17 PM, JF Bastien <jfb at google.com> wrote:
> > Looks like this was caused by r248294. Author CC'ed.
> >
> > On Fri, Sep 25, 2015 at 1:46 PM, Richard Pennington via llvm-dev
> > <llvm-dev at lists.llvm.org> wrote:
> >>
> >> Hi,
> >>
> >> I was compiling libc++ with a recent TOT (248571) and when I got to the
> >> ARMv6, I got a code generation error in memory.cpp:
> >>
> >> fatal error: error in backend: Cannot select: intrinsic %llvm.arm.clrex
> >> ecc: error: clang frontend command failed with exit code 70 (use -v to
> see
> >> invocation)
> >> clang version 3.8.0 (trunk)
> >>
> >> It looks as if the newly added emitAtomicCmpXchgNoStoreLLBalance()
> >> function is the culprit.  Does this seem like a resaonable fix, or do I
> need
> >> to do something different for v6 and earlier?
> >>
> >> void ARMTargetLowering::emitAtomicCmpXchgNoStoreLLBalance(
> >>     IRBuilder<> &Builder) const {
> >>   if (Subtarget->hasV7Ops()) {
> >>     Module *M = Builder.GetInsertBlock()->getParent()->getParent();
> >>     Builder.CreateCall(llvm::Intrinsic::getDeclaration(M,
> >> Intrinsic::arm_clrex));
> >>   }
> >> }
>
> For v6, I guess we could do a fake strex to some dummy global?
>
> Anyway, r248640, sorry about that!
>
> -Ahmed
>
> >> -Rich
> >> _______________________________________________
> >> LLVM Developers mailing list
> >> llvm-dev at lists.llvm.org
> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150925/bbde88b3/attachment.html>


More information about the llvm-dev mailing list