<div dir="ltr">Hi<div><br></div><div>Sorry to be a pain again</div><div><br></div><div>I've just tested this with clang and the 32bit build still fails without -latomic</div><div><br></div><div><span style="font-family:monospace">libtool: link: /bin/true glsl/.libs/libstandalone.a
<br>libtool: link: rm -fr glsl/.libs/libstandalone.lax glsl/.libs/libstandalone.lax
<br>libtool: link: ( cd "glsl/.libs" && rm -f "<a href="http://libstandalone.la">libstandalone.la</a>" && ln -s "../<a href="http://libstandalone.la">libstandalone.la</a>" "<a href="http://libstandalone.la">libstandalone.la</a>" )
<br>/bin/sh ../../libtool  --tag=CXX   --mode=link clang++ -m32 -fvisibility=hidden -Werror=pointer-arith -Werror=vla -O3 -march=native -pipe -flto=thin -Wall -fno-math-errno -fno-trapping-math -Qunused-arguments   -O3 -march=native -pipe -flto=thin -o glsl_<br>compiler glsl/main.o glsl/<a href="http://libstandalone.la">libstandalone.la</a>   <br>libtool: link: clang++ -m32 -fvisibility=hidden -Werror=pointer-arith -Werror=vla -O3 -march=native -pipe -flto=thin -Wall -fno-math-errno -fno-trapping-math -Qunused-arguments -O3 -march=native -pipe -flto=thin -o glsl_compiler glsl/main.o  glsl/.libs/l<br>ibstandalone.a -lz -lpthread -pthread
<br>/var/tmp/portage/media-libs/mesa-9999/temp/lto-llvm-4efaa5.o:disk_cache.c:function disk_cache_remove: error: undefined reference to '__atomic_fetch_add_8'
<br>clang-7.0: error: linker command failed with exit code 1 (use -v to see invocation)
<br>make[4]: *** [Makefile:2364: glsl_compiler] Error 1
<br>make[4]: Leaving directory '/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999-abi_x86_32.x86/src/compiler'
<br>make[3]: *** [Makefile:1793: all] Error 2
<br>make[3]: Leaving directory '/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999-abi_x86_32.x86/src/compiler'
<br>make[2]: *** [Makefile:875: all-recursive] Error 1
<br>make[2]: Leaving directory '/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999-abi_x86_32.x86/src'
<br>make[1]: *** [Makefile:660: all] Error 2
<br>make[1]: Leaving directory '/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999-abi_x86_32.x86/src'
<br>make: *** [Makefile:668: all-recursive] Error 1
<br> <span style="font-weight:bold;color:rgb(255,84,84)">*</span> ERROR: media-libs/mesa-9999::gentoo failed (compile phase):
<br> <span style="font-weight:bold;color:rgb(255,84,84)">*</span>   emake failed
<br> <span style="font-weight:bold;color:rgb(255,84,84)">*</span>  <br> <span style="font-weight:bold;color:rgb(255,84,84)">*</span> If you need support, post the output of `emerge --info '=media-libs/mesa-9999::gentoo'`,
<br> <span style="font-weight:bold;color:rgb(255,84,84)">*</span> the complete build log and the output of `emerge -pqv '=media-libs/mesa-9999::gentoo'`.
<br> <span style="font-weight:bold;color:rgb(255,84,84)">*</span> The complete build log is located at '/var/tmp/portage/media-libs/mesa-9999/temp/build.log'.
<br> <span style="font-weight:bold;color:rgb(255,84,84)">*</span> The ebuild environment file is located at '/var/tmp/portage/media-libs/mesa-9999/temp/environment'.
<br> <span style="font-weight:bold;color:rgb(255,84,84)">*</span> Working directory: '/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999-abi_x86_32.x86'
<br> <span style="font-weight:bold;color:rgb(255,84,84)">*</span> S: '/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999'<br></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">If I pass -latomic in with the LDFLAGS it builds fine</span></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, 27 Feb 2018 at 20:22 Matt Turner <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Feb 27, 2018 at 2:26 AM, Thierry Reding<br>
<<a href="mailto:thierry.reding@gmail.com" target="_blank">thierry.reding@gmail.com</a>> wrote:<br>
> On Mon, Feb 26, 2018 at 11:14:05AM -0800, Matt Turner wrote:<br>
>> On Fri, Feb 23, 2018 at 5:18 AM, Thierry Reding<br>
>> <<a href="mailto:thierry.reding@gmail.com" target="_blank">thierry.reding@gmail.com</a>> wrote:<br>
>> > From: Thierry Reding <<a href="mailto:treding@nvidia.com" target="_blank">treding@nvidia.com</a>><br>
>> ><br>
>> > The disk cache implementation uses 64-bit atomic operations. For some<br>
>> > architectures, such as 32-bit ARM, GCC will not be able to translate<br>
>> > these operations into lock-free instructions and will instead rely on<br>
>><br>
>> Here, and in the comment in meson.build, I think you mean "atomic"<br>
>> rather than "lock-free" instructions? It's at least confusing, since<br>
>> on x86 atomic instructions have a "lock" prefix.<br>
><br>
> This uses the terminology used by the GCC documentation, see:<br>
><br>
>         <a href="https://gcc.gnu.org/wiki/Atomic/GCCMM" rel="noreferrer" target="_blank">https://gcc.gnu.org/wiki/Atomic/GCCMM</a><br>
><br>
> I think the GCC terms merely mean that you don't need any explicit<br>
> locking for these operations to be atomic.<br>
><br>
> How about this instead:<br>
><br>
>         "... operations into atomic, lock-free instructions..."<br>
><br>
> ?<br>
<br>
Ah, I see. Thanks, that works for me.<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>