[riot-notifications] [RIOT-OS/RIOT] fe310: Support compilation with clang (#15176)

nmeum notifications at github.com
Mon Jan 25 10:53:58 CET 2021

@nmeum commented on this pull request.

> +ifneq ($(TOOLCHAIN),llvm)
+  CFLAGS_CPU += -mcmodel=medlow -msmall-data-limit=8

Sorry it took me a while to reply, but now I finally got around to revising this issue. Regarding your proposed change: This does fix the issue, however, in my opinion it is not a proper fix for the issue. The underlying issue here is that `riscv-none-elf` is simply not a valid tripled as `riscv` isn't an architecture (there is `riscv32` and `riscv64` but no `riscv`). From the triplet you are using clang simply can't interfere whether it is compiling for a 32 Bit or 64 Bit architecture. The proper way to fix this issue is stop using `riscv-none-elf` and use `riscv32-none-elf` (or similar) instead.


$ clang -target riscv32-none-elf -c -o test.o test.c
$ echo $?
$ clang -target riscv-none-elf -c -o test.o test.c
error: unknown target triple 'riscv-none-unknown-elf', please use -triple or -arch

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/20210125/a5cdb9da/attachment-0001.htm>

More information about the notifications mailing list