<div class="gmail_quote">2009/6/30 Andrew Haley <span dir="ltr"><<a href="mailto:aph@redhat.com">aph@redhat.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">Nick Lewycky wrote:<br>
> I'm seeing this new build failure, starting some time yesterday on ARM:<br>
><br>
> make[3]: Entering directory `/home/nlewycky/llvm/tools/llvmc/driver'<br>
> llvm[3]: Linking Debug executable llvmc<br>
> g++ -DLLVMC_BUILTIN_PLUGIN_1=Base -DLLVMC_BUILTIN_PLUGIN_2=Clang -I/home/nlewycky/llvm/include -I/home/nlewycky/llvm/tools/llvmc/driver -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -g -fPIC -Woverloaded-virtual -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -lCompilerDriver -g -Wl,-R -Wl,/home/nlewycky/llvm/Debug/bin -Wl,-export-dynamic -L/home/nlewycky/llvm/Debug/lib -L/home/nlewycky/llvm/Debug/lib -o /home/nlewycky/llvm/Debug/bin/llvmc /home/nlewycky/llvm/tools/llvmc/driver/Debug/Main.o -lplugin_llvmc_Base -lplugin_llvmc_Clang \<br>
> -lpthread -ldl -lm<br>
> /usr/bin/ld: /home/nlewycky/llvm/Debug/bin/llvmc: hidden symbol `__sync_val_compare_and_swap_4' in /usr/lib/gcc/arm-linux-gnueabi/4.3.3/libgcc.a(linux-atomic.o) is referenced by DSO<br>
> /usr/bin/ld: final link failed: Nonrepresentable section on output<br>
> collect2: ld returned 1 exit status<br>
> make[3]: *** [/home/nlewycky/llvm/Debug/bin/llvmc] Error 1<br>
><br>
> This is with LLVM being built by the system compiler (GCC 4.3.3-10<br>
> Debian). I'm not sure what to make of this. Would it be due to the<br>
> atomics used for mutexes?<br>
<br>
</div></div>Yes. It's just a matter of defining __sync_val_compare_and_swap_4:<br>
<br>
<a href="http://gcc.gnu.org/svn/gcc/trunk/gcc/config/arm/linux-atomic.c" target="_blank">http://gcc.gnu.org/svn/gcc/trunk/gcc/config/arm/linux-atomic.c</a><br>
<font color="#888888"></font></blockquote><div><br></div><div>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. In either case, why is it declared HIDDEN?</div>
<div><br></div><div>Nick</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><font color="#888888"><br>
Andrew.<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br>