1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

makefiles/cargo-targets.inc.mk: Fix RISC-V target

Update the list of target triples to match
`makefiles/arch/riscv.inc.mk`. This fixes compilation with toolchains
other than the obsolete toolchain that uses the incorrect
`riscv-none-embed` triple.
This commit is contained in:
Marian Buschsieweke 2023-01-09 20:32:36 +01:00
parent e2538a898a
commit 4a00835415
No known key found for this signature in database
GPG Key ID: CB8E3238CE715A94

View File

@ -28,8 +28,16 @@ $(CARGO_COMPILE_COMMANDS): $(BUILDDEPS)
$(Q)DIRS="$(DIRS)" APPLICATION_BLOBS="$(BLOBS)" \
"$(MAKE)" -C $(APPDIR) -f $(RIOTMAKE)/application.inc.mk compile-commands
@# replacement addresses https://github.com/rust-lang/rust-bindgen/issues/1555
@# Keep triples in sync with makefiles/arch/riscv.inc.mk
$(Q)$(RIOTTOOLS)/compile_commands/compile_commands.py $(CARGO_COMPILE_COMMANDS_FLAGS) $(BINDIR) \
| sed 's/"riscv-none-embed"/"riscv32"/g' \
| sed -e 's/"riscv32-none-elf"/"riscv32"/g' \
-e 's/"riscv-none-elf"/"riscv32"/g' \
-e 's/"riscv32-unknown-elf"/"riscv32"/g' \
-e 's/"riscv32-elf"/"riscv32"/g' \
-e 's/"riscv64-none-elf"/"riscv32"/g' \
-e 's/"riscv64-unknown-elf"/"riscv32"/g' \
-e 's/"riscv64-elf"/"riscv32"/g' \
-e 's/"riscv-none-embed"/"riscv32"/g' \
| $(LAZYSPONGE) $@