<p></p>
<blockquote>
<p>File a bug there ;-) From <a href="https://clang.llvm.org/docs/CrossCompilation.html#target-triple" rel="nofollow">https://clang.llvm.org/docs/CrossCompilation.html#target-triple</a></p>
</blockquote>
<p>Could you briefly explain what you mean by that? I started using the Alpine packed <code>gcc-riscv-none-elf</code> now (which was also created by you I believe <g-emoji class="g-emoji" alias="wink" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f609.png">😉</g-emoji>), instead of building my own cross-compilers and with <code>gcc-riscv-none-elf</code> I can indeed also reproduce the issue described by <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/aabadie/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/aabadie">@aabadie</a>.</p>
<p>If I make the following changes to the buildsystem compilation with clang works fine again:</p>
<pre><code>diff --git a/makefiles/toolchain/llvm.inc.mk b/makefiles/toolchain/llvm.inc.mk
index 9898f10f8..182d71ee6 100644
--- a/makefiles/toolchain/llvm.inc.mk
+++ b/makefiles/toolchain/llvm.inc.mk
@@ -56,8 +56,8 @@ ifneq (,$(TARGET_ARCH))
   endif
 
   # Tell clang to cross compile
-  CFLAGS     += -target $(TARGET_ARCH)
-  CXXFLAGS   += -target $(TARGET_ARCH)
+  CFLAGS     += -target riscv32-unknown-elf
+  CXXFLAGS   += -target riscv32-unknown-elf
   # We currently don't use LLVM for linking (see comment above).
   # LINKFLAGS  += -target $(TARGET_ARCH)
</code></pre>
<p>So why does the RIOT docker image and the Alpine package use a triplet which is not supported by clang?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/15176#issuecomment-722341299">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYBMG6LDEYM3BRKPJITSOKJORANCNFSM4SHRQN5A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABE7WYDMJKTSG4ILXMHYLU3SOKJORA5CNFSM4SHRQN5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFMHA3MY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/15176#issuecomment-722341299",
"url": "https://github.com/RIOT-OS/RIOT/pull/15176#issuecomment-722341299",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>