[riot-notifications] [RIOT-OS/RIOT] WIP: pkg/wamr: add WAMR to provide WASM support in RIOT (#15329)

Marian Buschsieweke notifications at github.com
Thu Sep 23 13:38:00 CEST 2021

@maribu commented on this pull request.

> +		-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) \

> at least for ubuntu-focal they are not liked to `wasm-ld`

:frowning_face: [Arch Linux](https://archlinux.org/packages/extra/x86_64/lld/), [Fedora](https://koji.fedoraproject.org/koji/rpminfo?rpmID=27479493), [Alpine Linux](https://pkgs.alpinelinux.org/contents?branch=edge&name=lld&arch=x86_64&repo=community) and likely all distros except Ubuntu does it different: There is only `wasm-ld` but no `wasm-ld-<VERSION>`.

> i don't want to have 2 tool-chains being used for one build.

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, ...).

I think the reason there is no lld-<version> (or wasm-ld-<version>) 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.

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?)

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210923/a57e5a4b/attachment.htm>

More information about the notifications mailing list