[LLVMdev] build failure on ARM linux

Owen Anderson resistor at mac.com
Wed Jul 1 08:43:52 PDT 2009


Why is his configure not catching this?  It tests for the linkability  
of these functions on the target arch, and should be detecting their  
absence if that is actually the case.

--Owen


On Jul 1, 2009, at 12:50 AM, Xerxes RĂ„nby wrote:

> llvm/lib/System/Atomic.cpp contains the call to
> __sync_val_compare_and_swap that lowers to the missing
> __sync_val_compare_and_swap_4 GCC intrinsic.
>
> The same file contains several other __sync_* calls  and all these has
> to be implemented if we want to be able to compile llvm on linux/ARM
> with GCC versions below < 4.4
>
> xerxes at labbserver:~/llvm$ grep _sync lib/*/*
> lib/System/Atomic.cpp:  __sync_synchronize();
> lib/System/Atomic.cpp:  return __sync_val_compare_and_swap(ptr,
> old_value, new_value);
> lib/System/Atomic.cpp:  return __sync_add_and_fetch(ptr, 1);
> lib/System/Atomic.cpp:  return __sync_sub_and_fetch(ptr, 1);
> lib/System/Atomic.cpp:  return __sync_add_and_fetch(ptr, val);
>
> Cheers
> Xerxes
>
> Andrew Haley skrev:
>> Nick Lewycky wrote:
>>
>>> 2009/6/30 Andrew Haley <aph at redhat.com <mailto:aph at redhat.com>>
>>>
>>>    Nick Lewycky wrote:
>>>> I'm seeing this new build failure, starting some time yesterday on
>>>    ARM:
>>>
>>>    Yes.  It's just a matter of defining  
>>> __sync_val_compare_and_swap_4:
>>>
>>>    http://gcc.gnu.org/svn/gcc/trunk/gcc/config/arm/linux-atomic.c
>>>
>>>
>>> The program is supposed to define it? LLVM doesn't directly call
>>> __sync_val_compare_and_swap_4, so either the system headers #define
>>> something else to it or gcc lowers another call to that.
>>>
>>
>> gcc lowers atomic operations to that.  It's part of libgcc now.
>>
>>
>>> In either case, why is it declared HIDDEN?
>>>
>>
>> I'm not sure.
>>
>> Andrew.
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090701/c1277954/attachment.bin>


More information about the llvm-dev mailing list