assemble.ps1 813 B

1234567891011121314151617181920
  1. New-Item -Force -Name bin -Type Directory
  2. # remove existing blobs because otherwise this will append object files to the old blobs
  3. Remove-Item -Force bin/*.a
  4. $crate = "riscv"
  5. riscv64-unknown-elf-gcc -c -mabi=ilp32 -march=rv32i asm.S -o bin/$crate.o
  6. riscv64-unknown-elf-ar crs bin/riscv32i-unknown-none-elf.a bin/$crate.o
  7. riscv64-unknown-elf-gcc -c -mabi=ilp32 -march=rv32ic asm.S -o bin/$crate.o
  8. riscv64-unknown-elf-ar crs bin/riscv32ic-unknown-none-elf.a bin/$crate.o
  9. riscv64-unknown-elf-gcc -c -mabi=lp64 -march=rv64i asm.S -o bin/$crate.o
  10. riscv64-unknown-elf-ar crs bin/riscv64i-unknown-none-elf.a bin/$crate.o
  11. riscv64-unknown-elf-gcc -c -mabi=lp64 -march=rv64ic asm.S -o bin/$crate.o
  12. riscv64-unknown-elf-ar crs bin/riscv64ic-unknown-none-elf.a bin/$crate.o
  13. Remove-Item bin/$crate.o