<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Sun, Aug 5, 2018 at 8:49 AM Dimitry Andric via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 3 Aug 2018, at 13:37, Hans Wennborg via Release-testers <<a href="mailto:release-testers@lists.llvm.org" target="_blank">release-testers@lists.llvm.org</a>> wrote:<br>
> <br>
> 7.0.0-rc1 was just tagged (from the branch at r338847).<br>
> <br>
> It's early in the release process, but I'd like to find out what the<br>
> status is of the branch on our various platforms.<br>
> <br>
> Please run the test script, share the results, and upload binaries.<br>
<br>
Hmm, I'm running into a rather nasty snag now on i386-freebsd11, due to our lack of atomic 64 bit primitives; Phase2's configure dies with:<br>
<br>
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB<br>
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success<br>
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB<br>
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Failed<br>
-- Looking for __atomic_load_8 in atomic<br>
-- Looking for __atomic_load_8 in atomic - not found<br>
CMake Error at cmake/modules/CheckAtomic.cmake:75 (message):<br>
Host compiler appears to require libatomic, but cannot find it.<br>
<br>
Interestingly, Phase1 does *not* suffer from this, but there the "host compiler" is clang 6.0.0.<br>
<br>
Phase1 CMake output:<br>
<br>
Performing C++ SOURCE FILE Test HAVE_CXX_ATOMICS64_WITHOUT_LIB succeeded with the following output:<br>
Change Dir: /home/dim/llvm/7.0.0/rc1/Phase1/Release/llvmCore-7.0.0-rc1.obj/CMakeFiles/CMakeTmp<br>
<br>
Run Build Command:"/usr/local/bin/gmake" "cmTC_845df/fast"<br>
/usr/local/bin/gmake -f CMakeFiles/cmTC_845df.dir/build.make CMakeFiles/cmTC_845df.dir/build<br>
gmake[1]: Entering directory '/home/dim/llvm/7.0.0/rc1/Phase1/Release/llvmCore-7.0.0-rc1.obj/CMakeFiles/CMakeTmp'<br>
Building CXX object CMakeFiles/cmTC_845df.dir/src.cxx.o<br>
/usr/bin/c++ -DHAVE_CXX_ATOMICS64_WITHOUT_LIB -std=c++11 -Werror=unguarded-availability-new -o CMakeFiles/cmTC_845df.dir/src.cxx.o -c /home/dim/llvm/7.0.0/rc1/Phase1/Release/llvmCore-7.0.0-rc1.obj/CMakeFiles/CMakeTmp/src.cxx<br>
Linking CXX executable cmTC_845df<br>
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_845df.dir/link.txt --verbose=1<br>
/usr/bin/c++ -DHAVE_CXX_ATOMICS64_WITHOUT_LIB -std=c++11 -Werror=unguarded-availability-new CMakeFiles/cmTC_845df.dir/src.cxx.o -o cmTC_845df -lm<br>
gmake[1]: Leaving directory '/home/dim/llvm/7.0.0/rc1/Phase1/Release/llvmCore-7.0.0-rc1.obj/CMakeFiles/CMakeTmp'<br>
<br>
Source file was:<br>
<br>
#include <atomic><br>
#include <cstdint><br>
std::atomic<uint64_t> x (0);<br>
int main() {<br>
uint64_t i = x.load(std::memory_order_relaxed);<br>
return 0;<br>
}<br>
<br>
Phase2 CMake output:<br>
<br>
Performing C++ SOURCE FILE Test HAVE_CXX_ATOMICS64_WITHOUT_LIB failed with the following output:<br>
Change Dir: /home/dim/llvm/7.0.0/rc1/Phase2/Release/llvmCore-7.0.0-rc1.obj/CMakeFiles/CMakeTmp<br>
<br>
Run Build Command:"/usr/local/bin/gmake" "cmTC_720f3/fast"<br>
/usr/local/bin/gmake -f CMakeFiles/cmTC_720f3.dir/build.make CMakeFiles/cmTC_720f3.dir/build<br>
gmake[1]: Entering directory '/home/dim/llvm/7.0.0/rc1/Phase2/Release/llvmCore-7.0.0-rc1.obj/CMakeFiles/CMakeTmp'<br>
Building CXX object CMakeFiles/cmTC_720f3.dir/src.cxx.o<br>
/home/dim/llvm/7.0.0/rc1/Phase1/Release/llvmCore-7.0.0-rc1.install/usr/local/bin/clang++ -DHAVE_CXX_ATOMICS64_WITHOUT_LIB -std=c++11 -Werror=unguarded-availability-new -o CMakeFiles/cmTC_720f3.dir/src.cxx.o -c /home/dim/llvm/7.0.0/rc1/Phase2/Release/llvmCore-7.0.0-rc1.obj/CMakeFiles/CMakeTmp/src.cxx<br>
Linking CXX executable cmTC_720f3<br>
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_720f3.dir/link.txt --verbose=1<br>
/home/dim/llvm/7.0.0/rc1/Phase1/Release/llvmCore-7.0.0-rc1.install/usr/local/bin/clang++ -DHAVE_CXX_ATOMICS64_WITHOUT_LIB -std=c++11 -Werror=unguarded-availability-new CMakeFiles/cmTC_720f3.dir/src.cxx.o -o cmTC_720f3 -lm<br>
CMakeFiles/cmTC_720f3.dir/src.cxx.o: In function `main':<br>
src.cxx:(.text+0x33): undefined reference to `__atomic_load_8'<br>
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)<br>
gmake[1]: *** [CMakeFiles/cmTC_720f3.dir/build.make:98: cmTC_720f3] Error 1<br>
gmake[1]: Leaving directory '/home/dim/llvm/7.0.0/rc1/Phase2/Release/llvmCore-7.0.0-rc1.obj/CMakeFiles/CMakeTmp'<br>
gmake: *** [Makefile:126: cmTC_720f3/fast] Error 2<br>
<br>
Source file was:<br>
<br>
#include <atomic><br>
#include <cstdint><br>
std::atomic<uint64_t> x (0);<br>
int main() {<br>
uint64_t i = x.load(std::memory_order_relaxed);<br>
return 0;<br>
}<br>
<br>
Apparently, with clang 6.0 it didn't generate libcalls to atomic functions, but just put in cmpxchg8b's, I guess? And with clang 7.0 this seems to have changed.<br>
<br>
For now, I can only test on amd64 due to this, since I don't have an easy workaround.<br></blockquote><div><br></div><div>Couldn't it be the consequence of <a href="https://github.com/llvm-mirror/compiler-rt/commit/e8b47a537f4c849e66e450dadddfbfe03d1f06fd#diff-376935638380b425bdd8d9c735545491">https://github.com/llvm-mirror/compiler-rt/commit/e8b47a537f4c849e66e450dadddfbfe03d1f06fd#diff-376935638380b425bdd8d9c735545491</a>? <br></div></div></div>