assemble.ps1 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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.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.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.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.a bin/$crate.o
  13. riscv64-unknown-elf-gcc -c -mabi=ilp32f -march=rv32if asm.S -o bin/$crate.o
  14. riscv64-unknown-elf-ar crs bin/riscv32if.a bin/$crate.o
  15. riscv64-unknown-elf-gcc -c -mabi=ilp32f -march=rv32ifc asm.S -o bin/$crate.o
  16. riscv64-unknown-elf-ar crs bin/riscv32ifc.a bin/$crate.o
  17. riscv64-unknown-elf-gcc -c -mabi=lp64f -march=rv64if asm.S -o bin/$crate.o
  18. riscv64-unknown-elf-ar crs bin/riscv64if.a bin/$crate.o
  19. riscv64-unknown-elf-gcc -c -mabi=lp64f -march=rv64ifc asm.S -o bin/$crate.o
  20. riscv64-unknown-elf-ar crs bin/riscv64ifc.a bin/$crate.o
  21. riscv64-unknown-elf-gcc -c -mabi=ilp32d -march=rv32ifd asm.S -o bin/$crate.o
  22. riscv64-unknown-elf-ar crs bin/riscv32ifd.a bin/$crate.o
  23. riscv64-unknown-elf-gcc -c -mabi=ilp32d -march=rv32ifdc asm.S -o bin/$crate.o
  24. riscv64-unknown-elf-ar crs bin/riscv32ifdc.a bin/$crate.o
  25. riscv64-unknown-elf-gcc -c -mabi=lp64d -march=rv64ifd asm.S -o bin/$crate.o
  26. riscv64-unknown-elf-ar crs bin/riscv64ifd.a bin/$crate.o
  27. riscv64-unknown-elf-gcc -c -mabi=lp64d -march=rv64ifdc asm.S -o bin/$crate.o
  28. riscv64-unknown-elf-ar crs bin/riscv64ifdc.a bin/$crate.o
  29. Remove-Item bin/$crate.o