<p></p>
<p><b>@maribu</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/15329#discussion_r714708896">examples/wasm/wasm_sample/Makefile</a>:</p>
<pre style='color:#555'>> +            -emit-llvm \
+               -Os \
+               -flto \
+               -fvisibility=hidden \
+               -ffunction-sections \
+               -fdata-sections \
+
+%.show: %.wasm
+       wasm2wat $<
+
+%.wasm: %.o Makefile
+       wasm-ld-$(LLVM_VERSION) -o $@ $(LINK_FLAGS) $<
+
+
+%.o: %.cpp Makefile FORCE
+       clang++-$(LLVM_VERSION) \
</pre>
<blockquote>
<p>at least for ubuntu-focal they are not liked to <code>wasm-ld</code></p>
</blockquote>
<p><g-emoji class="g-emoji" alias="frowning_face" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2639.png">☹️</g-emoji> <a href="https://archlinux.org/packages/extra/x86_64/lld/" rel="nofollow">Arch Linux</a>, <a href="https://koji.fedoraproject.org/koji/rpminfo?rpmID=27479493" rel="nofollow">Fedora</a>, <a href="https://pkgs.alpinelinux.org/contents?branch=edge&name=lld&arch=x86_64&repo=community" rel="nofollow">Alpine Linux</a> and likely all distros except Ubuntu does it different: There is only <code>wasm-ld</code> but no <code>wasm-ld-<VERSION></code>.</p>
<blockquote>
<p>i don't want to have 2 tool-chains being used for one build.</p>
</blockquote>
<p>Note that e.g. GCC doesn't have its own linker. So far, I never had problems with updating the linker or even wildly mixing linker and compiler (e.g. using gold with gcc, using binutil's ld with gcc, using lld with gcc, using gold with clang, ...).</p>
<p>I think the reason there is no lld- (or wasm-ld-) is that there is no advantage in having multiple versions of it installed. For compilers new optimization features regularly break existing code (if relies on undefined behavior or behavior that only since recently is considered undefined), so one might want an older version to still get working binaries until the source is fixed.</p>
<p>So the question now is: Should this work by default for Ubuntu, or for everyone else. I'm all for the latter, but I'm not an Ubuntu user. (Honestly, isn't Ubuntu the Windows among the Linux Distros?)</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/15329#discussion_r714708896">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYFALX5TAPPN4CON57TUDMGRRANCNFSM4TCQEOAA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/ABE7WYHEVFTOD7HQSWNBA33UDMGRRA5CNFSM4TCQEOAKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOFVU23ZA.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/15329#discussion_r714708896",
"url": "https://github.com/RIOT-OS/RIOT/pull/15329#discussion_r714708896",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>