<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>
<blockquote type="cite">
<pre class="message">clang-6.0 and friends advertise their default target on armhf as
armv8l-unknown-linux-gnueabihf, which sounds like nonsense.</pre>
</blockquote>
Not really "nonsense", armv8 is best known for adding 64-bit mode
but it did also add some enhancements for the 32-bit architecture.
I don't know if clang has the ability to use any of these new
instructions but if it does it could well mean binaries are being
built that won't run on baseline armhf.<br>
<blockquote type="cite">
<pre class="message">This might depend on the cpu/chroot on the buildd that built the
llvm-toolchain-6.0 package:</pre>
</blockquote>
Right, we ran into issues with clang building for the wrong CPU
target in raspbian (and I suspect armel has a problem too).</p>
<p>The cmake-based build system used by the llvm-toolchain package
(IIRC llvm has multiple build-systems or at least did at one
point) seems to use config.guess to determine what target to build
for and I couldn't find any way to override this externally
(though i'm no LLVM expert so I may well have missed one). The
trouble with config.guess is it gives you a description of the
hardware you are running on, NOT the hardware you are supposed to
be building for.<br>
<br>
I dealt with it in raspbian by.</p>
<p>1. Modifying cmake/modules/GetHostTriple.cmake to call
config.guess.hack instead of config.guess<br>
2. Writing a script config.guess.hack to call config.guess and
then use sed on the result to switch the arm version to the one I
wanted.</p>
<p>If you search for config.guess in
<a class="moz-txt-link-freetext" href="http://debdiffs.raspbian.org/main/l/llvm-toolchain-6.0/llvm-toolchain-6.0_6.0.1-6%2brpi1.debdiff">http://debdiffs.raspbian.org/main/l/llvm-toolchain-6.0/llvm-toolchain-6.0_6.0.1-6%2brpi1.debdiff</a>
you should find the relavent changes.<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>